From 000f9e6666c4b9a2fad2fbe1efa77dd4f37e646d Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Sun, 25 May 2025 15:13:27 +0300 Subject: [PATCH 1/2] chore: update generated output under .openapi markers --- lib/zitadel/client/api/feature_service_api.rb | 783 ---- .../api/identity_provider_service_api.rb | 85 - lib/zitadel/client/api/o_i_d_c_service_api.rb | 296 -- .../client/api/organization_service_api.rb | 158 - lib/zitadel/client/api/s_a_m_l_service_api.rb | 159 - lib/zitadel/client/api/session_service_api.rb | 372 -- lib/zitadel/client/api/settings_api.rb | 147 - .../client/api/settings_service_api.rb | 595 --- lib/zitadel/client/api/user_service_api.rb | 3210 ----------------- .../client/models/feature_service_details.rb | 259 -- .../models/feature_service_feature_flag.rb | 265 -- ..._service_get_instance_features_response.rb | 365 -- ...vice_get_organization_features_response.rb | 230 -- ...re_service_get_system_features_response.rb | 338 -- ...ture_service_get_user_features_response.rb | 230 -- .../feature_service_improved_performance.rb | 45 - ...rvice_improved_performance_feature_flag.rb | 266 -- .../client/models/feature_service_login_v2.rb | 241 -- .../feature_service_login_v2_feature_flag.rb | 272 -- .../models/feature_service_protobuf_any.rb | 230 -- ...ervice_reset_instance_features_response.rb | 230 -- ...ce_reset_organization_features_response.rb | 230 -- ..._service_reset_system_features_response.rb | 230 -- ...re_service_reset_user_features_response.rb | 230 -- .../models/feature_service_rpc_status.rb | 250 -- ...e_service_set_instance_features_request.rb | 372 -- ..._service_set_instance_features_response.rb | 230 -- ...vice_set_organization_features_response.rb | 230 -- ...ure_service_set_system_features_request.rb | 342 -- ...re_service_set_system_features_response.rb | 230 -- ...ture_service_set_user_features_response.rb | 230 -- .../client/models/feature_service_source.rb | 46 - .../identity_provider_service_apple_config.rb | 263 -- ...ty_provider_service_auto_linking_option.rb | 42 - ...ntity_provider_service_azure_a_d_config.rb | 261 -- ...ntity_provider_service_azure_a_d_tenant.rb | 241 -- ..._provider_service_azure_a_d_tenant_type.rb | 42 - .../identity_provider_service_details.rb | 259 -- ...provider_service_generic_o_i_d_c_config.rb | 263 -- ...vider_service_get_i_d_p_by_i_d_response.rb | 230 -- ...dentity_provider_service_git_hub_config.rb | 243 -- ...ervice_git_hub_enterprise_server_config.rb | 270 -- ...dentity_provider_service_git_lab_config.rb | 243 -- ...ider_service_git_lab_self_hosted_config.rb | 252 -- ...identity_provider_service_google_config.rb | 243 -- .../models/identity_provider_service_i_d_p.rb | 302 -- .../identity_provider_service_i_d_p_config.rb | 338 -- .../identity_provider_service_i_d_p_state.rb | 44 - .../identity_provider_service_i_d_p_type.rb | 52 - .../identity_provider_service_j_w_t_config.rb | 261 -- ...ity_provider_service_l_d_a_p_attributes.rb | 347 -- ...dentity_provider_service_l_d_a_p_config.rb | 317 -- ...identity_provider_service_o_auth_config.rb | 283 -- .../identity_provider_service_options.rb | 294 -- .../identity_provider_service_protobuf_any.rb | 230 -- .../identity_provider_service_rpc_status.rb | 250 -- ...entity_provider_service_s_a_m_l_binding.rb | 43 - ...dentity_provider_service_s_a_m_l_config.rb | 295 -- ...rovider_service_s_a_m_l_name_i_d_format.rb | 43 - .../models/o_i_d_c_service_auth_request.rb | 327 -- .../o_i_d_c_service_authorization_error.rb | 272 -- ...ze_or_deny_device_authorization_request.rb | 239 -- ...o_i_d_c_service_create_callback_request.rb | 239 -- ..._i_d_c_service_create_callback_response.rb | 240 -- .../client/models/o_i_d_c_service_details.rb | 259 -- ..._c_service_device_authorization_request.rb | 273 -- .../models/o_i_d_c_service_error_reason.rb | 56 - ...i_d_c_service_get_auth_request_response.rb | 230 -- ...t_device_authorization_request_response.rb | 230 -- .../client/models/o_i_d_c_service_prompt.rb | 45 - .../models/o_i_d_c_service_protobuf_any.rb | 230 -- .../models/o_i_d_c_service_rpc_status.rb | 250 -- .../client/models/o_i_d_c_service_session.rb | 297 -- ...nization_service_add_human_user_request.rb | 445 --- ...zation_service_add_organization_request.rb | 276 -- ..._service_add_organization_request_admin.rb | 250 -- ...ation_service_add_organization_response.rb | 250 -- ...add_organization_response_created_admin.rb | 248 -- .../models/organization_service_details.rb | 259 -- .../models/organization_service_gender.rb | 43 - .../organization_service_hashed_password.rb | 275 -- .../models/organization_service_i_d_p_link.rb | 335 -- .../organization_service_list_details.rb | 249 -- ...tion_service_list_organizations_request.rb | 274 -- ...ion_service_list_organizations_response.rb | 274 -- .../models/organization_service_list_query.rb | 251 -- ...ation_service_organization_domain_query.rb | 299 -- ...ization_service_organization_field_name.rb | 41 - ...nization_service_organization_i_d_query.rb | 266 -- ...ization_service_organization_name_query.rb | 299 -- ...organization_service_organization_state.rb | 43 - ...zation_service_organization_state_query.rb | 254 -- .../models/organization_service_password.rb | 274 -- .../organization_service_protobuf_any.rb | 230 -- .../models/organization_service_rpc_status.rb | 250 -- .../organization_service_search_query.rb | 266 -- ...on_service_send_email_verification_code.rb | 259 -- .../organization_service_set_human_email.rb | 292 -- .../organization_service_set_human_phone.rb | 276 -- .../organization_service_set_human_profile.rb | 426 --- ...organization_service_set_metadata_entry.rb | 310 -- .../organization_service_text_query_method.rb | 47 - .../s_a_m_l_service_authorization_error.rb | 263 -- ...s_a_m_l_service_create_response_request.rb | 239 -- ..._a_m_l_service_create_response_response.rb | 258 -- .../client/models/s_a_m_l_service_details.rb | 259 -- .../models/s_a_m_l_service_error_reason.rb | 47 - ..._l_service_get_s_a_m_l_request_response.rb | 230 -- .../models/s_a_m_l_service_post_response.rb | 239 -- .../models/s_a_m_l_service_protobuf_any.rb | 230 -- .../models/s_a_m_l_service_rpc_status.rb | 250 -- .../models/s_a_m_l_service_s_a_m_l_request.rb | 281 -- .../client/models/s_a_m_l_service_session.rb | 297 -- .../models/session_service_challenges.rb | 248 -- .../session_service_challenges_web_auth_n.rb | 231 -- .../session_service_check_i_d_p_intent.rb | 297 -- .../models/session_service_check_o_t_p.rb | 249 -- .../models/session_service_check_password.rb | 258 -- .../models/session_service_check_t_o_t_p.rb | 258 -- .../models/session_service_check_user.rb | 295 -- .../session_service_check_web_auth_n.rb | 248 -- .../client/models/session_service_checks.rb | 284 -- .../session_service_create_session_request.rb | 270 -- ...session_service_create_session_response.rb | 259 -- .../session_service_creation_date_query.rb | 263 -- .../models/session_service_creator_query.rb | 250 -- .../session_service_delete_session_request.rb | 231 -- ...session_service_delete_session_response.rb | 230 -- .../client/models/session_service_details.rb | 259 -- .../client/models/session_service_factors.rb | 284 -- .../session_service_get_session_response.rb | 230 -- .../models/session_service_i_ds_query.rb | 232 -- .../models/session_service_intent_factor.rb | 231 -- .../models/session_service_list_details.rb | 249 -- .../models/session_service_list_query.rb | 251 -- .../session_service_list_sessions_request.rb | 274 -- .../session_service_list_sessions_response.rb | 241 -- .../session_service_o_t_p_email_send_code.rb | 259 -- .../models/session_service_o_t_p_factor.rb | 231 -- .../models/session_service_password_factor.rb | 231 -- .../models/session_service_protobuf_any.rb | 230 -- .../session_service_request_challenges.rb | 248 -- ..._service_request_challenges_o_t_p_email.rb | 239 -- ..._service_request_challenges_o_t_p_s_m_s.rb | 230 -- ...n_service_request_challenges_web_auth_n.rb | 296 -- .../models/session_service_rpc_status.rb | 250 -- .../models/session_service_search_query.rb | 266 -- .../client/models/session_service_session.rb | 301 -- .../session_service_session_field_name.rb | 41 - .../session_service_set_session_request.rb | 299 -- .../session_service_set_session_response.rb | 249 -- .../models/session_service_t_o_t_p_factor.rb | 231 -- .../session_service_timestamp_query_method.rb | 44 - .../models/session_service_user_agent.rb | 259 -- ...ession_service_user_agent_header_values.rb | 233 -- .../session_service_user_agent_query.rb | 250 -- .../models/session_service_user_factor.rb | 271 -- .../models/session_service_user_i_d_query.rb | 230 -- ...n_service_user_verification_requirement.rb | 43 - .../session_service_web_auth_n_factor.rb | 240 -- .../settings_service_auto_linking_option.rb | 42 - .../settings_service_branding_settings.rb | 313 -- .../client/models/settings_service_details.rb | 259 -- .../settings_service_domain_settings.rb | 284 -- ...ttings_service_embedded_iframe_settings.rb | 243 -- ..._get_active_identity_providers_response.rb | 241 -- ..._service_get_branding_settings_response.rb | 239 -- ...gs_service_get_domain_settings_response.rb | 239 -- ...s_service_get_general_settings_response.rb | 252 -- ...get_legal_and_support_settings_response.rb | 239 -- ...s_service_get_lockout_settings_response.rb | 239 -- ...ngs_service_get_login_settings_response.rb | 239 -- ...t_password_complexity_settings_response.rb | 239 -- ...e_get_password_expiry_settings_response.rb | 239 -- ..._service_get_security_settings_response.rb | 239 -- .../settings_service_identity_provider.rb | 281 -- ...settings_service_identity_provider_type.rb | 52 - ...ings_service_legal_and_support_settings.rb | 321 -- .../models/settings_service_list_details.rb | 249 -- .../settings_service_lockout_settings.rb | 274 -- .../models/settings_service_login_settings.rb | 447 --- .../settings_service_multi_factor_type.rb | 41 - .../client/models/settings_service_options.rb | 294 -- .../models/settings_service_passkeys_type.rb | 41 - ...gs_service_password_complexity_settings.rb | 304 -- ...ttings_service_password_expiry_settings.rb | 274 -- .../models/settings_service_protobuf_any.rb | 230 -- .../settings_service_resource_owner_type.rb | 42 - .../models/settings_service_rpc_status.rb | 250 -- .../settings_service_second_factor_type.rb | 44 - .../settings_service_security_settings.rb | 240 -- ...s_service_set_security_settings_request.rb | 240 -- ..._service_set_security_settings_response.rb | 230 -- .../client/models/settings_service_theme.rb | 281 -- .../models/settings_service_theme_mode.rb | 43 - .../models/user_service_access_token_type.rb | 41 - .../user_service_add_human_user_request.rb | 445 --- .../user_service_add_human_user_response.rb | 257 -- .../user_service_add_i_d_p_link_request.rb | 230 -- .../user_service_add_i_d_p_link_response.rb | 230 -- .../user_service_add_o_t_p_email_response.rb | 230 -- .../user_service_add_o_t_p_s_m_s_response.rb | 230 -- .../client/models/user_service_and_query.rb | 234 -- .../client/models/user_service_auth_factor.rb | 268 -- .../models/user_service_auth_factor_state.rb | 43 - .../models/user_service_auth_factor_u2_f.rb | 239 -- ...user_service_authentication_method_type.rb | 47 - ...user_service_create_invite_code_request.rb | 239 -- ...ser_service_create_invite_code_response.rb | 240 -- ...reate_passkey_registration_link_request.rb | 239 -- ...eate_passkey_registration_link_response.rb | 239 -- .../user_service_deactivate_user_response.rb | 230 -- .../user_service_delete_user_response.rb | 230 -- .../client/models/user_service_details.rb | 259 -- .../models/user_service_display_name_query.rb | 299 -- .../client/models/user_service_email_query.rb | 291 -- .../models/user_service_first_name_query.rb | 299 -- .../client/models/user_service_gender.rb | 43 - .../user_service_get_user_by_i_d_response.rb | 239 -- .../models/user_service_hashed_password.rb | 275 -- .../client/models/user_service_human_email.rb | 267 -- ...rvice_human_m_f_a_init_skipped_response.rb | 230 -- .../client/models/user_service_human_phone.rb | 258 -- .../models/user_service_human_profile.rb | 422 --- .../client/models/user_service_human_user.rb | 353 -- .../models/user_service_i_d_p_information.rb | 288 -- .../models/user_service_i_d_p_intent.rb | 326 -- ...ervice_i_d_p_l_d_a_p_access_information.rb | 230 -- .../client/models/user_service_i_d_p_link.rb | 335 -- ...service_i_d_p_o_auth_access_information.rb | 239 -- ...ervice_i_d_p_s_a_m_l_access_information.rb | 230 -- .../user_service_in_user_emails_query.rb | 234 -- .../models/user_service_in_user_i_d_query.rb | 234 -- .../user_service_l_d_a_p_credentials.rb | 297 -- .../models/user_service_last_name_query.rb | 299 -- ...ce_list_authentication_factors_response.rb | 232 -- ...st_authentication_method_types_response.rb | 241 -- .../models/user_service_list_details.rb | 249 -- .../user_service_list_i_d_p_links_request.rb | 230 -- .../user_service_list_i_d_p_links_response.rb | 241 -- .../user_service_list_passkeys_response.rb | 241 -- .../client/models/user_service_list_query.rb | 251 -- .../models/user_service_list_users_request.rb | 274 -- .../user_service_list_users_response.rb | 274 -- .../models/user_service_lock_user_response.rb | 230 -- .../models/user_service_login_name_query.rb | 299 -- .../models/user_service_machine_user.rb | 281 -- .../models/user_service_nick_name_query.rb | 299 -- .../client/models/user_service_not_query.rb | 231 -- .../models/user_service_notification_type.rb | 42 - .../client/models/user_service_or_query.rb | 234 -- .../models/user_service_organization.rb | 239 -- .../user_service_organization_id_query.rb | 266 -- .../client/models/user_service_passkey.rb | 300 -- .../user_service_passkey_authenticator.rb | 42 - .../user_service_passkey_registration_code.rb | 293 -- .../client/models/user_service_password.rb | 274 -- .../user_service_password_reset_request.rb | 239 -- .../user_service_password_reset_response.rb | 239 -- .../client/models/user_service_phone_query.rb | 300 -- .../models/user_service_protobuf_any.rb | 230 -- .../user_service_reactivate_user_response.rb | 230 -- .../models/user_service_redirect_u_r_ls.rb | 297 -- .../user_service_register_passkey_request.rb | 273 -- .../user_service_register_passkey_response.rb | 249 -- .../user_service_register_t_o_t_p_response.rb | 248 -- .../user_service_register_u2_f_request.rb | 231 -- .../user_service_register_u2_f_response.rb | 249 -- ...user_service_remove_i_d_p_link_response.rb | 230 -- ...ser_service_remove_o_t_p_email_response.rb | 230 -- ...ser_service_remove_o_t_p_s_m_s_response.rb | 230 -- .../user_service_remove_passkey_response.rb | 230 -- .../user_service_remove_phone_response.rb | 230 -- .../user_service_remove_t_o_t_p_response.rb | 230 -- .../user_service_remove_u2_f_response.rb | 230 -- .../user_service_resend_email_code_request.rb | 239 -- ...user_service_resend_email_code_response.rb | 239 -- ...ser_service_resend_invite_code_response.rb | 230 -- .../user_service_resend_phone_code_request.rb | 239 -- ...user_service_resend_phone_code_response.rb | 239 -- ...trieve_identity_provider_intent_request.rb | 259 -- ...rieve_identity_provider_intent_response.rb | 258 -- .../client/models/user_service_rpc_status.rb | 250 -- .../models/user_service_search_query.rb | 365 -- .../user_service_send_email_code_request.rb | 239 -- .../user_service_send_email_code_response.rb | 239 -- ...er_service_send_email_verification_code.rb | 259 -- .../models/user_service_send_invite_code.rb | 297 -- ..._service_send_passkey_registration_link.rb | 259 -- .../user_service_send_password_reset_link.rb | 292 -- .../models/user_service_set_email_request.rb | 292 -- .../models/user_service_set_email_response.rb | 239 -- .../models/user_service_set_human_email.rb | 292 -- .../models/user_service_set_human_phone.rb | 276 -- .../models/user_service_set_human_profile.rb | 426 --- .../models/user_service_set_metadata_entry.rb | 310 -- .../models/user_service_set_password.rb | 328 -- .../user_service_set_password_request.rb | 319 -- .../user_service_set_password_response.rb | 230 -- .../models/user_service_set_phone_request.rb | 292 -- .../models/user_service_set_phone_response.rb | 239 -- ..._start_identity_provider_intent_request.rb | 277 -- ...start_identity_provider_intent_response.rb | 259 -- .../client/models/user_service_state_query.rb | 270 -- .../models/user_service_text_query_method.rb | 47 - .../client/models/user_service_type.rb | 42 - .../client/models/user_service_type_query.rb | 270 -- .../user_service_unlock_user_response.rb | 230 -- .../user_service_update_human_user_request.rb | 294 -- ...user_service_update_human_user_response.rb | 248 -- .../client/models/user_service_user.rb | 297 -- .../models/user_service_user_field_name.rb | 49 - .../models/user_service_user_name_query.rb | 299 -- .../client/models/user_service_user_state.rb | 45 - .../user_service_verify_email_request.rb | 266 -- .../user_service_verify_email_response.rb | 230 -- ...user_service_verify_invite_code_request.rb | 266 -- ...ser_service_verify_invite_code_response.rb | 230 -- ...ice_verify_passkey_registration_request.rb | 292 -- ...ce_verify_passkey_registration_response.rb | 230 -- .../user_service_verify_phone_request.rb | 266 -- .../user_service_verify_phone_response.rb | 230 -- ...ice_verify_t_o_t_p_registration_request.rb | 248 -- ...ce_verify_t_o_t_p_registration_response.rb | 230 -- ...ervice_verify_u2_f_registration_request.rb | 292 -- ...rvice_verify_u2_f_registration_response.rb | 230 -- .../models/zitadelobjectv2_organization.rb | 239 -- .../models/zitadelorgv2_organization.rb | 293 -- 328 files changed, 82236 deletions(-) delete mode 100644 lib/zitadel/client/api/feature_service_api.rb delete mode 100644 lib/zitadel/client/api/identity_provider_service_api.rb delete mode 100644 lib/zitadel/client/api/o_i_d_c_service_api.rb delete mode 100644 lib/zitadel/client/api/organization_service_api.rb delete mode 100644 lib/zitadel/client/api/s_a_m_l_service_api.rb delete mode 100644 lib/zitadel/client/api/session_service_api.rb delete mode 100644 lib/zitadel/client/api/settings_api.rb delete mode 100644 lib/zitadel/client/api/settings_service_api.rb delete mode 100644 lib/zitadel/client/api/user_service_api.rb delete mode 100644 lib/zitadel/client/models/feature_service_details.rb delete mode 100644 lib/zitadel/client/models/feature_service_feature_flag.rb delete mode 100644 lib/zitadel/client/models/feature_service_get_instance_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_get_organization_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_get_system_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_get_user_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_improved_performance.rb delete mode 100644 lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb delete mode 100644 lib/zitadel/client/models/feature_service_login_v2.rb delete mode 100644 lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb delete mode 100644 lib/zitadel/client/models/feature_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/feature_service_reset_instance_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_reset_organization_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_reset_system_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_reset_user_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/feature_service_set_instance_features_request.rb delete mode 100644 lib/zitadel/client/models/feature_service_set_instance_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_set_organization_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_set_system_features_request.rb delete mode 100644 lib/zitadel/client/models/feature_service_set_system_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_set_user_features_response.rb delete mode 100644 lib/zitadel/client/models/feature_service_source.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_apple_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_details.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_git_hub_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_git_lab_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_google_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_o_auth_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_options.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb delete mode 100644 lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_auth_request.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_details.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_error_reason.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_prompt.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/o_i_d_c_service_session.rb delete mode 100644 lib/zitadel/client/models/organization_service_add_human_user_request.rb delete mode 100644 lib/zitadel/client/models/organization_service_add_organization_request.rb delete mode 100644 lib/zitadel/client/models/organization_service_add_organization_request_admin.rb delete mode 100644 lib/zitadel/client/models/organization_service_add_organization_response.rb delete mode 100644 lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb delete mode 100644 lib/zitadel/client/models/organization_service_details.rb delete mode 100644 lib/zitadel/client/models/organization_service_gender.rb delete mode 100644 lib/zitadel/client/models/organization_service_hashed_password.rb delete mode 100644 lib/zitadel/client/models/organization_service_i_d_p_link.rb delete mode 100644 lib/zitadel/client/models/organization_service_list_details.rb delete mode 100644 lib/zitadel/client/models/organization_service_list_organizations_request.rb delete mode 100644 lib/zitadel/client/models/organization_service_list_organizations_response.rb delete mode 100644 lib/zitadel/client/models/organization_service_list_query.rb delete mode 100644 lib/zitadel/client/models/organization_service_organization_domain_query.rb delete mode 100644 lib/zitadel/client/models/organization_service_organization_field_name.rb delete mode 100644 lib/zitadel/client/models/organization_service_organization_i_d_query.rb delete mode 100644 lib/zitadel/client/models/organization_service_organization_name_query.rb delete mode 100644 lib/zitadel/client/models/organization_service_organization_state.rb delete mode 100644 lib/zitadel/client/models/organization_service_organization_state_query.rb delete mode 100644 lib/zitadel/client/models/organization_service_password.rb delete mode 100644 lib/zitadel/client/models/organization_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/organization_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/organization_service_search_query.rb delete mode 100644 lib/zitadel/client/models/organization_service_send_email_verification_code.rb delete mode 100644 lib/zitadel/client/models/organization_service_set_human_email.rb delete mode 100644 lib/zitadel/client/models/organization_service_set_human_phone.rb delete mode 100644 lib/zitadel/client/models/organization_service_set_human_profile.rb delete mode 100644 lib/zitadel/client/models/organization_service_set_metadata_entry.rb delete mode 100644 lib/zitadel/client/models/organization_service_text_query_method.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_details.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_error_reason.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_post_response.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb delete mode 100644 lib/zitadel/client/models/s_a_m_l_service_session.rb delete mode 100644 lib/zitadel/client/models/session_service_challenges.rb delete mode 100644 lib/zitadel/client/models/session_service_challenges_web_auth_n.rb delete mode 100644 lib/zitadel/client/models/session_service_check_i_d_p_intent.rb delete mode 100644 lib/zitadel/client/models/session_service_check_o_t_p.rb delete mode 100644 lib/zitadel/client/models/session_service_check_password.rb delete mode 100644 lib/zitadel/client/models/session_service_check_t_o_t_p.rb delete mode 100644 lib/zitadel/client/models/session_service_check_user.rb delete mode 100644 lib/zitadel/client/models/session_service_check_web_auth_n.rb delete mode 100644 lib/zitadel/client/models/session_service_checks.rb delete mode 100644 lib/zitadel/client/models/session_service_create_session_request.rb delete mode 100644 lib/zitadel/client/models/session_service_create_session_response.rb delete mode 100644 lib/zitadel/client/models/session_service_creation_date_query.rb delete mode 100644 lib/zitadel/client/models/session_service_creator_query.rb delete mode 100644 lib/zitadel/client/models/session_service_delete_session_request.rb delete mode 100644 lib/zitadel/client/models/session_service_delete_session_response.rb delete mode 100644 lib/zitadel/client/models/session_service_details.rb delete mode 100644 lib/zitadel/client/models/session_service_factors.rb delete mode 100644 lib/zitadel/client/models/session_service_get_session_response.rb delete mode 100644 lib/zitadel/client/models/session_service_i_ds_query.rb delete mode 100644 lib/zitadel/client/models/session_service_intent_factor.rb delete mode 100644 lib/zitadel/client/models/session_service_list_details.rb delete mode 100644 lib/zitadel/client/models/session_service_list_query.rb delete mode 100644 lib/zitadel/client/models/session_service_list_sessions_request.rb delete mode 100644 lib/zitadel/client/models/session_service_list_sessions_response.rb delete mode 100644 lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb delete mode 100644 lib/zitadel/client/models/session_service_o_t_p_factor.rb delete mode 100644 lib/zitadel/client/models/session_service_password_factor.rb delete mode 100644 lib/zitadel/client/models/session_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/session_service_request_challenges.rb delete mode 100644 lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb delete mode 100644 lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb delete mode 100644 lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb delete mode 100644 lib/zitadel/client/models/session_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/session_service_search_query.rb delete mode 100644 lib/zitadel/client/models/session_service_session.rb delete mode 100644 lib/zitadel/client/models/session_service_session_field_name.rb delete mode 100644 lib/zitadel/client/models/session_service_set_session_request.rb delete mode 100644 lib/zitadel/client/models/session_service_set_session_response.rb delete mode 100644 lib/zitadel/client/models/session_service_t_o_t_p_factor.rb delete mode 100644 lib/zitadel/client/models/session_service_timestamp_query_method.rb delete mode 100644 lib/zitadel/client/models/session_service_user_agent.rb delete mode 100644 lib/zitadel/client/models/session_service_user_agent_header_values.rb delete mode 100644 lib/zitadel/client/models/session_service_user_agent_query.rb delete mode 100644 lib/zitadel/client/models/session_service_user_factor.rb delete mode 100644 lib/zitadel/client/models/session_service_user_i_d_query.rb delete mode 100644 lib/zitadel/client/models/session_service_user_verification_requirement.rb delete mode 100644 lib/zitadel/client/models/session_service_web_auth_n_factor.rb delete mode 100644 lib/zitadel/client/models/settings_service_auto_linking_option.rb delete mode 100644 lib/zitadel/client/models/settings_service_branding_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_details.rb delete mode 100644 lib/zitadel/client/models/settings_service_domain_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_branding_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_domain_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_general_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_login_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_get_security_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_identity_provider.rb delete mode 100644 lib/zitadel/client/models/settings_service_identity_provider_type.rb delete mode 100644 lib/zitadel/client/models/settings_service_legal_and_support_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_list_details.rb delete mode 100644 lib/zitadel/client/models/settings_service_lockout_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_login_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_multi_factor_type.rb delete mode 100644 lib/zitadel/client/models/settings_service_options.rb delete mode 100644 lib/zitadel/client/models/settings_service_passkeys_type.rb delete mode 100644 lib/zitadel/client/models/settings_service_password_complexity_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_password_expiry_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/settings_service_resource_owner_type.rb delete mode 100644 lib/zitadel/client/models/settings_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/settings_service_second_factor_type.rb delete mode 100644 lib/zitadel/client/models/settings_service_security_settings.rb delete mode 100644 lib/zitadel/client/models/settings_service_set_security_settings_request.rb delete mode 100644 lib/zitadel/client/models/settings_service_set_security_settings_response.rb delete mode 100644 lib/zitadel/client/models/settings_service_theme.rb delete mode 100644 lib/zitadel/client/models/settings_service_theme_mode.rb delete mode 100644 lib/zitadel/client/models/user_service_access_token_type.rb delete mode 100644 lib/zitadel/client/models/user_service_add_human_user_request.rb delete mode 100644 lib/zitadel/client/models/user_service_add_human_user_response.rb delete mode 100644 lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb delete mode 100644 lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb delete mode 100644 lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb delete mode 100644 lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb delete mode 100644 lib/zitadel/client/models/user_service_and_query.rb delete mode 100644 lib/zitadel/client/models/user_service_auth_factor.rb delete mode 100644 lib/zitadel/client/models/user_service_auth_factor_state.rb delete mode 100644 lib/zitadel/client/models/user_service_auth_factor_u2_f.rb delete mode 100644 lib/zitadel/client/models/user_service_authentication_method_type.rb delete mode 100644 lib/zitadel/client/models/user_service_create_invite_code_request.rb delete mode 100644 lib/zitadel/client/models/user_service_create_invite_code_response.rb delete mode 100644 lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb delete mode 100644 lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb delete mode 100644 lib/zitadel/client/models/user_service_deactivate_user_response.rb delete mode 100644 lib/zitadel/client/models/user_service_delete_user_response.rb delete mode 100644 lib/zitadel/client/models/user_service_details.rb delete mode 100644 lib/zitadel/client/models/user_service_display_name_query.rb delete mode 100644 lib/zitadel/client/models/user_service_email_query.rb delete mode 100644 lib/zitadel/client/models/user_service_first_name_query.rb delete mode 100644 lib/zitadel/client/models/user_service_gender.rb delete mode 100644 lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb delete mode 100644 lib/zitadel/client/models/user_service_hashed_password.rb delete mode 100644 lib/zitadel/client/models/user_service_human_email.rb delete mode 100644 lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb delete mode 100644 lib/zitadel/client/models/user_service_human_phone.rb delete mode 100644 lib/zitadel/client/models/user_service_human_profile.rb delete mode 100644 lib/zitadel/client/models/user_service_human_user.rb delete mode 100644 lib/zitadel/client/models/user_service_i_d_p_information.rb delete mode 100644 lib/zitadel/client/models/user_service_i_d_p_intent.rb delete mode 100644 lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb delete mode 100644 lib/zitadel/client/models/user_service_i_d_p_link.rb delete mode 100644 lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb delete mode 100644 lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb delete mode 100644 lib/zitadel/client/models/user_service_in_user_emails_query.rb delete mode 100644 lib/zitadel/client/models/user_service_in_user_i_d_query.rb delete mode 100644 lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb delete mode 100644 lib/zitadel/client/models/user_service_last_name_query.rb delete mode 100644 lib/zitadel/client/models/user_service_list_authentication_factors_response.rb delete mode 100644 lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb delete mode 100644 lib/zitadel/client/models/user_service_list_details.rb delete mode 100644 lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb delete mode 100644 lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb delete mode 100644 lib/zitadel/client/models/user_service_list_passkeys_response.rb delete mode 100644 lib/zitadel/client/models/user_service_list_query.rb delete mode 100644 lib/zitadel/client/models/user_service_list_users_request.rb delete mode 100644 lib/zitadel/client/models/user_service_list_users_response.rb delete mode 100644 lib/zitadel/client/models/user_service_lock_user_response.rb delete mode 100644 lib/zitadel/client/models/user_service_login_name_query.rb delete mode 100644 lib/zitadel/client/models/user_service_machine_user.rb delete mode 100644 lib/zitadel/client/models/user_service_nick_name_query.rb delete mode 100644 lib/zitadel/client/models/user_service_not_query.rb delete mode 100644 lib/zitadel/client/models/user_service_notification_type.rb delete mode 100644 lib/zitadel/client/models/user_service_or_query.rb delete mode 100644 lib/zitadel/client/models/user_service_organization.rb delete mode 100644 lib/zitadel/client/models/user_service_organization_id_query.rb delete mode 100644 lib/zitadel/client/models/user_service_passkey.rb delete mode 100644 lib/zitadel/client/models/user_service_passkey_authenticator.rb delete mode 100644 lib/zitadel/client/models/user_service_passkey_registration_code.rb delete mode 100644 lib/zitadel/client/models/user_service_password.rb delete mode 100644 lib/zitadel/client/models/user_service_password_reset_request.rb delete mode 100644 lib/zitadel/client/models/user_service_password_reset_response.rb delete mode 100644 lib/zitadel/client/models/user_service_phone_query.rb delete mode 100644 lib/zitadel/client/models/user_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/user_service_reactivate_user_response.rb delete mode 100644 lib/zitadel/client/models/user_service_redirect_u_r_ls.rb delete mode 100644 lib/zitadel/client/models/user_service_register_passkey_request.rb delete mode 100644 lib/zitadel/client/models/user_service_register_passkey_response.rb delete mode 100644 lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb delete mode 100644 lib/zitadel/client/models/user_service_register_u2_f_request.rb delete mode 100644 lib/zitadel/client/models/user_service_register_u2_f_response.rb delete mode 100644 lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb delete mode 100644 lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb delete mode 100644 lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb delete mode 100644 lib/zitadel/client/models/user_service_remove_passkey_response.rb delete mode 100644 lib/zitadel/client/models/user_service_remove_phone_response.rb delete mode 100644 lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb delete mode 100644 lib/zitadel/client/models/user_service_remove_u2_f_response.rb delete mode 100644 lib/zitadel/client/models/user_service_resend_email_code_request.rb delete mode 100644 lib/zitadel/client/models/user_service_resend_email_code_response.rb delete mode 100644 lib/zitadel/client/models/user_service_resend_invite_code_response.rb delete mode 100644 lib/zitadel/client/models/user_service_resend_phone_code_request.rb delete mode 100644 lib/zitadel/client/models/user_service_resend_phone_code_response.rb delete mode 100644 lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb delete mode 100644 lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb delete mode 100644 lib/zitadel/client/models/user_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/user_service_search_query.rb delete mode 100644 lib/zitadel/client/models/user_service_send_email_code_request.rb delete mode 100644 lib/zitadel/client/models/user_service_send_email_code_response.rb delete mode 100644 lib/zitadel/client/models/user_service_send_email_verification_code.rb delete mode 100644 lib/zitadel/client/models/user_service_send_invite_code.rb delete mode 100644 lib/zitadel/client/models/user_service_send_passkey_registration_link.rb delete mode 100644 lib/zitadel/client/models/user_service_send_password_reset_link.rb delete mode 100644 lib/zitadel/client/models/user_service_set_email_request.rb delete mode 100644 lib/zitadel/client/models/user_service_set_email_response.rb delete mode 100644 lib/zitadel/client/models/user_service_set_human_email.rb delete mode 100644 lib/zitadel/client/models/user_service_set_human_phone.rb delete mode 100644 lib/zitadel/client/models/user_service_set_human_profile.rb delete mode 100644 lib/zitadel/client/models/user_service_set_metadata_entry.rb delete mode 100644 lib/zitadel/client/models/user_service_set_password.rb delete mode 100644 lib/zitadel/client/models/user_service_set_password_request.rb delete mode 100644 lib/zitadel/client/models/user_service_set_password_response.rb delete mode 100644 lib/zitadel/client/models/user_service_set_phone_request.rb delete mode 100644 lib/zitadel/client/models/user_service_set_phone_response.rb delete mode 100644 lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb delete mode 100644 lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb delete mode 100644 lib/zitadel/client/models/user_service_state_query.rb delete mode 100644 lib/zitadel/client/models/user_service_text_query_method.rb delete mode 100644 lib/zitadel/client/models/user_service_type.rb delete mode 100644 lib/zitadel/client/models/user_service_type_query.rb delete mode 100644 lib/zitadel/client/models/user_service_unlock_user_response.rb delete mode 100644 lib/zitadel/client/models/user_service_update_human_user_request.rb delete mode 100644 lib/zitadel/client/models/user_service_update_human_user_response.rb delete mode 100644 lib/zitadel/client/models/user_service_user.rb delete mode 100644 lib/zitadel/client/models/user_service_user_field_name.rb delete mode 100644 lib/zitadel/client/models/user_service_user_name_query.rb delete mode 100644 lib/zitadel/client/models/user_service_user_state.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_email_request.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_email_response.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_invite_code_request.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_invite_code_response.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_phone_request.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_phone_response.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb delete mode 100644 lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb delete mode 100644 lib/zitadel/client/models/zitadelobjectv2_organization.rb delete mode 100644 lib/zitadel/client/models/zitadelorgv2_organization.rb diff --git a/lib/zitadel/client/api/feature_service_api.rb b/lib/zitadel/client/api/feature_service_api.rb deleted file mode 100644 index 196dc15e..00000000 --- a/lib/zitadel/client/api/feature_service_api.rb +++ /dev/null @@ -1,783 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class FeatureServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get Instance Features - # Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :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. - # @return [FeatureServiceGetInstanceFeaturesResponse] - def feature_service_get_instance_features(opts = {}) - data, _status_code, _headers = feature_service_get_instance_features_with_http_info(opts) - data - end - - # Get Instance Features - # Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :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. - # @return [Array<(FeatureServiceGetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceGetInstanceFeaturesResponse data, response status code and response headers - def feature_service_get_instance_features_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_instance_features ...' # MODIFIED - end - # resource path - local_var_path = '/v2/features/instance' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'inheritance'] = opts[:'inheritance'] if !opts[:'inheritance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceGetInstanceFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_get_instance_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :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. - # @return [FeatureServiceGetOrganizationFeaturesResponse] - def feature_service_get_organization_features(organization_id, opts = {}) - data, _status_code, _headers = feature_service_get_organization_features_with_http_info(organization_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :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. - # @return [Array<(FeatureServiceGetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceGetOrganizationFeaturesResponse data, response status code and response headers - def feature_service_get_organization_features_with_http_info(organization_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_organization_features ...' # MODIFIED - end - # verify the required parameter 'organization_id' is set - if @api_client.config.client_side_validation && organization_id.nil? - fail ArgumentError, "Missing the required parameter 'organization_id' when calling Api::FeatureServiceApi.feature_service_get_organization_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/organization/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'inheritance'] = opts[:'inheritance'] if !opts[:'inheritance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceGetOrganizationFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_get_organization_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get System Features - # Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none - # @param [Hash] opts the optional parameters - # @return [FeatureServiceGetSystemFeaturesResponse] - def feature_service_get_system_features(opts = {}) - data, _status_code, _headers = feature_service_get_system_features_with_http_info(opts) - data - end - - # Get System Features - # Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceGetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceGetSystemFeaturesResponse data, response status code and response headers - def feature_service_get_system_features_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_system_features ...' # MODIFIED - end - # resource path - local_var_path = '/v2/features/system' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceGetSystemFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_get_system_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :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. - # @return [FeatureServiceGetUserFeaturesResponse] - def feature_service_get_user_features(user_id, opts = {}) - data, _status_code, _headers = feature_service_get_user_features_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :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. - # @return [Array<(FeatureServiceGetUserFeaturesResponse, Integer, Hash)>] FeatureServiceGetUserFeaturesResponse data, response status code and response headers - def feature_service_get_user_features_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_user_features ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::FeatureServiceApi.feature_service_get_user_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/user/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'inheritance'] = opts[:'inheritance'] if !opts[:'inheritance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceGetUserFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_get_user_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Reset Instance Features - # Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete - # @param [Hash] opts the optional parameters - # @return [FeatureServiceResetInstanceFeaturesResponse] - def feature_service_reset_instance_features(opts = {}) - data, _status_code, _headers = feature_service_reset_instance_features_with_http_info(opts) - data - end - - # Reset Instance Features - # Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceResetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceResetInstanceFeaturesResponse data, response status code and response headers - def feature_service_reset_instance_features_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_instance_features ...' # MODIFIED - end - # resource path - local_var_path = '/v2/features/instance' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceResetInstanceFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_reset_instance_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Reset Organization Features - # Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete - # @param organization_id [String] - # @param [Hash] opts the optional parameters - # @return [FeatureServiceResetOrganizationFeaturesResponse] - def feature_service_reset_organization_features(organization_id, opts = {}) - data, _status_code, _headers = feature_service_reset_organization_features_with_http_info(organization_id, opts) - data - end - - # Reset Organization Features - # Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete - # @param organization_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceResetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceResetOrganizationFeaturesResponse data, response status code and response headers - def feature_service_reset_organization_features_with_http_info(organization_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_organization_features ...' # MODIFIED - end - # verify the required parameter 'organization_id' is set - if @api_client.config.client_side_validation && organization_id.nil? - fail ArgumentError, "Missing the required parameter 'organization_id' when calling Api::FeatureServiceApi.feature_service_reset_organization_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/organization/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceResetOrganizationFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_reset_organization_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Reset System Features - # Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete - # @param [Hash] opts the optional parameters - # @return [FeatureServiceResetSystemFeaturesResponse] - def feature_service_reset_system_features(opts = {}) - data, _status_code, _headers = feature_service_reset_system_features_with_http_info(opts) - data - end - - # Reset System Features - # Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceResetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceResetSystemFeaturesResponse data, response status code and response headers - def feature_service_reset_system_features_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_system_features ...' # MODIFIED - end - # resource path - local_var_path = '/v2/features/system' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceResetSystemFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_reset_system_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Reset User Features - # Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [FeatureServiceResetUserFeaturesResponse] - def feature_service_reset_user_features(user_id, opts = {}) - data, _status_code, _headers = feature_service_reset_user_features_with_http_info(user_id, opts) - data - end - - # Reset User Features - # Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceResetUserFeaturesResponse, Integer, Hash)>] FeatureServiceResetUserFeaturesResponse data, response status code and response headers - def feature_service_reset_user_features_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_user_features ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::FeatureServiceApi.feature_service_reset_user_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/user/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceResetUserFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_reset_user_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [FeatureServiceSetInstanceFeaturesRequest] - # @param [Hash] opts the optional parameters - # @return [FeatureServiceSetInstanceFeaturesResponse] - def feature_service_set_instance_features(feature_service_set_instance_features_request, opts = {}) - data, _status_code, _headers = feature_service_set_instance_features_with_http_info(feature_service_set_instance_features_request, opts) - data - end - - # 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 [FeatureServiceSetInstanceFeaturesRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceSetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceSetInstanceFeaturesResponse data, response status code and response headers - def feature_service_set_instance_features_with_http_info(feature_service_set_instance_features_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_instance_features ...' # MODIFIED - end - # verify the required parameter 'feature_service_set_instance_features_request' is set - if @api_client.config.client_side_validation && feature_service_set_instance_features_request.nil? - fail ArgumentError, "Missing the required parameter 'feature_service_set_instance_features_request' when calling Api::FeatureServiceApi.feature_service_set_instance_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/instance' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(feature_service_set_instance_features_request) - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceSetInstanceFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_set_instance_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [FeatureServiceSetOrganizationFeaturesResponse] - def feature_service_set_organization_features(organization_id, opts = {}) - data, _status_code, _headers = feature_service_set_organization_features_with_http_info(organization_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceSetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceSetOrganizationFeaturesResponse data, response status code and response headers - def feature_service_set_organization_features_with_http_info(organization_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_organization_features ...' # MODIFIED - end - # verify the required parameter 'organization_id' is set - if @api_client.config.client_side_validation && organization_id.nil? - fail ArgumentError, "Missing the required parameter 'organization_id' when calling Api::FeatureServiceApi.feature_service_set_organization_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/organization/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceSetOrganizationFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_set_organization_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [FeatureServiceSetSystemFeaturesRequest] - # @param [Hash] opts the optional parameters - # @return [FeatureServiceSetSystemFeaturesResponse] - def feature_service_set_system_features(feature_service_set_system_features_request, opts = {}) - data, _status_code, _headers = feature_service_set_system_features_with_http_info(feature_service_set_system_features_request, opts) - data - end - - # 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 [FeatureServiceSetSystemFeaturesRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceSetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceSetSystemFeaturesResponse data, response status code and response headers - def feature_service_set_system_features_with_http_info(feature_service_set_system_features_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_system_features ...' # MODIFIED - end - # verify the required parameter 'feature_service_set_system_features_request' is set - if @api_client.config.client_side_validation && feature_service_set_system_features_request.nil? - fail ArgumentError, "Missing the required parameter 'feature_service_set_system_features_request' when calling Api::FeatureServiceApi.feature_service_set_system_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/system' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(feature_service_set_system_features_request) - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceSetSystemFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_set_system_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [FeatureServiceSetUserFeaturesResponse] - def feature_service_set_user_features(user_id, opts = {}) - data, _status_code, _headers = feature_service_set_user_features_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(FeatureServiceSetUserFeaturesResponse, Integer, Hash)>] FeatureServiceSetUserFeaturesResponse data, response status code and response headers - def feature_service_set_user_features_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_user_features ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::FeatureServiceApi.feature_service_set_user_features" # MODIFIED - end - # resource path - local_var_path = '/v2/features/user/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'FeatureServiceSetUserFeaturesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::FeatureServiceApi.feature_service_set_user_features", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/identity_provider_service_api.rb b/lib/zitadel/client/api/identity_provider_service_api.rb deleted file mode 100644 index 422883f6..00000000 --- a/lib/zitadel/client/api/identity_provider_service_api.rb +++ /dev/null @@ -1,85 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class IdentityProviderServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [IdentityProviderServiceGetIDPByIDResponse] - def identity_provider_service_get_idpby_id(id, opts = {}) - data, _status_code, _headers = identity_provider_service_get_idpby_id_with_http_info(id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(IdentityProviderServiceGetIDPByIDResponse, Integer, Hash)>] IdentityProviderServiceGetIDPByIDResponse data, response status code and response headers - def identity_provider_service_get_idpby_id_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::IdentityProviderServiceApi.identity_provider_service_get_idpby_id ...' # MODIFIED - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling Api::IdentityProviderServiceApi.identity_provider_service_get_idpby_id" # MODIFIED - end - # resource path - local_var_path = '/v2/idps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'IdentityProviderServiceGetIDPByIDResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::IdentityProviderServiceApi.identity_provider_service_get_idpby_id", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::IdentityProviderServiceApi#identity_provider_service_get_idpby_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/o_i_d_c_service_api.rb b/lib/zitadel/client/api/o_i_d_c_service_api.rb deleted file mode 100644 index 419e1e01..00000000 --- a/lib/zitadel/client/api/o_i_d_c_service_api.rb +++ /dev/null @@ -1,296 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class OIDCServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Authorize or deny device authorization - # Authorize or deny the device authorization request based on the provided device authorization id. - # @param device_authorization_id [String] The device authorization id returned when submitting the user code. - # @param oidc_service_authorize_or_deny_device_authorization_request [OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest] - # @param [Hash] opts the optional parameters - # @return [Object] - def o_idc_service_authorize_or_deny_device_authorization(device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, opts = {}) - data, _status_code, _headers = o_idc_service_authorize_or_deny_device_authorization_with_http_info(device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, opts) - data - end - - # Authorize or deny device authorization - # Authorize or deny the device authorization request based on the provided device authorization id. - # @param device_authorization_id [String] The device authorization id returned when submitting the user code. - # @param oidc_service_authorize_or_deny_device_authorization_request [OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers - def o_idc_service_authorize_or_deny_device_authorization_with_http_info(device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization ...' # MODIFIED - end - # verify the required parameter 'device_authorization_id' is set - if @api_client.config.client_side_validation && device_authorization_id.nil? - fail ArgumentError, "Missing the required parameter 'device_authorization_id' when calling Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization" # MODIFIED - end - # verify the required parameter 'oidc_service_authorize_or_deny_device_authorization_request' is set - if @api_client.config.client_side_validation && oidc_service_authorize_or_deny_device_authorization_request.nil? - fail ArgumentError, "Missing the required parameter 'oidc_service_authorize_or_deny_device_authorization_request' when calling Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization" # MODIFIED - end - # resource path - local_var_path = '/v2/oidc/device_authorization/{deviceAuthorizationId}'.sub('{' + 'deviceAuthorizationId' + '}', CGI.escape(device_authorization_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(oidc_service_authorize_or_deny_device_authorization_request) - - # return_type - return_type = opts[:debug_return_type] || 'Object' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_authorize_or_deny_device_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Finalize an Auth Request and get the callback URL. - # Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. - # @param auth_request_id [String] ID of the Auth Request. - # @param oidc_service_create_callback_request [OIDCServiceCreateCallbackRequest] - # @param [Hash] opts the optional parameters - # @return [OIDCServiceCreateCallbackResponse] - def o_idc_service_create_callback(auth_request_id, oidc_service_create_callback_request, opts = {}) - data, _status_code, _headers = o_idc_service_create_callback_with_http_info(auth_request_id, oidc_service_create_callback_request, opts) - data - end - - # Finalize an Auth Request and get the callback URL. - # Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. - # @param auth_request_id [String] ID of the Auth Request. - # @param oidc_service_create_callback_request [OIDCServiceCreateCallbackRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(OIDCServiceCreateCallbackResponse, Integer, Hash)>] OIDCServiceCreateCallbackResponse data, response status code and response headers - def o_idc_service_create_callback_with_http_info(auth_request_id, oidc_service_create_callback_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_create_callback ...' # MODIFIED - end - # verify the required parameter 'auth_request_id' is set - if @api_client.config.client_side_validation && auth_request_id.nil? - fail ArgumentError, "Missing the required parameter 'auth_request_id' when calling Api::OIDCServiceApi.o_idc_service_create_callback" # MODIFIED - end - # verify the required parameter 'oidc_service_create_callback_request' is set - if @api_client.config.client_side_validation && oidc_service_create_callback_request.nil? - fail ArgumentError, "Missing the required parameter 'oidc_service_create_callback_request' when calling Api::OIDCServiceApi.o_idc_service_create_callback" # MODIFIED - end - # resource path - local_var_path = '/v2/oidc/auth_requests/{authRequestId}'.sub('{' + 'authRequestId' + '}', CGI.escape(auth_request_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(oidc_service_create_callback_request) - - # return_type - return_type = opts[:debug_return_type] || 'OIDCServiceCreateCallbackResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::OIDCServiceApi.o_idc_service_create_callback", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_create_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get OIDC Auth Request details - # Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. - # @param auth_request_id [String] ID of the Auth Request, as obtained from the redirect URL. - # @param [Hash] opts the optional parameters - # @return [OIDCServiceGetAuthRequestResponse] - def o_idc_service_get_auth_request(auth_request_id, opts = {}) - data, _status_code, _headers = o_idc_service_get_auth_request_with_http_info(auth_request_id, opts) - data - end - - # Get OIDC Auth Request details - # Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. - # @param auth_request_id [String] ID of the Auth Request, as obtained from the redirect URL. - # @param [Hash] opts the optional parameters - # @return [Array<(OIDCServiceGetAuthRequestResponse, Integer, Hash)>] OIDCServiceGetAuthRequestResponse data, response status code and response headers - def o_idc_service_get_auth_request_with_http_info(auth_request_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_get_auth_request ...' # MODIFIED - end - # verify the required parameter 'auth_request_id' is set - if @api_client.config.client_side_validation && auth_request_id.nil? - fail ArgumentError, "Missing the required parameter 'auth_request_id' when calling Api::OIDCServiceApi.o_idc_service_get_auth_request" # MODIFIED - end - # resource path - local_var_path = '/v2/oidc/auth_requests/{authRequestId}'.sub('{' + 'authRequestId' + '}', CGI.escape(auth_request_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'OIDCServiceGetAuthRequestResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::OIDCServiceApi.o_idc_service_get_auth_request", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_get_auth_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] The user_code returned by the device authorization request and provided to the user by the device. - # @param [Hash] opts the optional parameters - # @return [OIDCServiceGetDeviceAuthorizationRequestResponse] - def o_idc_service_get_device_authorization_request(user_code, opts = {}) - data, _status_code, _headers = o_idc_service_get_device_authorization_request_with_http_info(user_code, opts) - data - end - - # 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 [String] The user_code returned by the device authorization request and provided to the user by the device. - # @param [Hash] opts the optional parameters - # @return [Array<(OIDCServiceGetDeviceAuthorizationRequestResponse, Integer, Hash)>] OIDCServiceGetDeviceAuthorizationRequestResponse data, response status code and response headers - def o_idc_service_get_device_authorization_request_with_http_info(user_code, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_get_device_authorization_request ...' # MODIFIED - end - # verify the required parameter 'user_code' is set - if @api_client.config.client_side_validation && user_code.nil? - fail ArgumentError, "Missing the required parameter 'user_code' when calling Api::OIDCServiceApi.o_idc_service_get_device_authorization_request" # MODIFIED - end - # resource path - local_var_path = '/v2/oidc/device_authorization/{userCode}'.sub('{' + 'userCode' + '}', CGI.escape(user_code.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'OIDCServiceGetDeviceAuthorizationRequestResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::OIDCServiceApi.o_idc_service_get_device_authorization_request", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_get_device_authorization_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/organization_service_api.rb b/lib/zitadel/client/api/organization_service_api.rb deleted file mode 100644 index 4eac7354..00000000 --- a/lib/zitadel/client/api/organization_service_api.rb +++ /dev/null @@ -1,158 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class OrganizationServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # 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 [OrganizationServiceAddOrganizationRequest] - # @param [Hash] opts the optional parameters - # @return [OrganizationServiceAddOrganizationResponse] - def organization_service_add_organization(organization_service_add_organization_request, opts = {}) - data, _status_code, _headers = organization_service_add_organization_with_http_info(organization_service_add_organization_request, opts) - data - end - - # 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 [OrganizationServiceAddOrganizationRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(OrganizationServiceAddOrganizationResponse, Integer, Hash)>] OrganizationServiceAddOrganizationResponse data, response status code and response headers - def organization_service_add_organization_with_http_info(organization_service_add_organization_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::OrganizationServiceApi.organization_service_add_organization ...' # MODIFIED - end - # verify the required parameter 'organization_service_add_organization_request' is set - if @api_client.config.client_side_validation && organization_service_add_organization_request.nil? - fail ArgumentError, "Missing the required parameter 'organization_service_add_organization_request' when calling Api::OrganizationServiceApi.organization_service_add_organization" # MODIFIED - end - # resource path - local_var_path = '/v2/organizations' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_service_add_organization_request) - - # return_type - return_type = opts[:debug_return_type] || 'OrganizationServiceAddOrganizationResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::OrganizationServiceApi.organization_service_add_organization", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::OrganizationServiceApi#organization_service_add_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [OrganizationServiceListOrganizationsRequest] - # @param [Hash] opts the optional parameters - # @return [OrganizationServiceListOrganizationsResponse] - def organization_service_list_organizations(organization_service_list_organizations_request, opts = {}) - data, _status_code, _headers = organization_service_list_organizations_with_http_info(organization_service_list_organizations_request, opts) - data - end - - # 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 [OrganizationServiceListOrganizationsRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(OrganizationServiceListOrganizationsResponse, Integer, Hash)>] OrganizationServiceListOrganizationsResponse data, response status code and response headers - def organization_service_list_organizations_with_http_info(organization_service_list_organizations_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::OrganizationServiceApi.organization_service_list_organizations ...' # MODIFIED - end - # verify the required parameter 'organization_service_list_organizations_request' is set - if @api_client.config.client_side_validation && organization_service_list_organizations_request.nil? - fail ArgumentError, "Missing the required parameter 'organization_service_list_organizations_request' when calling Api::OrganizationServiceApi.organization_service_list_organizations" # MODIFIED - end - # resource path - local_var_path = '/v2/organizations/_search' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_service_list_organizations_request) - - # return_type - return_type = opts[:debug_return_type] || 'OrganizationServiceListOrganizationsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::OrganizationServiceApi.organization_service_list_organizations", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::OrganizationServiceApi#organization_service_list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/s_a_m_l_service_api.rb b/lib/zitadel/client/api/s_a_m_l_service_api.rb deleted file mode 100644 index 2b745b9e..00000000 --- a/lib/zitadel/client/api/s_a_m_l_service_api.rb +++ /dev/null @@ -1,159 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class SAMLServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Finalize a SAML Request and get the response. - # Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request. - # @param saml_request_id [String] ID of the SAML Request. - # @param saml_service_create_response_request [SAMLServiceCreateResponseRequest] - # @param [Hash] opts the optional parameters - # @return [SAMLServiceCreateResponseResponse] - def s_aml_service_create_response(saml_request_id, saml_service_create_response_request, opts = {}) - data, _status_code, _headers = s_aml_service_create_response_with_http_info(saml_request_id, saml_service_create_response_request, opts) - data - end - - # Finalize a SAML Request and get the response. - # Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request. - # @param saml_request_id [String] ID of the SAML Request. - # @param saml_service_create_response_request [SAMLServiceCreateResponseRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(SAMLServiceCreateResponseResponse, Integer, Hash)>] SAMLServiceCreateResponseResponse data, response status code and response headers - def s_aml_service_create_response_with_http_info(saml_request_id, saml_service_create_response_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SAMLServiceApi.s_aml_service_create_response ...' # MODIFIED - end - # verify the required parameter 'saml_request_id' is set - if @api_client.config.client_side_validation && saml_request_id.nil? - fail ArgumentError, "Missing the required parameter 'saml_request_id' when calling Api::SAMLServiceApi.s_aml_service_create_response" # MODIFIED - end - # verify the required parameter 'saml_service_create_response_request' is set - if @api_client.config.client_side_validation && saml_service_create_response_request.nil? - fail ArgumentError, "Missing the required parameter 'saml_service_create_response_request' when calling Api::SAMLServiceApi.s_aml_service_create_response" # MODIFIED - end - # resource path - local_var_path = '/v2/saml/saml_requests/{samlRequestId}'.sub('{' + 'samlRequestId' + '}', CGI.escape(saml_request_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(saml_service_create_response_request) - - # return_type - return_type = opts[:debug_return_type] || 'SAMLServiceCreateResponseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SAMLServiceApi.s_aml_service_create_response", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SAMLServiceApi#s_aml_service_create_response\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get SAML Request details - # Get SAML Request details by ID. Returns details that are parsed from the application's SAML Request. - # @param saml_request_id [String] ID of the SAML Request, as obtained from the redirect URL. - # @param [Hash] opts the optional parameters - # @return [SAMLServiceGetSAMLRequestResponse] - def s_aml_service_get_saml_request(saml_request_id, opts = {}) - data, _status_code, _headers = s_aml_service_get_saml_request_with_http_info(saml_request_id, opts) - data - end - - # Get SAML Request details - # Get SAML Request details by ID. Returns details that are parsed from the application's SAML Request. - # @param saml_request_id [String] ID of the SAML Request, as obtained from the redirect URL. - # @param [Hash] opts the optional parameters - # @return [Array<(SAMLServiceGetSAMLRequestResponse, Integer, Hash)>] SAMLServiceGetSAMLRequestResponse data, response status code and response headers - def s_aml_service_get_saml_request_with_http_info(saml_request_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SAMLServiceApi.s_aml_service_get_saml_request ...' # MODIFIED - end - # verify the required parameter 'saml_request_id' is set - if @api_client.config.client_side_validation && saml_request_id.nil? - fail ArgumentError, "Missing the required parameter 'saml_request_id' when calling Api::SAMLServiceApi.s_aml_service_get_saml_request" # MODIFIED - end - # resource path - local_var_path = '/v2/saml/saml_requests/{samlRequestId}'.sub('{' + 'samlRequestId' + '}', CGI.escape(saml_request_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SAMLServiceGetSAMLRequestResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SAMLServiceApi.s_aml_service_get_saml_request", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SAMLServiceApi#s_aml_service_get_saml_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/session_service_api.rb b/lib/zitadel/client/api/session_service_api.rb deleted file mode 100644 index 0e285a41..00000000 --- a/lib/zitadel/client/api/session_service_api.rb +++ /dev/null @@ -1,372 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class SessionServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Create a new session - # Create a new session. A token will be returned, which is required for further updates of the session. - # @param session_service_create_session_request [SessionServiceCreateSessionRequest] - # @param [Hash] opts the optional parameters - # @return [SessionServiceCreateSessionResponse] - def session_service_create_session(session_service_create_session_request, opts = {}) - data, _status_code, _headers = session_service_create_session_with_http_info(session_service_create_session_request, opts) - data - end - - # Create a new session - # Create a new session. A token will be returned, which is required for further updates of the session. - # @param session_service_create_session_request [SessionServiceCreateSessionRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(SessionServiceCreateSessionResponse, Integer, Hash)>] SessionServiceCreateSessionResponse data, response status code and response headers - def session_service_create_session_with_http_info(session_service_create_session_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_create_session ...' # MODIFIED - end - # verify the required parameter 'session_service_create_session_request' is set - if @api_client.config.client_side_validation && session_service_create_session_request.nil? - fail ArgumentError, "Missing the required parameter 'session_service_create_session_request' when calling Api::SessionServiceApi.session_service_create_session" # MODIFIED - end - # resource path - local_var_path = '/v2/sessions' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_create_session_request) - - # return_type - return_type = opts[:debug_return_type] || 'SessionServiceCreateSessionResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SessionServiceApi.session_service_create_session", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Terminate an existing session - # Terminate your own session or if granted any other session. - # @param session_id [String] \"id of the session to terminate\" - # @param session_service_delete_session_request [SessionServiceDeleteSessionRequest] - # @param [Hash] opts the optional parameters - # @return [SessionServiceDeleteSessionResponse] - def session_service_delete_session(session_id, session_service_delete_session_request, opts = {}) - data, _status_code, _headers = session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts) - data - end - - # Terminate an existing session - # Terminate your own session or if granted any other session. - # @param session_id [String] \"id of the session to terminate\" - # @param session_service_delete_session_request [SessionServiceDeleteSessionRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(SessionServiceDeleteSessionResponse, Integer, Hash)>] SessionServiceDeleteSessionResponse data, response status code and response headers - def session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_delete_session ...' # MODIFIED - end - # verify the required parameter 'session_id' is set - if @api_client.config.client_side_validation && session_id.nil? - fail ArgumentError, "Missing the required parameter 'session_id' when calling Api::SessionServiceApi.session_service_delete_session" # MODIFIED - end - # verify the required parameter 'session_service_delete_session_request' is set - if @api_client.config.client_side_validation && session_service_delete_session_request.nil? - fail ArgumentError, "Missing the required parameter 'session_service_delete_session_request' when calling Api::SessionServiceApi.session_service_delete_session" # MODIFIED - end - # resource path - local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_delete_session_request) - - # return_type - return_type = opts[:debug_return_type] || 'SessionServiceDeleteSessionResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SessionServiceApi.session_service_delete_session", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_delete_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get a session - # Get a session and all its information like the time of the user or password verification - # @param session_id [String] - # @param [Hash] opts the optional parameters - # @option opts [String] :session_token - # @return [SessionServiceGetSessionResponse] - def session_service_get_session(session_id, opts = {}) - data, _status_code, _headers = session_service_get_session_with_http_info(session_id, opts) - data - end - - # Get a session - # Get a session and all its information like the time of the user or password verification - # @param session_id [String] - # @param [Hash] opts the optional parameters - # @option opts [String] :session_token - # @return [Array<(SessionServiceGetSessionResponse, Integer, Hash)>] SessionServiceGetSessionResponse data, response status code and response headers - def session_service_get_session_with_http_info(session_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_get_session ...' # MODIFIED - end - # verify the required parameter 'session_id' is set - if @api_client.config.client_side_validation && session_id.nil? - fail ArgumentError, "Missing the required parameter 'session_id' when calling Api::SessionServiceApi.session_service_get_session" # MODIFIED - end - # resource path - local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'sessionToken'] = opts[:'session_token'] if !opts[:'session_token'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SessionServiceGetSessionResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SessionServiceApi.session_service_get_session", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Search sessions - # Search for sessions - # @param session_service_list_sessions_request [SessionServiceListSessionsRequest] - # @param [Hash] opts the optional parameters - # @return [SessionServiceListSessionsResponse] - def session_service_list_sessions(session_service_list_sessions_request, opts = {}) - data, _status_code, _headers = session_service_list_sessions_with_http_info(session_service_list_sessions_request, opts) - data - end - - # Search sessions - # Search for sessions - # @param session_service_list_sessions_request [SessionServiceListSessionsRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(SessionServiceListSessionsResponse, Integer, Hash)>] SessionServiceListSessionsResponse data, response status code and response headers - def session_service_list_sessions_with_http_info(session_service_list_sessions_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_list_sessions ...' # MODIFIED - end - # verify the required parameter 'session_service_list_sessions_request' is set - if @api_client.config.client_side_validation && session_service_list_sessions_request.nil? - fail ArgumentError, "Missing the required parameter 'session_service_list_sessions_request' when calling Api::SessionServiceApi.session_service_list_sessions" # MODIFIED - end - # resource path - local_var_path = '/v2/sessions/search' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_list_sessions_request) - - # return_type - return_type = opts[:debug_return_type] || 'SessionServiceListSessionsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SessionServiceApi.session_service_list_sessions", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Update an existing session - # Update an existing session with new information. - # @param session_id [String] \"id of the session to update\" - # @param session_service_set_session_request [SessionServiceSetSessionRequest] - # @param [Hash] opts the optional parameters - # @return [SessionServiceSetSessionResponse] - def session_service_set_session(session_id, session_service_set_session_request, opts = {}) - data, _status_code, _headers = session_service_set_session_with_http_info(session_id, session_service_set_session_request, opts) - data - end - - # Update an existing session - # Update an existing session with new information. - # @param session_id [String] \"id of the session to update\" - # @param session_service_set_session_request [SessionServiceSetSessionRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(SessionServiceSetSessionResponse, Integer, Hash)>] SessionServiceSetSessionResponse data, response status code and response headers - def session_service_set_session_with_http_info(session_id, session_service_set_session_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_set_session ...' # MODIFIED - end - # verify the required parameter 'session_id' is set - if @api_client.config.client_side_validation && session_id.nil? - fail ArgumentError, "Missing the required parameter 'session_id' when calling Api::SessionServiceApi.session_service_set_session" # MODIFIED - end - # verify the required parameter 'session_service_set_session_request' is set - if @api_client.config.client_side_validation && session_service_set_session_request.nil? - fail ArgumentError, "Missing the required parameter 'session_service_set_session_request' when calling Api::SessionServiceApi.session_service_set_session" # MODIFIED - end - # resource path - local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_set_session_request) - - # return_type - return_type = opts[:debug_return_type] || 'SessionServiceSetSessionResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SessionServiceApi.session_service_set_session", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_set_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/settings_api.rb b/lib/zitadel/client/api/settings_api.rb deleted file mode 100644 index 68086a96..00000000 --- a/lib/zitadel/client/api/settings_api.rb +++ /dev/null @@ -1,147 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class SettingsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get Security Settings - # Returns the security settings of the ZITADEL instance. - # @param [Hash] opts the optional parameters - # @return [SettingsServiceGetSecuritySettingsResponse] - def settings_service_get_security_settings(opts = {}) - data, _status_code, _headers = settings_service_get_security_settings_with_http_info(opts) - data - end - - # Get Security Settings - # Returns the security settings of the ZITADEL instance. - # @param [Hash] opts the optional parameters - # @return [Array<(SettingsServiceGetSecuritySettingsResponse, Integer, Hash)>] SettingsServiceGetSecuritySettingsResponse data, response status code and response headers - def settings_service_get_security_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsApi.settings_service_get_security_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/security' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetSecuritySettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsApi.settings_service_get_security_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsApi#settings_service_get_security_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Set Security Settings - # Set the security settings of the ZITADEL instance. - # @param settings_service_set_security_settings_request [SettingsServiceSetSecuritySettingsRequest] - # @param [Hash] opts the optional parameters - # @return [SettingsServiceSetSecuritySettingsResponse] - def settings_service_set_security_settings(settings_service_set_security_settings_request, opts = {}) - data, _status_code, _headers = settings_service_set_security_settings_with_http_info(settings_service_set_security_settings_request, opts) - data - end - - # Set Security Settings - # Set the security settings of the ZITADEL instance. - # @param settings_service_set_security_settings_request [SettingsServiceSetSecuritySettingsRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(SettingsServiceSetSecuritySettingsResponse, Integer, Hash)>] SettingsServiceSetSecuritySettingsResponse data, response status code and response headers - def settings_service_set_security_settings_with_http_info(settings_service_set_security_settings_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsApi.settings_service_set_security_settings ...' # MODIFIED - end - # verify the required parameter 'settings_service_set_security_settings_request' is set - if @api_client.config.client_side_validation && settings_service_set_security_settings_request.nil? - fail ArgumentError, "Missing the required parameter 'settings_service_set_security_settings_request' when calling Api::SettingsApi.settings_service_set_security_settings" # MODIFIED - end - # resource path - local_var_path = '/v2/policies/security' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(settings_service_set_security_settings_request) - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceSetSecuritySettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsApi.settings_service_set_security_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsApi#settings_service_set_security_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/settings_service_api.rb b/lib/zitadel/client/api/settings_service_api.rb deleted file mode 100644 index 09b902bd..00000000 --- a/lib/zitadel/client/api/settings_service_api.rb +++ /dev/null @@ -1,595 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class SettingsServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get the current active identity providers - # Return the current active identity providers for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @option opts [Boolean] :creation_allowed - # @option opts [Boolean] :linking_allowed - # @option opts [Boolean] :auto_creation - # @option opts [Boolean] :auto_linking - # @return [SettingsServiceGetActiveIdentityProvidersResponse] - def settings_service_get_active_identity_providers(opts = {}) - data, _status_code, _headers = settings_service_get_active_identity_providers_with_http_info(opts) - data - end - - # Get the current active identity providers - # Return the current active identity providers for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @option opts [Boolean] :creation_allowed - # @option opts [Boolean] :linking_allowed - # @option opts [Boolean] :auto_creation - # @option opts [Boolean] :auto_linking - # @return [Array<(SettingsServiceGetActiveIdentityProvidersResponse, Integer, Hash)>] SettingsServiceGetActiveIdentityProvidersResponse data, response status code and response headers - def settings_service_get_active_identity_providers_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_active_identity_providers ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/login/idps' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - query_params[:'creationAllowed'] = opts[:'creation_allowed'] if !opts[:'creation_allowed'].nil? - query_params[:'linkingAllowed'] = opts[:'linking_allowed'] if !opts[:'linking_allowed'].nil? - query_params[:'autoCreation'] = opts[:'auto_creation'] if !opts[:'auto_creation'].nil? - query_params[:'autoLinking'] = opts[:'auto_linking'] if !opts[:'auto_linking'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetActiveIdentityProvidersResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_active_identity_providers", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_active_identity_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get the current active branding settings - # Return the current active branding settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [SettingsServiceGetBrandingSettingsResponse] - def settings_service_get_branding_settings(opts = {}) - data, _status_code, _headers = settings_service_get_branding_settings_with_http_info(opts) - data - end - - # Get the current active branding settings - # Return the current active branding settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [Array<(SettingsServiceGetBrandingSettingsResponse, Integer, Hash)>] SettingsServiceGetBrandingSettingsResponse data, response status code and response headers - def settings_service_get_branding_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_branding_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/branding' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetBrandingSettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_branding_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_branding_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get the domain settings - # Return the domain settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [SettingsServiceGetDomainSettingsResponse] - def settings_service_get_domain_settings(opts = {}) - data, _status_code, _headers = settings_service_get_domain_settings_with_http_info(opts) - data - end - - # Get the domain settings - # Return the domain settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [Array<(SettingsServiceGetDomainSettingsResponse, Integer, Hash)>] SettingsServiceGetDomainSettingsResponse data, response status code and response headers - def settings_service_get_domain_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_domain_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/domain' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetDomainSettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_domain_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_domain_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get basic information over the instance - # Return the basic information of the instance for the requested context - # @param [Hash] opts the optional parameters - # @return [SettingsServiceGetGeneralSettingsResponse] - def settings_service_get_general_settings(opts = {}) - data, _status_code, _headers = settings_service_get_general_settings_with_http_info(opts) - data - end - - # Get basic information over the instance - # Return the basic information of the instance for the requested context - # @param [Hash] opts the optional parameters - # @return [Array<(SettingsServiceGetGeneralSettingsResponse, Integer, Hash)>] SettingsServiceGetGeneralSettingsResponse data, response status code and response headers - def settings_service_get_general_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_general_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetGeneralSettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_general_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_general_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get the legal and support settings - # Return the legal settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [SettingsServiceGetLegalAndSupportSettingsResponse] - def settings_service_get_legal_and_support_settings(opts = {}) - data, _status_code, _headers = settings_service_get_legal_and_support_settings_with_http_info(opts) - data - end - - # Get the legal and support settings - # Return the legal settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [Array<(SettingsServiceGetLegalAndSupportSettingsResponse, Integer, Hash)>] SettingsServiceGetLegalAndSupportSettingsResponse data, response status code and response headers - def settings_service_get_legal_and_support_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_legal_and_support_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/legal_support' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetLegalAndSupportSettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_legal_and_support_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_legal_and_support_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get the lockout settings - # Return the lockout settings for the requested context, which define when a user will be locked - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [SettingsServiceGetLockoutSettingsResponse] - def settings_service_get_lockout_settings(opts = {}) - data, _status_code, _headers = settings_service_get_lockout_settings_with_http_info(opts) - data - end - - # Get the lockout settings - # Return the lockout settings for the requested context, which define when a user will be locked - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [Array<(SettingsServiceGetLockoutSettingsResponse, Integer, Hash)>] SettingsServiceGetLockoutSettingsResponse data, response status code and response headers - def settings_service_get_lockout_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_lockout_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/lockout' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetLockoutSettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_lockout_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_lockout_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get the login settings - # Return the settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [SettingsServiceGetLoginSettingsResponse] - def settings_service_get_login_settings(opts = {}) - data, _status_code, _headers = settings_service_get_login_settings_with_http_info(opts) - data - end - - # Get the login settings - # Return the settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [Array<(SettingsServiceGetLoginSettingsResponse, Integer, Hash)>] SettingsServiceGetLoginSettingsResponse data, response status code and response headers - def settings_service_get_login_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_login_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/login' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetLoginSettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_login_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_login_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get the password complexity settings - # Return the password complexity settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [SettingsServiceGetPasswordComplexitySettingsResponse] - def settings_service_get_password_complexity_settings(opts = {}) - data, _status_code, _headers = settings_service_get_password_complexity_settings_with_http_info(opts) - data - end - - # Get the password complexity settings - # Return the password complexity settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [Array<(SettingsServiceGetPasswordComplexitySettingsResponse, Integer, Hash)>] SettingsServiceGetPasswordComplexitySettingsResponse data, response status code and response headers - def settings_service_get_password_complexity_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_password_complexity_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/password/complexity' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetPasswordComplexitySettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_password_complexity_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_password_complexity_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Get the password expiry settings - # Return the password expiry settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [SettingsServiceGetPasswordExpirySettingsResponse] - def settings_service_get_password_expiry_settings(opts = {}) - data, _status_code, _headers = settings_service_get_password_expiry_settings_with_http_info(opts) - data - end - - # Get the password expiry settings - # Return the password expiry settings for the requested context - # @param [Hash] opts the optional parameters - # @option opts [String] :ctx_org_id - # @option opts [Boolean] :ctx_instance - # @return [Array<(SettingsServiceGetPasswordExpirySettingsResponse, Integer, Hash)>] SettingsServiceGetPasswordExpirySettingsResponse data, response status code and response headers - def settings_service_get_password_expiry_settings_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_password_expiry_settings ...' # MODIFIED - end - # resource path - local_var_path = '/v2/settings/password/expiry' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? - query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SettingsServiceGetPasswordExpirySettingsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::SettingsServiceApi.settings_service_get_password_expiry_settings", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_password_expiry_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/api/user_service_api.rb b/lib/zitadel/client/api/user_service_api.rb deleted file mode 100644 index 9b0b94fe..00000000 --- a/lib/zitadel/client/api/user_service_api.rb +++ /dev/null @@ -1,3210 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'cgi' - -module Zitadel::Client::Api - class UserServiceApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # 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 [UserServiceAddHumanUserRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceAddHumanUserResponse] - def user_service_add_human_user(user_service_add_human_user_request, opts = {}) - data, _status_code, _headers = user_service_add_human_user_with_http_info(user_service_add_human_user_request, opts) - data - end - - # 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 [UserServiceAddHumanUserRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceAddHumanUserResponse, Integer, Hash)>] UserServiceAddHumanUserResponse data, response status code and response headers - def user_service_add_human_user_with_http_info(user_service_add_human_user_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_human_user ...' # MODIFIED - end - # verify the required parameter 'user_service_add_human_user_request' is set - if @api_client.config.client_side_validation && user_service_add_human_user_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_add_human_user_request' when calling Api::UserServiceApi.user_service_add_human_user" # MODIFIED - end - # resource path - local_var_path = '/v2/users/human' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_add_human_user_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceAddHumanUserResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_add_human_user", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Add link to an identity provider to an user - # Add link to an identity provider to an user.. - # @param user_id [String] - # @param user_service_add_idp_link_request [UserServiceAddIDPLinkRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceAddIDPLinkResponse] - def user_service_add_idp_link(user_id, user_service_add_idp_link_request, opts = {}) - data, _status_code, _headers = user_service_add_idp_link_with_http_info(user_id, user_service_add_idp_link_request, opts) - data - end - - # Add link to an identity provider to an user - # Add link to an identity provider to an user.. - # @param user_id [String] - # @param user_service_add_idp_link_request [UserServiceAddIDPLinkRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceAddIDPLinkResponse, Integer, Hash)>] UserServiceAddIDPLinkResponse data, response status code and response headers - def user_service_add_idp_link_with_http_info(user_id, user_service_add_idp_link_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_idp_link ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_add_idp_link" # MODIFIED - end - # verify the required parameter 'user_service_add_idp_link_request' is set - if @api_client.config.client_side_validation && user_service_add_idp_link_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_add_idp_link_request' when calling Api::UserServiceApi.user_service_add_idp_link" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/links'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_add_idp_link_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceAddIDPLinkResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_add_idp_link", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_idp_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceAddOTPEmailResponse] - def user_service_add_otp_email(user_id, opts = {}) - data, _status_code, _headers = user_service_add_otp_email_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceAddOTPEmailResponse, Integer, Hash)>] UserServiceAddOTPEmailResponse data, response status code and response headers - def user_service_add_otp_email_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_otp_email ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_add_otp_email" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/otp_email'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceAddOTPEmailResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_add_otp_email", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceAddOTPSMSResponse] - def user_service_add_otpsms(user_id, opts = {}) - data, _status_code, _headers = user_service_add_otpsms_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceAddOTPSMSResponse, Integer, Hash)>] UserServiceAddOTPSMSResponse data, response status code and response headers - def user_service_add_otpsms_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_otpsms ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_add_otpsms" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/otp_sms'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceAddOTPSMSResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_add_otpsms", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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. - # @param user_id [String] - # @param user_service_create_invite_code_request [UserServiceCreateInviteCodeRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceCreateInviteCodeResponse] - def user_service_create_invite_code(user_id, user_service_create_invite_code_request, opts = {}) - data, _status_code, _headers = user_service_create_invite_code_with_http_info(user_id, user_service_create_invite_code_request, opts) - data - end - - # 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. - # @param user_id [String] - # @param user_service_create_invite_code_request [UserServiceCreateInviteCodeRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceCreateInviteCodeResponse, Integer, Hash)>] UserServiceCreateInviteCodeResponse data, response status code and response headers - def user_service_create_invite_code_with_http_info(user_id, user_service_create_invite_code_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_create_invite_code ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_create_invite_code" # MODIFIED - end - # verify the required parameter 'user_service_create_invite_code_request' is set - if @api_client.config.client_side_validation && user_service_create_invite_code_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_create_invite_code_request' when calling Api::UserServiceApi.user_service_create_invite_code" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/invite_code'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_create_invite_code_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceCreateInviteCodeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_create_invite_code", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_create_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param user_service_create_passkey_registration_link_request [UserServiceCreatePasskeyRegistrationLinkRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceCreatePasskeyRegistrationLinkResponse] - def user_service_create_passkey_registration_link(user_id, user_service_create_passkey_registration_link_request, opts = {}) - data, _status_code, _headers = user_service_create_passkey_registration_link_with_http_info(user_id, user_service_create_passkey_registration_link_request, opts) - data - end - - # 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 [String] - # @param user_service_create_passkey_registration_link_request [UserServiceCreatePasskeyRegistrationLinkRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceCreatePasskeyRegistrationLinkResponse, Integer, Hash)>] UserServiceCreatePasskeyRegistrationLinkResponse data, response status code and response headers - def user_service_create_passkey_registration_link_with_http_info(user_id, user_service_create_passkey_registration_link_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_create_passkey_registration_link ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_create_passkey_registration_link" # MODIFIED - end - # verify the required parameter 'user_service_create_passkey_registration_link_request' is set - if @api_client.config.client_side_validation && user_service_create_passkey_registration_link_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_create_passkey_registration_link_request' when calling Api::UserServiceApi.user_service_create_passkey_registration_link" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/passkeys/registration_link'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_create_passkey_registration_link_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceCreatePasskeyRegistrationLinkResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_create_passkey_registration_link", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_create_passkey_registration_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceDeactivateUserResponse] - def user_service_deactivate_user(user_id, opts = {}) - data, _status_code, _headers = user_service_deactivate_user_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceDeactivateUserResponse, Integer, Hash)>] UserServiceDeactivateUserResponse data, response status code and response headers - def user_service_deactivate_user_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_deactivate_user ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_deactivate_user" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/deactivate'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceDeactivateUserResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_deactivate_user", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_deactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceDeleteUserResponse] - def user_service_delete_user(user_id, opts = {}) - data, _status_code, _headers = user_service_delete_user_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceDeleteUserResponse, Integer, Hash)>] UserServiceDeleteUserResponse data, response status code and response headers - def user_service_delete_user_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_delete_user ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_delete_user" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceDeleteUserResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_delete_user", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # User by ID - # Returns the full user object (human or machine) including the profile, email, etc.. - # @param user_id [String] User ID of the user you like to get. - # @param [Hash] opts the optional parameters - # @return [UserServiceGetUserByIDResponse] - def user_service_get_user_by_id(user_id, opts = {}) - data, _status_code, _headers = user_service_get_user_by_id_with_http_info(user_id, opts) - data - end - - # User by ID - # Returns the full user object (human or machine) including the profile, email, etc.. - # @param user_id [String] User ID of the user you like to get. - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceGetUserByIDResponse, Integer, Hash)>] UserServiceGetUserByIDResponse data, response status code and response headers - def user_service_get_user_by_id_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_get_user_by_id ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_get_user_by_id" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceGetUserByIDResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_get_user_by_id", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_get_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # MFA Init Skipped - # Update the last time the user has skipped MFA initialization. The server timestamp is used. - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceHumanMFAInitSkippedResponse] - def user_service_human_mfa_init_skipped(user_id, opts = {}) - data, _status_code, _headers = user_service_human_mfa_init_skipped_with_http_info(user_id, opts) - data - end - - # MFA Init Skipped - # Update the last time the user has skipped MFA initialization. The server timestamp is used. - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceHumanMFAInitSkippedResponse, Integer, Hash)>] UserServiceHumanMFAInitSkippedResponse data, response status code and response headers - def user_service_human_mfa_init_skipped_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_human_mfa_init_skipped ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_human_mfa_init_skipped" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/mfa_init_skipped'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceHumanMFAInitSkippedResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_human_mfa_init_skipped", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_human_mfa_init_skipped\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @option opts [Array] :auth_factors Specify the Auth Factors you are interested in - # @option opts [Array] :states Specify the state of the Auth Factors - # @return [UserServiceListAuthenticationFactorsResponse] - def user_service_list_authentication_factors(user_id, opts = {}) - data, _status_code, _headers = user_service_list_authentication_factors_with_http_info(user_id, opts) - data - end - - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @option opts [Array] :auth_factors Specify the Auth Factors you are interested in - # @option opts [Array] :states Specify the state of the Auth Factors - # @return [Array<(UserServiceListAuthenticationFactorsResponse, Integer, Hash)>] UserServiceListAuthenticationFactorsResponse data, response status code and response headers - def user_service_list_authentication_factors_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_authentication_factors ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_authentication_factors" # MODIFIED - end - allowable_values = ["OTP", "OTP_SMS", "OTP_EMAIL", "U2F"] - if @api_client.config.client_side_validation && opts[:'auth_factors'] && !opts[:'auth_factors'].all? { |item| allowable_values.include?(item) } - fail ArgumentError, "invalid value for \"auth_factors\", must include one of #{allowable_values}" - end - allowable_values = ["AUTH_FACTOR_STATE_UNSPECIFIED", "AUTH_FACTOR_STATE_NOT_READY", "AUTH_FACTOR_STATE_READY", "AUTH_FACTOR_STATE_REMOVED"] - if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) } - fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}" - end - # resource path - local_var_path = '/v2/users/{userId}/authentication_factors/_search'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'authFactors'] = @api_client.build_collection_param(opts[:'auth_factors'], :csv) if !opts[:'auth_factors'].nil? - query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :csv) if !opts[:'states'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceListAuthenticationFactorsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_list_authentication_factors", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_authentication_factors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :domain_query_include_without_domain List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. - # @option opts [String] :domain_query_domain List only auth methods with specific domain. - # @return [UserServiceListAuthenticationMethodTypesResponse] - def user_service_list_authentication_method_types(user_id, opts = {}) - data, _status_code, _headers = user_service_list_authentication_method_types_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :domain_query_include_without_domain List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. - # @option opts [String] :domain_query_domain List only auth methods with specific domain. - # @return [Array<(UserServiceListAuthenticationMethodTypesResponse, Integer, Hash)>] UserServiceListAuthenticationMethodTypesResponse data, response status code and response headers - def user_service_list_authentication_method_types_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_authentication_method_types ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_authentication_method_types" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/authentication_methods'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'domainQuery.includeWithoutDomain'] = opts[:'domain_query_include_without_domain'] if !opts[:'domain_query_include_without_domain'].nil? - query_params[:'domainQuery.domain'] = opts[:'domain_query_domain'] if !opts[:'domain_query_domain'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceListAuthenticationMethodTypesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_list_authentication_method_types", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_authentication_method_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # List links to an identity provider of an user - # List links to an identity provider of an user. - # @param user_id [String] - # @param user_service_list_idp_links_request [UserServiceListIDPLinksRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceListIDPLinksResponse] - def user_service_list_idp_links(user_id, user_service_list_idp_links_request, opts = {}) - data, _status_code, _headers = user_service_list_idp_links_with_http_info(user_id, user_service_list_idp_links_request, opts) - data - end - - # List links to an identity provider of an user - # List links to an identity provider of an user. - # @param user_id [String] - # @param user_service_list_idp_links_request [UserServiceListIDPLinksRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceListIDPLinksResponse, Integer, Hash)>] UserServiceListIDPLinksResponse data, response status code and response headers - def user_service_list_idp_links_with_http_info(user_id, user_service_list_idp_links_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_idp_links ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_idp_links" # MODIFIED - end - # verify the required parameter 'user_service_list_idp_links_request' is set - if @api_client.config.client_side_validation && user_service_list_idp_links_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_list_idp_links_request' when calling Api::UserServiceApi.user_service_list_idp_links" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/links/_search'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_list_idp_links_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceListIDPLinksResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_list_idp_links", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_idp_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # List passkeys of an user - # List passkeys of an user - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceListPasskeysResponse] - def user_service_list_passkeys(user_id, opts = {}) - data, _status_code, _headers = user_service_list_passkeys_with_http_info(user_id, opts) - data - end - - # List passkeys of an user - # List passkeys of an user - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceListPasskeysResponse, Integer, Hash)>] UserServiceListPasskeysResponse data, response status code and response headers - def user_service_list_passkeys_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_passkeys ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_passkeys" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/passkeys/_search'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceListPasskeysResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_list_passkeys", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_passkeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [UserServiceListUsersRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceListUsersResponse] - def user_service_list_users(user_service_list_users_request, opts = {}) - data, _status_code, _headers = user_service_list_users_with_http_info(user_service_list_users_request, opts) - data - end - - # 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 [UserServiceListUsersRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceListUsersResponse, Integer, Hash)>] UserServiceListUsersResponse data, response status code and response headers - def user_service_list_users_with_http_info(user_service_list_users_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_users ...' # MODIFIED - end - # verify the required parameter 'user_service_list_users_request' is set - if @api_client.config.client_side_validation && user_service_list_users_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_list_users_request' when calling Api::UserServiceApi.user_service_list_users" # MODIFIED - end - # resource path - local_var_path = '/v2/users' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_list_users_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceListUsersResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_list_users", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceLockUserResponse] - def user_service_lock_user(user_id, opts = {}) - data, _status_code, _headers = user_service_lock_user_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceLockUserResponse, Integer, Hash)>] UserServiceLockUserResponse data, response status code and response headers - def user_service_lock_user_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_lock_user ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_lock_user" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/lock'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceLockUserResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_lock_user", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_lock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Request a code to reset a password - # Request a code to reset a password.. - # @param user_id [String] - # @param user_service_password_reset_request [UserServicePasswordResetRequest] - # @param [Hash] opts the optional parameters - # @return [UserServicePasswordResetResponse] - def user_service_password_reset(user_id, user_service_password_reset_request, opts = {}) - data, _status_code, _headers = user_service_password_reset_with_http_info(user_id, user_service_password_reset_request, opts) - data - end - - # Request a code to reset a password - # Request a code to reset a password.. - # @param user_id [String] - # @param user_service_password_reset_request [UserServicePasswordResetRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServicePasswordResetResponse, Integer, Hash)>] UserServicePasswordResetResponse data, response status code and response headers - def user_service_password_reset_with_http_info(user_id, user_service_password_reset_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_password_reset ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_password_reset" # MODIFIED - end - # verify the required parameter 'user_service_password_reset_request' is set - if @api_client.config.client_side_validation && user_service_password_reset_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_password_reset_request' when calling Api::UserServiceApi.user_service_password_reset" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/password_reset'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_password_reset_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServicePasswordResetResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_password_reset", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceReactivateUserResponse] - def user_service_reactivate_user(user_id, opts = {}) - data, _status_code, _headers = user_service_reactivate_user_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceReactivateUserResponse, Integer, Hash)>] UserServiceReactivateUserResponse data, response status code and response headers - def user_service_reactivate_user_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_reactivate_user ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_reactivate_user" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/reactivate'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceReactivateUserResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_reactivate_user", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_reactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param user_service_register_passkey_request [UserServiceRegisterPasskeyRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceRegisterPasskeyResponse] - def user_service_register_passkey(user_id, user_service_register_passkey_request, opts = {}) - data, _status_code, _headers = user_service_register_passkey_with_http_info(user_id, user_service_register_passkey_request, opts) - data - end - - # 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 [String] - # @param user_service_register_passkey_request [UserServiceRegisterPasskeyRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRegisterPasskeyResponse, Integer, Hash)>] UserServiceRegisterPasskeyResponse data, response status code and response headers - def user_service_register_passkey_with_http_info(user_id, user_service_register_passkey_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_register_passkey ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_register_passkey" # MODIFIED - end - # verify the required parameter 'user_service_register_passkey_request' is set - if @api_client.config.client_side_validation && user_service_register_passkey_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_register_passkey_request' when calling Api::UserServiceApi.user_service_register_passkey" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/passkeys'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_register_passkey_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRegisterPasskeyResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_register_passkey", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_register_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRegisterTOTPResponse] - def user_service_register_totp(user_id, opts = {}) - data, _status_code, _headers = user_service_register_totp_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRegisterTOTPResponse, Integer, Hash)>] UserServiceRegisterTOTPResponse data, response status code and response headers - def user_service_register_totp_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_register_totp ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_register_totp" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/totp'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRegisterTOTPResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_register_totp", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_register_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param user_service_register_u2_f_request [UserServiceRegisterU2FRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceRegisterU2FResponse] - def user_service_register_u2_f(user_id, user_service_register_u2_f_request, opts = {}) - data, _status_code, _headers = user_service_register_u2_f_with_http_info(user_id, user_service_register_u2_f_request, opts) - data - end - - # 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 [String] - # @param user_service_register_u2_f_request [UserServiceRegisterU2FRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRegisterU2FResponse, Integer, Hash)>] UserServiceRegisterU2FResponse data, response status code and response headers - def user_service_register_u2_f_with_http_info(user_id, user_service_register_u2_f_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_register_u2_f ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_register_u2_f" # MODIFIED - end - # verify the required parameter 'user_service_register_u2_f_request' is set - if @api_client.config.client_side_validation && user_service_register_u2_f_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_register_u2_f_request' when calling Api::UserServiceApi.user_service_register_u2_f" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/u2f'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_register_u2_f_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRegisterU2FResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_register_u2_f", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_register_u2_f\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Remove link of an identity provider to an user - # Remove link of an identity provider to an user. - # @param user_id [String] - # @param idp_id [String] - # @param linked_user_id [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRemoveIDPLinkResponse] - def user_service_remove_idp_link(user_id, idp_id, linked_user_id, opts = {}) - data, _status_code, _headers = user_service_remove_idp_link_with_http_info(user_id, idp_id, linked_user_id, opts) - data - end - - # Remove link of an identity provider to an user - # Remove link of an identity provider to an user. - # @param user_id [String] - # @param idp_id [String] - # @param linked_user_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRemoveIDPLinkResponse, Integer, Hash)>] UserServiceRemoveIDPLinkResponse data, response status code and response headers - def user_service_remove_idp_link_with_http_info(user_id, idp_id, linked_user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_idp_link ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_idp_link" # MODIFIED - end - # verify the required parameter 'idp_id' is set - if @api_client.config.client_side_validation && idp_id.nil? - fail ArgumentError, "Missing the required parameter 'idp_id' when calling Api::UserServiceApi.user_service_remove_idp_link" # MODIFIED - end - # verify the required parameter 'linked_user_id' is set - if @api_client.config.client_side_validation && linked_user_id.nil? - fail ArgumentError, "Missing the required parameter 'linked_user_id' when calling Api::UserServiceApi.user_service_remove_idp_link" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/links/{idpId}/{linkedUserId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'idpId' + '}', CGI.escape(idp_id.to_s)).sub('{' + 'linkedUserId' + '}', CGI.escape(linked_user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRemoveIDPLinkResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_remove_idp_link", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_idp_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRemoveOTPEmailResponse] - def user_service_remove_otp_email(user_id, opts = {}) - data, _status_code, _headers = user_service_remove_otp_email_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRemoveOTPEmailResponse, Integer, Hash)>] UserServiceRemoveOTPEmailResponse data, response status code and response headers - def user_service_remove_otp_email_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_otp_email ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_otp_email" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/otp_email'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRemoveOTPEmailResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_remove_otp_email", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRemoveOTPSMSResponse] - def user_service_remove_otpsms(user_id, opts = {}) - data, _status_code, _headers = user_service_remove_otpsms_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRemoveOTPSMSResponse, Integer, Hash)>] UserServiceRemoveOTPSMSResponse data, response status code and response headers - def user_service_remove_otpsms_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_otpsms ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_otpsms" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/otp_sms'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRemoveOTPSMSResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_remove_otpsms", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Remove passkey from a user - # Remove passkey from a user. - # @param user_id [String] - # @param passkey_id [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRemovePasskeyResponse] - def user_service_remove_passkey(user_id, passkey_id, opts = {}) - data, _status_code, _headers = user_service_remove_passkey_with_http_info(user_id, passkey_id, opts) - data - end - - # Remove passkey from a user - # Remove passkey from a user. - # @param user_id [String] - # @param passkey_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRemovePasskeyResponse, Integer, Hash)>] UserServiceRemovePasskeyResponse data, response status code and response headers - def user_service_remove_passkey_with_http_info(user_id, passkey_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_passkey ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_passkey" # MODIFIED - end - # verify the required parameter 'passkey_id' is set - if @api_client.config.client_side_validation && passkey_id.nil? - fail ArgumentError, "Missing the required parameter 'passkey_id' when calling Api::UserServiceApi.user_service_remove_passkey" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/passkeys/{passkeyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'passkeyId' + '}', CGI.escape(passkey_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRemovePasskeyResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_remove_passkey", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Delete the user phone - # Delete the phone number of a user. - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRemovePhoneResponse] - def user_service_remove_phone(user_id, opts = {}) - data, _status_code, _headers = user_service_remove_phone_with_http_info(user_id, opts) - data - end - - # Delete the user phone - # Delete the phone number of a user. - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRemovePhoneResponse, Integer, Hash)>] UserServiceRemovePhoneResponse data, response status code and response headers - def user_service_remove_phone_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_phone ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_phone" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/phone'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRemovePhoneResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_remove_phone", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRemoveTOTPResponse] - def user_service_remove_totp(user_id, opts = {}) - data, _status_code, _headers = user_service_remove_totp_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRemoveTOTPResponse, Integer, Hash)>] UserServiceRemoveTOTPResponse data, response status code and response headers - def user_service_remove_totp_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_totp ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_totp" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/totp'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRemoveTOTPResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_remove_totp", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Remove u2f token from a user - # Remove u2f token from a user - # @param user_id [String] - # @param u2f_id [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceRemoveU2FResponse] - def user_service_remove_u2_f(user_id, u2f_id, opts = {}) - data, _status_code, _headers = user_service_remove_u2_f_with_http_info(user_id, u2f_id, opts) - data - end - - # Remove u2f token from a user - # Remove u2f token from a user - # @param user_id [String] - # @param u2f_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRemoveU2FResponse, Integer, Hash)>] UserServiceRemoveU2FResponse data, response status code and response headers - def user_service_remove_u2_f_with_http_info(user_id, u2f_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_u2_f ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_u2_f" # MODIFIED - end - # verify the required parameter 'u2f_id' is set - if @api_client.config.client_side_validation && u2f_id.nil? - fail ArgumentError, "Missing the required parameter 'u2f_id' when calling Api::UserServiceApi.user_service_remove_u2_f" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/u2f/{u2fId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'u2fId' + '}', CGI.escape(u2f_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRemoveU2FResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_remove_u2_f", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_u2_f\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Resend code to verify user email - # Resend code to verify user email. - # @param user_id [String] - # @param user_service_resend_email_code_request [UserServiceResendEmailCodeRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceResendEmailCodeResponse] - def user_service_resend_email_code(user_id, user_service_resend_email_code_request, opts = {}) - data, _status_code, _headers = user_service_resend_email_code_with_http_info(user_id, user_service_resend_email_code_request, opts) - data - end - - # Resend code to verify user email - # Resend code to verify user email. - # @param user_id [String] - # @param user_service_resend_email_code_request [UserServiceResendEmailCodeRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceResendEmailCodeResponse, Integer, Hash)>] UserServiceResendEmailCodeResponse data, response status code and response headers - def user_service_resend_email_code_with_http_info(user_id, user_service_resend_email_code_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_resend_email_code ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_resend_email_code" # MODIFIED - end - # verify the required parameter 'user_service_resend_email_code_request' is set - if @api_client.config.client_side_validation && user_service_resend_email_code_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_resend_email_code_request' when calling Api::UserServiceApi.user_service_resend_email_code" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/email/resend'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_resend_email_code_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceResendEmailCodeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_resend_email_code", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_resend_email_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Resend an invite code for a user - # Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceResendInviteCodeResponse] - def user_service_resend_invite_code(user_id, opts = {}) - data, _status_code, _headers = user_service_resend_invite_code_with_http_info(user_id, opts) - data - end - - # Resend an invite code for a user - # Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. - # @param user_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceResendInviteCodeResponse, Integer, Hash)>] UserServiceResendInviteCodeResponse data, response status code and response headers - def user_service_resend_invite_code_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_resend_invite_code ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_resend_invite_code" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/invite_code/resend'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceResendInviteCodeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_resend_invite_code", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_resend_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Resend code to verify user phone - # Resend code to verify user phone. - # @param user_id [String] - # @param user_service_resend_phone_code_request [UserServiceResendPhoneCodeRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceResendPhoneCodeResponse] - def user_service_resend_phone_code(user_id, user_service_resend_phone_code_request, opts = {}) - data, _status_code, _headers = user_service_resend_phone_code_with_http_info(user_id, user_service_resend_phone_code_request, opts) - data - end - - # Resend code to verify user phone - # Resend code to verify user phone. - # @param user_id [String] - # @param user_service_resend_phone_code_request [UserServiceResendPhoneCodeRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceResendPhoneCodeResponse, Integer, Hash)>] UserServiceResendPhoneCodeResponse data, response status code and response headers - def user_service_resend_phone_code_with_http_info(user_id, user_service_resend_phone_code_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_resend_phone_code ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_resend_phone_code" # MODIFIED - end - # verify the required parameter 'user_service_resend_phone_code_request' is set - if @api_client.config.client_side_validation && user_service_resend_phone_code_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_resend_phone_code_request' when calling Api::UserServiceApi.user_service_resend_phone_code" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/phone/resend'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_resend_phone_code_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceResendPhoneCodeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_resend_phone_code", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_resend_phone_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] ID of the idp intent, previously returned on the success response of the IDP callback - # @param user_service_retrieve_identity_provider_intent_request [UserServiceRetrieveIdentityProviderIntentRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceRetrieveIdentityProviderIntentResponse] - def user_service_retrieve_identity_provider_intent(idp_intent_id, user_service_retrieve_identity_provider_intent_request, opts = {}) - data, _status_code, _headers = user_service_retrieve_identity_provider_intent_with_http_info(idp_intent_id, user_service_retrieve_identity_provider_intent_request, opts) - data - end - - # 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 [String] ID of the idp intent, previously returned on the success response of the IDP callback - # @param user_service_retrieve_identity_provider_intent_request [UserServiceRetrieveIdentityProviderIntentRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceRetrieveIdentityProviderIntentResponse, Integer, Hash)>] UserServiceRetrieveIdentityProviderIntentResponse data, response status code and response headers - def user_service_retrieve_identity_provider_intent_with_http_info(idp_intent_id, user_service_retrieve_identity_provider_intent_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_retrieve_identity_provider_intent ...' # MODIFIED - end - # verify the required parameter 'idp_intent_id' is set - if @api_client.config.client_side_validation && idp_intent_id.nil? - fail ArgumentError, "Missing the required parameter 'idp_intent_id' when calling Api::UserServiceApi.user_service_retrieve_identity_provider_intent" # MODIFIED - end - # verify the required parameter 'user_service_retrieve_identity_provider_intent_request' is set - if @api_client.config.client_side_validation && user_service_retrieve_identity_provider_intent_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_retrieve_identity_provider_intent_request' when calling Api::UserServiceApi.user_service_retrieve_identity_provider_intent" # MODIFIED - end - # resource path - local_var_path = '/v2/idp_intents/{idpIntentId}'.sub('{' + 'idpIntentId' + '}', CGI.escape(idp_intent_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_retrieve_identity_provider_intent_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceRetrieveIdentityProviderIntentResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_retrieve_identity_provider_intent", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_retrieve_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Send code to verify user email - # Send code to verify user email. - # @param user_id [String] - # @param user_service_send_email_code_request [UserServiceSendEmailCodeRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceSendEmailCodeResponse] - def user_service_send_email_code(user_id, user_service_send_email_code_request, opts = {}) - data, _status_code, _headers = user_service_send_email_code_with_http_info(user_id, user_service_send_email_code_request, opts) - data - end - - # Send code to verify user email - # Send code to verify user email. - # @param user_id [String] - # @param user_service_send_email_code_request [UserServiceSendEmailCodeRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceSendEmailCodeResponse, Integer, Hash)>] UserServiceSendEmailCodeResponse data, response status code and response headers - def user_service_send_email_code_with_http_info(user_id, user_service_send_email_code_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_send_email_code ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_send_email_code" # MODIFIED - end - # verify the required parameter 'user_service_send_email_code_request' is set - if @api_client.config.client_side_validation && user_service_send_email_code_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_send_email_code_request' when calling Api::UserServiceApi.user_service_send_email_code" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/email/send'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_send_email_code_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceSendEmailCodeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_send_email_code", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_send_email_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param user_service_set_email_request [UserServiceSetEmailRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceSetEmailResponse] - def user_service_set_email(user_id, user_service_set_email_request, opts = {}) - data, _status_code, _headers = user_service_set_email_with_http_info(user_id, user_service_set_email_request, opts) - data - end - - # 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 [String] - # @param user_service_set_email_request [UserServiceSetEmailRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceSetEmailResponse, Integer, Hash)>] UserServiceSetEmailResponse data, response status code and response headers - def user_service_set_email_with_http_info(user_id, user_service_set_email_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_set_email ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_set_email" # MODIFIED - end - # verify the required parameter 'user_service_set_email_request' is set - if @api_client.config.client_side_validation && user_service_set_email_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_set_email_request' when calling Api::UserServiceApi.user_service_set_email" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/email'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_set_email_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceSetEmailResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_set_email", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_set_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Change password - # Change the password of a user with either a verification code or the current password.. - # @param user_id [String] - # @param user_service_set_password_request [UserServiceSetPasswordRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceSetPasswordResponse] - def user_service_set_password(user_id, user_service_set_password_request, opts = {}) - data, _status_code, _headers = user_service_set_password_with_http_info(user_id, user_service_set_password_request, opts) - data - end - - # Change password - # Change the password of a user with either a verification code or the current password.. - # @param user_id [String] - # @param user_service_set_password_request [UserServiceSetPasswordRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceSetPasswordResponse, Integer, Hash)>] UserServiceSetPasswordResponse data, response status code and response headers - def user_service_set_password_with_http_info(user_id, user_service_set_password_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_set_password ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_set_password" # MODIFIED - end - # verify the required parameter 'user_service_set_password_request' is set - if @api_client.config.client_side_validation && user_service_set_password_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_set_password_request' when calling Api::UserServiceApi.user_service_set_password" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/password'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_set_password_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceSetPasswordResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_set_password", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_set_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param user_service_set_phone_request [UserServiceSetPhoneRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceSetPhoneResponse] - def user_service_set_phone(user_id, user_service_set_phone_request, opts = {}) - data, _status_code, _headers = user_service_set_phone_with_http_info(user_id, user_service_set_phone_request, opts) - data - end - - # 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 [String] - # @param user_service_set_phone_request [UserServiceSetPhoneRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceSetPhoneResponse, Integer, Hash)>] UserServiceSetPhoneResponse data, response status code and response headers - def user_service_set_phone_with_http_info(user_id, user_service_set_phone_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_set_phone ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_set_phone" # MODIFIED - end - # verify the required parameter 'user_service_set_phone_request' is set - if @api_client.config.client_side_validation && user_service_set_phone_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_set_phone_request' when calling Api::UserServiceApi.user_service_set_phone" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/phone'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_set_phone_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceSetPhoneResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_set_phone", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_set_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [UserServiceStartIdentityProviderIntentRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceStartIdentityProviderIntentResponse] - def user_service_start_identity_provider_intent(user_service_start_identity_provider_intent_request, opts = {}) - data, _status_code, _headers = user_service_start_identity_provider_intent_with_http_info(user_service_start_identity_provider_intent_request, opts) - data - end - - # 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 [UserServiceStartIdentityProviderIntentRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceStartIdentityProviderIntentResponse, Integer, Hash)>] UserServiceStartIdentityProviderIntentResponse data, response status code and response headers - def user_service_start_identity_provider_intent_with_http_info(user_service_start_identity_provider_intent_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_start_identity_provider_intent ...' # MODIFIED - end - # verify the required parameter 'user_service_start_identity_provider_intent_request' is set - if @api_client.config.client_side_validation && user_service_start_identity_provider_intent_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_start_identity_provider_intent_request' when calling Api::UserServiceApi.user_service_start_identity_provider_intent" # MODIFIED - end - # resource path - local_var_path = '/v2/idp_intents' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_start_identity_provider_intent_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceStartIdentityProviderIntentResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_start_identity_provider_intent", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_start_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [UserServiceUnlockUserResponse] - def user_service_unlock_user(user_id, opts = {}) - data, _status_code, _headers = user_service_unlock_user_with_http_info(user_id, opts) - data - end - - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceUnlockUserResponse, Integer, Hash)>] UserServiceUnlockUserResponse data, response status code and response headers - def user_service_unlock_user_with_http_info(user_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_unlock_user ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_unlock_user" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/unlock'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceUnlockUserResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_unlock_user", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_unlock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Update User - # Update all information from a user.. - # @param user_id [String] - # @param user_service_update_human_user_request [UserServiceUpdateHumanUserRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceUpdateHumanUserResponse] - def user_service_update_human_user(user_id, user_service_update_human_user_request, opts = {}) - data, _status_code, _headers = user_service_update_human_user_with_http_info(user_id, user_service_update_human_user_request, opts) - data - end - - # Update User - # Update all information from a user.. - # @param user_id [String] - # @param user_service_update_human_user_request [UserServiceUpdateHumanUserRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceUpdateHumanUserResponse, Integer, Hash)>] UserServiceUpdateHumanUserResponse data, response status code and response headers - def user_service_update_human_user_with_http_info(user_id, user_service_update_human_user_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_update_human_user ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_update_human_user" # MODIFIED - end - # verify the required parameter 'user_service_update_human_user_request' is set - if @api_client.config.client_side_validation && user_service_update_human_user_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_update_human_user_request' when calling Api::UserServiceApi.user_service_update_human_user" # MODIFIED - end - # resource path - local_var_path = '/v2/users/human/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_update_human_user_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceUpdateHumanUserResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_update_human_user", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_update_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Verify the email - # Verify the email with the generated code. - # @param user_id [String] - # @param user_service_verify_email_request [UserServiceVerifyEmailRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceVerifyEmailResponse] - def user_service_verify_email(user_id, user_service_verify_email_request, opts = {}) - data, _status_code, _headers = user_service_verify_email_with_http_info(user_id, user_service_verify_email_request, opts) - data - end - - # Verify the email - # Verify the email with the generated code. - # @param user_id [String] - # @param user_service_verify_email_request [UserServiceVerifyEmailRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceVerifyEmailResponse, Integer, Hash)>] UserServiceVerifyEmailResponse data, response status code and response headers - def user_service_verify_email_with_http_info(user_id, user_service_verify_email_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_email ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_email" # MODIFIED - end - # verify the required parameter 'user_service_verify_email_request' is set - if @api_client.config.client_side_validation && user_service_verify_email_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_verify_email_request' when calling Api::UserServiceApi.user_service_verify_email" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/email/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_email_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceVerifyEmailResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_verify_email", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # 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 [String] - # @param user_service_verify_invite_code_request [UserServiceVerifyInviteCodeRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceVerifyInviteCodeResponse] - def user_service_verify_invite_code(user_id, user_service_verify_invite_code_request, opts = {}) - data, _status_code, _headers = user_service_verify_invite_code_with_http_info(user_id, user_service_verify_invite_code_request, opts) - data - end - - # 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 [String] - # @param user_service_verify_invite_code_request [UserServiceVerifyInviteCodeRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceVerifyInviteCodeResponse, Integer, Hash)>] UserServiceVerifyInviteCodeResponse data, response status code and response headers - def user_service_verify_invite_code_with_http_info(user_id, user_service_verify_invite_code_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_invite_code ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_invite_code" # MODIFIED - end - # verify the required parameter 'user_service_verify_invite_code_request' is set - if @api_client.config.client_side_validation && user_service_verify_invite_code_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_verify_invite_code_request' when calling Api::UserServiceApi.user_service_verify_invite_code" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/invite_code/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_invite_code_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceVerifyInviteCodeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_verify_invite_code", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Verify a passkey for a user - # Verify the passkey registration with the public key credential.. - # @param user_id [String] - # @param passkey_id [String] - # @param user_service_verify_passkey_registration_request [UserServiceVerifyPasskeyRegistrationRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceVerifyPasskeyRegistrationResponse] - def user_service_verify_passkey_registration(user_id, passkey_id, user_service_verify_passkey_registration_request, opts = {}) - data, _status_code, _headers = user_service_verify_passkey_registration_with_http_info(user_id, passkey_id, user_service_verify_passkey_registration_request, opts) - data - end - - # Verify a passkey for a user - # Verify the passkey registration with the public key credential.. - # @param user_id [String] - # @param passkey_id [String] - # @param user_service_verify_passkey_registration_request [UserServiceVerifyPasskeyRegistrationRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceVerifyPasskeyRegistrationResponse, Integer, Hash)>] UserServiceVerifyPasskeyRegistrationResponse data, response status code and response headers - def user_service_verify_passkey_registration_with_http_info(user_id, passkey_id, user_service_verify_passkey_registration_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_passkey_registration ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_passkey_registration" # MODIFIED - end - # verify the required parameter 'passkey_id' is set - if @api_client.config.client_side_validation && passkey_id.nil? - fail ArgumentError, "Missing the required parameter 'passkey_id' when calling Api::UserServiceApi.user_service_verify_passkey_registration" # MODIFIED - end - # verify the required parameter 'user_service_verify_passkey_registration_request' is set - if @api_client.config.client_side_validation && user_service_verify_passkey_registration_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_verify_passkey_registration_request' when calling Api::UserServiceApi.user_service_verify_passkey_registration" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/passkeys/{passkeyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'passkeyId' + '}', CGI.escape(passkey_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_passkey_registration_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceVerifyPasskeyRegistrationResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_verify_passkey_registration", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_passkey_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Verify the phone - # Verify the phone with the generated code.. - # @param user_id [String] - # @param user_service_verify_phone_request [UserServiceVerifyPhoneRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceVerifyPhoneResponse] - def user_service_verify_phone(user_id, user_service_verify_phone_request, opts = {}) - data, _status_code, _headers = user_service_verify_phone_with_http_info(user_id, user_service_verify_phone_request, opts) - data - end - - # Verify the phone - # Verify the phone with the generated code.. - # @param user_id [String] - # @param user_service_verify_phone_request [UserServiceVerifyPhoneRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceVerifyPhoneResponse, Integer, Hash)>] UserServiceVerifyPhoneResponse data, response status code and response headers - def user_service_verify_phone_with_http_info(user_id, user_service_verify_phone_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_phone ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_phone" # MODIFIED - end - # verify the required parameter 'user_service_verify_phone_request' is set - if @api_client.config.client_side_validation && user_service_verify_phone_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_verify_phone_request' when calling Api::UserServiceApi.user_service_verify_phone" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/phone/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_phone_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceVerifyPhoneResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_verify_phone", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Verify a TOTP generator for a user - # Verify the TOTP registration with a generated code.. - # @param user_id [String] - # @param user_service_verify_totp_registration_request [UserServiceVerifyTOTPRegistrationRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceVerifyTOTPRegistrationResponse] - def user_service_verify_totp_registration(user_id, user_service_verify_totp_registration_request, opts = {}) - data, _status_code, _headers = user_service_verify_totp_registration_with_http_info(user_id, user_service_verify_totp_registration_request, opts) - data - end - - # Verify a TOTP generator for a user - # Verify the TOTP registration with a generated code.. - # @param user_id [String] - # @param user_service_verify_totp_registration_request [UserServiceVerifyTOTPRegistrationRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceVerifyTOTPRegistrationResponse, Integer, Hash)>] UserServiceVerifyTOTPRegistrationResponse data, response status code and response headers - def user_service_verify_totp_registration_with_http_info(user_id, user_service_verify_totp_registration_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_totp_registration ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_totp_registration" # MODIFIED - end - # verify the required parameter 'user_service_verify_totp_registration_request' is set - if @api_client.config.client_side_validation && user_service_verify_totp_registration_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_verify_totp_registration_request' when calling Api::UserServiceApi.user_service_verify_totp_registration" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/totp/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_totp_registration_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceVerifyTOTPRegistrationResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_verify_totp_registration", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_totp_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - - # Verify a u2f token for a user - # Verify the u2f token registration with the public key credential.. - # @param user_id [String] - # @param u2f_id [String] - # @param user_service_verify_u2_f_registration_request [UserServiceVerifyU2FRegistrationRequest] - # @param [Hash] opts the optional parameters - # @return [UserServiceVerifyU2FRegistrationResponse] - def user_service_verify_u2_f_registration(user_id, u2f_id, user_service_verify_u2_f_registration_request, opts = {}) - data, _status_code, _headers = user_service_verify_u2_f_registration_with_http_info(user_id, u2f_id, user_service_verify_u2_f_registration_request, opts) - data - end - - # Verify a u2f token for a user - # Verify the u2f token registration with the public key credential.. - # @param user_id [String] - # @param u2f_id [String] - # @param user_service_verify_u2_f_registration_request [UserServiceVerifyU2FRegistrationRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(UserServiceVerifyU2FRegistrationResponse, Integer, Hash)>] UserServiceVerifyU2FRegistrationResponse data, response status code and response headers - def user_service_verify_u2_f_registration_with_http_info(user_id, u2f_id, user_service_verify_u2_f_registration_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_u2_f_registration ...' # MODIFIED - end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_u2_f_registration" # MODIFIED - end - # verify the required parameter 'u2f_id' is set - if @api_client.config.client_side_validation && u2f_id.nil? - fail ArgumentError, "Missing the required parameter 'u2f_id' when calling Api::UserServiceApi.user_service_verify_u2_f_registration" # MODIFIED - end - # verify the required parameter 'user_service_verify_u2_f_registration_request' is set - if @api_client.config.client_side_validation && user_service_verify_u2_f_registration_request.nil? - fail ArgumentError, "Missing the required parameter 'user_service_verify_u2_f_registration_request' when calling Api::UserServiceApi.user_service_verify_u2_f_registration" # MODIFIED - end - # resource path - local_var_path = '/v2/users/{userId}/u2f/{u2fId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'u2fId' + '}', CGI.escape(u2f_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_u2_f_registration_request) - - # return_type - return_type = opts[:debug_return_type] || 'UserServiceVerifyU2FRegistrationResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] - - new_options = opts.merge( - :operation => :"Api::UserServiceApi.user_service_verify_u2_f_registration", # MODIFIED - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_u2_f_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED - end - return data, status_code, headers - end - end -end diff --git a/lib/zitadel/client/models/feature_service_details.rb b/lib/zitadel/client/models/feature_service_details.rb deleted file mode 100644 index fb5b596a..00000000 --- a/lib/zitadel/client/models/feature_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_feature_flag.rb b/lib/zitadel/client/models/feature_service_feature_flag.rb deleted file mode 100644 index dbbaef8b..00000000 --- a/lib/zitadel/client/models/feature_service_feature_flag.rb +++ /dev/null @@ -1,265 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # FeatureFlag is a simple boolean Feature setting, without further payload. - class FeatureServiceFeatureFlag - # Whether a feature is enabled. - attr_accessor :enabled - - attr_accessor :source - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'enabled' => :'enabled', - :'source' => :'source' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'enabled' => :'Boolean', - :'source' => :'FeatureServiceSource' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceFeatureFlag` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceFeatureFlag`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'enabled') - self.enabled = attributes[:'enabled'] - end - - if attributes.key?(:'source') - self.source = attributes[:'source'] - else - self.source = 'SOURCE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - enabled == o.enabled && - source == o.source - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [enabled, source].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_get_instance_features_response.rb b/lib/zitadel/client/models/feature_service_get_instance_features_response.rb deleted file mode 100644 index e2664c66..00000000 --- a/lib/zitadel/client/models/feature_service_get_instance_features_response.rb +++ /dev/null @@ -1,365 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceGetInstanceFeaturesResponse - attr_accessor :details - - attr_accessor :login_default_org - - attr_accessor :oidc_trigger_introspection_projections - - attr_accessor :oidc_legacy_introspection - - attr_accessor :user_schema - - attr_accessor :oidc_token_exchange - - attr_accessor :actions - - attr_accessor :improved_performance - - attr_accessor :web_key - - attr_accessor :debug_oidc_parent_error - - attr_accessor :oidc_single_v1_session_termination - - attr_accessor :disable_user_token_event - - attr_accessor :enable_back_channel_logout - - attr_accessor :login_v2 - - attr_accessor :permission_check_v2 - - attr_accessor :console_use_v2_user_api - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'login_default_org' => :'loginDefaultOrg', - :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', - :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', - :'user_schema' => :'userSchema', - :'oidc_token_exchange' => :'oidcTokenExchange', - :'actions' => :'actions', - :'improved_performance' => :'improvedPerformance', - :'web_key' => :'webKey', - :'debug_oidc_parent_error' => :'debugOidcParentError', - :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', - :'disable_user_token_event' => :'disableUserTokenEvent', - :'enable_back_channel_logout' => :'enableBackChannelLogout', - :'login_v2' => :'loginV2', - :'permission_check_v2' => :'permissionCheckV2', - :'console_use_v2_user_api' => :'consoleUseV2UserApi' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails', - :'login_default_org' => :'FeatureServiceFeatureFlag', - :'oidc_trigger_introspection_projections' => :'FeatureServiceFeatureFlag', - :'oidc_legacy_introspection' => :'FeatureServiceFeatureFlag', - :'user_schema' => :'FeatureServiceFeatureFlag', - :'oidc_token_exchange' => :'FeatureServiceFeatureFlag', - :'actions' => :'FeatureServiceFeatureFlag', - :'improved_performance' => :'FeatureServiceImprovedPerformanceFeatureFlag', - :'web_key' => :'FeatureServiceFeatureFlag', - :'debug_oidc_parent_error' => :'FeatureServiceFeatureFlag', - :'oidc_single_v1_session_termination' => :'FeatureServiceFeatureFlag', - :'disable_user_token_event' => :'FeatureServiceFeatureFlag', - :'enable_back_channel_logout' => :'FeatureServiceFeatureFlag', - :'login_v2' => :'FeatureServiceLoginV2FeatureFlag', - :'permission_check_v2' => :'FeatureServiceFeatureFlag', - :'console_use_v2_user_api' => :'FeatureServiceFeatureFlag' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetInstanceFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetInstanceFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'login_default_org') - self.login_default_org = attributes[:'login_default_org'] - end - - if attributes.key?(:'oidc_trigger_introspection_projections') - self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] - end - - if attributes.key?(:'oidc_legacy_introspection') - self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] - end - - if attributes.key?(:'user_schema') - self.user_schema = attributes[:'user_schema'] - end - - if attributes.key?(:'oidc_token_exchange') - self.oidc_token_exchange = attributes[:'oidc_token_exchange'] - end - - if attributes.key?(:'actions') - self.actions = attributes[:'actions'] - end - - if attributes.key?(:'improved_performance') - self.improved_performance = attributes[:'improved_performance'] - end - - if attributes.key?(:'web_key') - self.web_key = attributes[:'web_key'] - end - - if attributes.key?(:'debug_oidc_parent_error') - self.debug_oidc_parent_error = attributes[:'debug_oidc_parent_error'] - end - - if attributes.key?(:'oidc_single_v1_session_termination') - self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] - end - - if attributes.key?(:'disable_user_token_event') - self.disable_user_token_event = attributes[:'disable_user_token_event'] - end - - if attributes.key?(:'enable_back_channel_logout') - self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] - end - - if attributes.key?(:'login_v2') - self.login_v2 = attributes[:'login_v2'] - end - - if attributes.key?(:'permission_check_v2') - self.permission_check_v2 = attributes[:'permission_check_v2'] - end - - if attributes.key?(:'console_use_v2_user_api') - self.console_use_v2_user_api = attributes[:'console_use_v2_user_api'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - login_default_org == o.login_default_org && - oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && - oidc_legacy_introspection == o.oidc_legacy_introspection && - user_schema == o.user_schema && - oidc_token_exchange == o.oidc_token_exchange && - actions == o.actions && - improved_performance == o.improved_performance && - web_key == o.web_key && - debug_oidc_parent_error == o.debug_oidc_parent_error && - oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && - disable_user_token_event == o.disable_user_token_event && - enable_back_channel_logout == o.enable_back_channel_logout && - login_v2 == o.login_v2 && - permission_check_v2 == o.permission_check_v2 && - console_use_v2_user_api == o.console_use_v2_user_api - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, web_key, debug_oidc_parent_error, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2, console_use_v2_user_api].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_get_organization_features_response.rb b/lib/zitadel/client/models/feature_service_get_organization_features_response.rb deleted file mode 100644 index 09e03a52..00000000 --- a/lib/zitadel/client/models/feature_service_get_organization_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceGetOrganizationFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetOrganizationFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetOrganizationFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_get_system_features_response.rb b/lib/zitadel/client/models/feature_service_get_system_features_response.rb deleted file mode 100644 index 3d75aec1..00000000 --- a/lib/zitadel/client/models/feature_service_get_system_features_response.rb +++ /dev/null @@ -1,338 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceGetSystemFeaturesResponse - attr_accessor :details - - attr_accessor :login_default_org - - attr_accessor :oidc_trigger_introspection_projections - - attr_accessor :oidc_legacy_introspection - - attr_accessor :user_schema - - attr_accessor :oidc_token_exchange - - attr_accessor :actions - - attr_accessor :improved_performance - - attr_accessor :oidc_single_v1_session_termination - - attr_accessor :disable_user_token_event - - attr_accessor :enable_back_channel_logout - - attr_accessor :login_v2 - - attr_accessor :permission_check_v2 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'login_default_org' => :'loginDefaultOrg', - :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', - :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', - :'user_schema' => :'userSchema', - :'oidc_token_exchange' => :'oidcTokenExchange', - :'actions' => :'actions', - :'improved_performance' => :'improvedPerformance', - :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', - :'disable_user_token_event' => :'disableUserTokenEvent', - :'enable_back_channel_logout' => :'enableBackChannelLogout', - :'login_v2' => :'loginV2', - :'permission_check_v2' => :'permissionCheckV2' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails', - :'login_default_org' => :'FeatureServiceFeatureFlag', - :'oidc_trigger_introspection_projections' => :'FeatureServiceFeatureFlag', - :'oidc_legacy_introspection' => :'FeatureServiceFeatureFlag', - :'user_schema' => :'FeatureServiceFeatureFlag', - :'oidc_token_exchange' => :'FeatureServiceFeatureFlag', - :'actions' => :'FeatureServiceFeatureFlag', - :'improved_performance' => :'FeatureServiceImprovedPerformanceFeatureFlag', - :'oidc_single_v1_session_termination' => :'FeatureServiceFeatureFlag', - :'disable_user_token_event' => :'FeatureServiceFeatureFlag', - :'enable_back_channel_logout' => :'FeatureServiceFeatureFlag', - :'login_v2' => :'FeatureServiceLoginV2FeatureFlag', - :'permission_check_v2' => :'FeatureServiceFeatureFlag' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetSystemFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetSystemFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'login_default_org') - self.login_default_org = attributes[:'login_default_org'] - end - - if attributes.key?(:'oidc_trigger_introspection_projections') - self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] - end - - if attributes.key?(:'oidc_legacy_introspection') - self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] - end - - if attributes.key?(:'user_schema') - self.user_schema = attributes[:'user_schema'] - end - - if attributes.key?(:'oidc_token_exchange') - self.oidc_token_exchange = attributes[:'oidc_token_exchange'] - end - - if attributes.key?(:'actions') - self.actions = attributes[:'actions'] - end - - if attributes.key?(:'improved_performance') - self.improved_performance = attributes[:'improved_performance'] - end - - if attributes.key?(:'oidc_single_v1_session_termination') - self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] - end - - if attributes.key?(:'disable_user_token_event') - self.disable_user_token_event = attributes[:'disable_user_token_event'] - end - - if attributes.key?(:'enable_back_channel_logout') - self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] - end - - if attributes.key?(:'login_v2') - self.login_v2 = attributes[:'login_v2'] - end - - if attributes.key?(:'permission_check_v2') - self.permission_check_v2 = attributes[:'permission_check_v2'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - login_default_org == o.login_default_org && - oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && - oidc_legacy_introspection == o.oidc_legacy_introspection && - user_schema == o.user_schema && - oidc_token_exchange == o.oidc_token_exchange && - actions == o.actions && - improved_performance == o.improved_performance && - oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && - disable_user_token_event == o.disable_user_token_event && - enable_back_channel_logout == o.enable_back_channel_logout && - login_v2 == o.login_v2 && - permission_check_v2 == o.permission_check_v2 - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_get_user_features_response.rb b/lib/zitadel/client/models/feature_service_get_user_features_response.rb deleted file mode 100644 index 95da1ec0..00000000 --- a/lib/zitadel/client/models/feature_service_get_user_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceGetUserFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetUserFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetUserFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_improved_performance.rb b/lib/zitadel/client/models/feature_service_improved_performance.rb deleted file mode 100644 index 79117ba6..00000000 --- a/lib/zitadel/client/models/feature_service_improved_performance.rb +++ /dev/null @@ -1,45 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceImprovedPerformance - IMPROVED_PERFORMANCE_UNSPECIFIED = "IMPROVED_PERFORMANCE_UNSPECIFIED".freeze - IMPROVED_PERFORMANCE_ORG_BY_ID = "IMPROVED_PERFORMANCE_ORG_BY_ID".freeze - IMPROVED_PERFORMANCE_PROJECT_GRANT = "IMPROVED_PERFORMANCE_PROJECT_GRANT".freeze - IMPROVED_PERFORMANCE_PROJECT = "IMPROVED_PERFORMANCE_PROJECT".freeze - IMPROVED_PERFORMANCE_USER_GRANT = "IMPROVED_PERFORMANCE_USER_GRANT".freeze - IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED = "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED".freeze - - def self.all_vars - @all_vars ||= [IMPROVED_PERFORMANCE_UNSPECIFIED, IMPROVED_PERFORMANCE_ORG_BY_ID, IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if FeatureServiceImprovedPerformance.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::FeatureServiceImprovedPerformance" - end - end - -end diff --git a/lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb b/lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb deleted file mode 100644 index 6f35b41e..00000000 --- a/lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceImprovedPerformanceFeatureFlag - # Which of the performance improvements is enabled - attr_accessor :execution_paths - - attr_accessor :source - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'execution_paths' => :'executionPaths', - :'source' => :'source' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'execution_paths' => :'Array', - :'source' => :'FeatureServiceSource' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceImprovedPerformanceFeatureFlag` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceImprovedPerformanceFeatureFlag`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'execution_paths') - if (value = attributes[:'execution_paths']).is_a?(Array) - self.execution_paths = value - end - end - - if attributes.key?(:'source') - self.source = attributes[:'source'] - else - self.source = 'SOURCE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - execution_paths == o.execution_paths && - source == o.source - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [execution_paths, source].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_login_v2.rb b/lib/zitadel/client/models/feature_service_login_v2.rb deleted file mode 100644 index 32360ab8..00000000 --- a/lib/zitadel/client/models/feature_service_login_v2.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceLoginV2 - # Require that all users must use the new login UI. If enabled, all users will be redirected to the login V2 regardless of the application's preference. - attr_accessor :required - - # Optionally specify a base uri of the login UI. If unspecified the default URI will be used. - attr_accessor :base_uri - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'required' => :'required', - :'base_uri' => :'baseUri' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'required' => :'Boolean', - :'base_uri' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceLoginV2` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceLoginV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'required') - self.required = attributes[:'required'] - end - - if attributes.key?(:'base_uri') - self.base_uri = attributes[:'base_uri'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - required == o.required && - base_uri == o.base_uri - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [required, base_uri].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb b/lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb deleted file mode 100644 index e61c5597..00000000 --- a/lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb +++ /dev/null @@ -1,272 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceLoginV2FeatureFlag - attr_accessor :required - - attr_accessor :base_uri - - attr_accessor :source - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'required' => :'required', - :'base_uri' => :'baseUri', - :'source' => :'source' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'required' => :'Boolean', - :'base_uri' => :'String', - :'source' => :'FeatureServiceSource' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceLoginV2FeatureFlag` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceLoginV2FeatureFlag`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'required') - self.required = attributes[:'required'] - end - - if attributes.key?(:'base_uri') - self.base_uri = attributes[:'base_uri'] - end - - if attributes.key?(:'source') - self.source = attributes[:'source'] - else - self.source = 'SOURCE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - required == o.required && - base_uri == o.base_uri && - source == o.source - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [required, base_uri, source].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_protobuf_any.rb b/lib/zitadel/client/models/feature_service_protobuf_any.rb deleted file mode 100644 index 788683c1..00000000 --- a/lib/zitadel/client/models/feature_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_reset_instance_features_response.rb b/lib/zitadel/client/models/feature_service_reset_instance_features_response.rb deleted file mode 100644 index b060bc9b..00000000 --- a/lib/zitadel/client/models/feature_service_reset_instance_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceResetInstanceFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetInstanceFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetInstanceFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_reset_organization_features_response.rb b/lib/zitadel/client/models/feature_service_reset_organization_features_response.rb deleted file mode 100644 index 573cb3f1..00000000 --- a/lib/zitadel/client/models/feature_service_reset_organization_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceResetOrganizationFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetOrganizationFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetOrganizationFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_reset_system_features_response.rb b/lib/zitadel/client/models/feature_service_reset_system_features_response.rb deleted file mode 100644 index c27edb08..00000000 --- a/lib/zitadel/client/models/feature_service_reset_system_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceResetSystemFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetSystemFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetSystemFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_reset_user_features_response.rb b/lib/zitadel/client/models/feature_service_reset_user_features_response.rb deleted file mode 100644 index ec61962a..00000000 --- a/lib/zitadel/client/models/feature_service_reset_user_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceResetUserFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetUserFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetUserFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_rpc_status.rb b/lib/zitadel/client/models/feature_service_rpc_status.rb deleted file mode 100644 index 484bd7fb..00000000 --- a/lib/zitadel/client/models/feature_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_set_instance_features_request.rb b/lib/zitadel/client/models/feature_service_set_instance_features_request.rb deleted file mode 100644 index 7cfd7bf8..00000000 --- a/lib/zitadel/client/models/feature_service_set_instance_features_request.rb +++ /dev/null @@ -1,372 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceSetInstanceFeaturesRequest - # The login UI will use the settings of the default org (and not from the instance) if no organization context is set - attr_accessor :login_default_org - - # 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. - attr_accessor :oidc_trigger_introspection_projections - - # 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. - attr_accessor :oidc_legacy_introspection - - # 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. - attr_accessor :user_schema - - # 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. - attr_accessor :oidc_token_exchange - - # Actions allow to manage data executions and targets. 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. - attr_accessor :actions - - # Improves performance of specified execution paths. - attr_accessor :improved_performance - - # Enable the webkey/v3alpha API. The first time this feature is enabled, web keys are generated and activated. - attr_accessor :web_key - - # 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. - attr_accessor :debug_oidc_parent_error - - # 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. - attr_accessor :oidc_single_v1_session_termination - - # Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins - attr_accessor :disable_user_token_event - - # 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. - attr_accessor :enable_back_channel_logout - - attr_accessor :login_v2 - - # Enable a newer, more performant, permission check used for v2 and v3 resource based APIs. - attr_accessor :permission_check_v2 - - # If this is enabled the console web client will use the new User v2 API for certain calls - attr_accessor :console_use_v2_user_api - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'login_default_org' => :'loginDefaultOrg', - :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', - :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', - :'user_schema' => :'userSchema', - :'oidc_token_exchange' => :'oidcTokenExchange', - :'actions' => :'actions', - :'improved_performance' => :'improvedPerformance', - :'web_key' => :'webKey', - :'debug_oidc_parent_error' => :'debugOidcParentError', - :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', - :'disable_user_token_event' => :'disableUserTokenEvent', - :'enable_back_channel_logout' => :'enableBackChannelLogout', - :'login_v2' => :'loginV2', - :'permission_check_v2' => :'permissionCheckV2', - :'console_use_v2_user_api' => :'consoleUseV2UserApi' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'login_default_org' => :'Boolean', - :'oidc_trigger_introspection_projections' => :'Boolean', - :'oidc_legacy_introspection' => :'Boolean', - :'user_schema' => :'Boolean', - :'oidc_token_exchange' => :'Boolean', - :'actions' => :'Boolean', - :'improved_performance' => :'Array', - :'web_key' => :'Boolean', - :'debug_oidc_parent_error' => :'Boolean', - :'oidc_single_v1_session_termination' => :'Boolean', - :'disable_user_token_event' => :'Boolean', - :'enable_back_channel_logout' => :'Boolean', - :'login_v2' => :'FeatureServiceLoginV2', - :'permission_check_v2' => :'Boolean', - :'console_use_v2_user_api' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'login_default_org') - self.login_default_org = attributes[:'login_default_org'] - end - - if attributes.key?(:'oidc_trigger_introspection_projections') - self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] - end - - if attributes.key?(:'oidc_legacy_introspection') - self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] - end - - if attributes.key?(:'user_schema') - self.user_schema = attributes[:'user_schema'] - end - - if attributes.key?(:'oidc_token_exchange') - self.oidc_token_exchange = attributes[:'oidc_token_exchange'] - end - - if attributes.key?(:'actions') - self.actions = attributes[:'actions'] - end - - if attributes.key?(:'improved_performance') - if (value = attributes[:'improved_performance']).is_a?(Array) - self.improved_performance = value - end - end - - if attributes.key?(:'web_key') - self.web_key = attributes[:'web_key'] - end - - if attributes.key?(:'debug_oidc_parent_error') - self.debug_oidc_parent_error = attributes[:'debug_oidc_parent_error'] - end - - if attributes.key?(:'oidc_single_v1_session_termination') - self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] - end - - if attributes.key?(:'disable_user_token_event') - self.disable_user_token_event = attributes[:'disable_user_token_event'] - end - - if attributes.key?(:'enable_back_channel_logout') - self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] - end - - if attributes.key?(:'login_v2') - self.login_v2 = attributes[:'login_v2'] - end - - if attributes.key?(:'permission_check_v2') - self.permission_check_v2 = attributes[:'permission_check_v2'] - end - - if attributes.key?(:'console_use_v2_user_api') - self.console_use_v2_user_api = attributes[:'console_use_v2_user_api'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - login_default_org == o.login_default_org && - oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && - oidc_legacy_introspection == o.oidc_legacy_introspection && - user_schema == o.user_schema && - oidc_token_exchange == o.oidc_token_exchange && - actions == o.actions && - improved_performance == o.improved_performance && - web_key == o.web_key && - debug_oidc_parent_error == o.debug_oidc_parent_error && - oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && - disable_user_token_event == o.disable_user_token_event && - enable_back_channel_logout == o.enable_back_channel_logout && - login_v2 == o.login_v2 && - permission_check_v2 == o.permission_check_v2 && - console_use_v2_user_api == o.console_use_v2_user_api - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, web_key, debug_oidc_parent_error, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2, console_use_v2_user_api].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_set_instance_features_response.rb b/lib/zitadel/client/models/feature_service_set_instance_features_response.rb deleted file mode 100644 index 934f6277..00000000 --- a/lib/zitadel/client/models/feature_service_set_instance_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceSetInstanceFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_set_organization_features_response.rb b/lib/zitadel/client/models/feature_service_set_organization_features_response.rb deleted file mode 100644 index 1113a525..00000000 --- a/lib/zitadel/client/models/feature_service_set_organization_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceSetOrganizationFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetOrganizationFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetOrganizationFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_set_system_features_request.rb b/lib/zitadel/client/models/feature_service_set_system_features_request.rb deleted file mode 100644 index 2ba4cc62..00000000 --- a/lib/zitadel/client/models/feature_service_set_system_features_request.rb +++ /dev/null @@ -1,342 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceSetSystemFeaturesRequest - # The login UI will use the settings of the default org (and not from the instance) if no organization context is set - attr_accessor :login_default_org - - # 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. - attr_accessor :oidc_trigger_introspection_projections - - # 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. - attr_accessor :oidc_legacy_introspection - - # 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. - attr_accessor :user_schema - - # 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. - attr_accessor :oidc_token_exchange - - # Actions allow to manage data executions and targets. 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. - attr_accessor :actions - - # Improves performance of specified execution paths. - attr_accessor :improved_performance - - # 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. - attr_accessor :oidc_single_v1_session_termination - - # Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins - attr_accessor :disable_user_token_event - - # 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. - attr_accessor :enable_back_channel_logout - - attr_accessor :login_v2 - - # Enable a newer, more performant, permission check used for v2 and v3 resource based APIs. - attr_accessor :permission_check_v2 - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'login_default_org' => :'loginDefaultOrg', - :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', - :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', - :'user_schema' => :'userSchema', - :'oidc_token_exchange' => :'oidcTokenExchange', - :'actions' => :'actions', - :'improved_performance' => :'improvedPerformance', - :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', - :'disable_user_token_event' => :'disableUserTokenEvent', - :'enable_back_channel_logout' => :'enableBackChannelLogout', - :'login_v2' => :'loginV2', - :'permission_check_v2' => :'permissionCheckV2' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'login_default_org' => :'Boolean', - :'oidc_trigger_introspection_projections' => :'Boolean', - :'oidc_legacy_introspection' => :'Boolean', - :'user_schema' => :'Boolean', - :'oidc_token_exchange' => :'Boolean', - :'actions' => :'Boolean', - :'improved_performance' => :'Array', - :'oidc_single_v1_session_termination' => :'Boolean', - :'disable_user_token_event' => :'Boolean', - :'enable_back_channel_logout' => :'Boolean', - :'login_v2' => :'FeatureServiceLoginV2', - :'permission_check_v2' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'login_default_org') - self.login_default_org = attributes[:'login_default_org'] - end - - if attributes.key?(:'oidc_trigger_introspection_projections') - self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] - end - - if attributes.key?(:'oidc_legacy_introspection') - self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] - end - - if attributes.key?(:'user_schema') - self.user_schema = attributes[:'user_schema'] - end - - if attributes.key?(:'oidc_token_exchange') - self.oidc_token_exchange = attributes[:'oidc_token_exchange'] - end - - if attributes.key?(:'actions') - self.actions = attributes[:'actions'] - end - - if attributes.key?(:'improved_performance') - if (value = attributes[:'improved_performance']).is_a?(Array) - self.improved_performance = value - end - end - - if attributes.key?(:'oidc_single_v1_session_termination') - self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] - end - - if attributes.key?(:'disable_user_token_event') - self.disable_user_token_event = attributes[:'disable_user_token_event'] - end - - if attributes.key?(:'enable_back_channel_logout') - self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] - end - - if attributes.key?(:'login_v2') - self.login_v2 = attributes[:'login_v2'] - end - - if attributes.key?(:'permission_check_v2') - self.permission_check_v2 = attributes[:'permission_check_v2'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - login_default_org == o.login_default_org && - oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && - oidc_legacy_introspection == o.oidc_legacy_introspection && - user_schema == o.user_schema && - oidc_token_exchange == o.oidc_token_exchange && - actions == o.actions && - improved_performance == o.improved_performance && - oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && - disable_user_token_event == o.disable_user_token_event && - enable_back_channel_logout == o.enable_back_channel_logout && - login_v2 == o.login_v2 && - permission_check_v2 == o.permission_check_v2 - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_set_system_features_response.rb b/lib/zitadel/client/models/feature_service_set_system_features_response.rb deleted file mode 100644 index 07bf5cac..00000000 --- a/lib/zitadel/client/models/feature_service_set_system_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceSetSystemFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_set_user_features_response.rb b/lib/zitadel/client/models/feature_service_set_user_features_response.rb deleted file mode 100644 index 413988f6..00000000 --- a/lib/zitadel/client/models/feature_service_set_user_features_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceSetUserFeaturesResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'FeatureServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetUserFeaturesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetUserFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/feature_service_source.rb b/lib/zitadel/client/models/feature_service_source.rb deleted file mode 100644 index 56742c52..00000000 --- a/lib/zitadel/client/models/feature_service_source.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class FeatureServiceSource - SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED".freeze - SOURCE_SYSTEM = "SOURCE_SYSTEM".freeze - SOURCE_INSTANCE = "SOURCE_INSTANCE".freeze - SOURCE_ORGANIZATION = "SOURCE_ORGANIZATION".freeze - SOURCE_PROJECT = "SOURCE_PROJECT".freeze - SOURCE_APP = "SOURCE_APP".freeze - SOURCE_USER = "SOURCE_USER".freeze - - def self.all_vars - @all_vars ||= [SOURCE_UNSPECIFIED, SOURCE_SYSTEM, SOURCE_INSTANCE, SOURCE_ORGANIZATION, SOURCE_PROJECT, SOURCE_APP, SOURCE_USER].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if FeatureServiceSource.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::FeatureServiceSource" - end - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_apple_config.rb b/lib/zitadel/client/models/identity_provider_service_apple_config.rb deleted file mode 100644 index 77e5129a..00000000 --- a/lib/zitadel/client/models/identity_provider_service_apple_config.rb +++ /dev/null @@ -1,263 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceAppleConfig - # Client id (App ID or Service ID) provided by Apple. - attr_accessor :client_id - - # Team ID provided by Apple. - attr_accessor :team_id - - # ID of the private key generated by Apple. - attr_accessor :key_id - - # The scopes requested by ZITADEL during the request to Apple. - attr_accessor :scopes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'clientId', - :'team_id' => :'teamId', - :'key_id' => :'keyId', - :'scopes' => :'scopes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'team_id' => :'String', - :'key_id' => :'String', - :'scopes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceAppleConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceAppleConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'team_id') - self.team_id = attributes[:'team_id'] - end - - if attributes.key?(:'key_id') - self.key_id = attributes[:'key_id'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - team_id == o.team_id && - key_id == o.key_id && - scopes == o.scopes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, team_id, key_id, scopes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb b/lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb deleted file mode 100644 index 1c9119fd..00000000 --- a/lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceAutoLinkingOption - AUTO_LINKING_OPTION_UNSPECIFIED = "AUTO_LINKING_OPTION_UNSPECIFIED".freeze - AUTO_LINKING_OPTION_USERNAME = "AUTO_LINKING_OPTION_USERNAME".freeze - AUTO_LINKING_OPTION_EMAIL = "AUTO_LINKING_OPTION_EMAIL".freeze - - def self.all_vars - @all_vars ||= [AUTO_LINKING_OPTION_UNSPECIFIED, AUTO_LINKING_OPTION_USERNAME, AUTO_LINKING_OPTION_EMAIL].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if IdentityProviderServiceAutoLinkingOption.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceAutoLinkingOption" - end - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb b/lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb deleted file mode 100644 index ccd84e41..00000000 --- a/lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb +++ /dev/null @@ -1,261 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceAzureADConfig - attr_accessor :client_id - - attr_accessor :tenant - - # 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). - attr_accessor :email_verified - - # The scopes requested by ZITADEL during the request to Azure AD. - attr_accessor :scopes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'clientId', - :'tenant' => :'tenant', - :'email_verified' => :'emailVerified', - :'scopes' => :'scopes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'tenant' => :'IdentityProviderServiceAzureADTenant', - :'email_verified' => :'Boolean', - :'scopes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceAzureADConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceAzureADConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'tenant') - self.tenant = attributes[:'tenant'] - end - - if attributes.key?(:'email_verified') - self.email_verified = attributes[:'email_verified'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - tenant == o.tenant && - email_verified == o.email_verified && - scopes == o.scopes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, tenant, email_verified, scopes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb b/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb deleted file mode 100644 index a673b9e4..00000000 --- a/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceAzureADTenant - attr_accessor :tenant_type - - attr_accessor :tenant_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'tenant_type' => :'tenantType', - :'tenant_id' => :'tenantId' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'tenant_type' => :'IdentityProviderServiceAzureADTenantType', - :'tenant_id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceAzureADTenant` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceAzureADTenant`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'tenant_type') - self.tenant_type = attributes[:'tenant_type'] - else - self.tenant_type = 'AZURE_AD_TENANT_TYPE_COMMON' - end - - if attributes.key?(:'tenant_id') - self.tenant_id = attributes[:'tenant_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - tenant_type == o.tenant_type && - tenant_id == o.tenant_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [tenant_type, tenant_id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb b/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb deleted file mode 100644 index 571c49bd..00000000 --- a/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceAzureADTenantType - AZURE_AD_TENANT_TYPE_COMMON = "AZURE_AD_TENANT_TYPE_COMMON".freeze - AZURE_AD_TENANT_TYPE_ORGANISATIONS = "AZURE_AD_TENANT_TYPE_ORGANISATIONS".freeze - AZURE_AD_TENANT_TYPE_CONSUMERS = "AZURE_AD_TENANT_TYPE_CONSUMERS".freeze - - def self.all_vars - @all_vars ||= [AZURE_AD_TENANT_TYPE_COMMON, AZURE_AD_TENANT_TYPE_ORGANISATIONS, AZURE_AD_TENANT_TYPE_CONSUMERS].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if IdentityProviderServiceAzureADTenantType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceAzureADTenantType" - end - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_details.rb b/lib/zitadel/client/models/identity_provider_service_details.rb deleted file mode 100644 index e2d4b9b5..00000000 --- a/lib/zitadel/client/models/identity_provider_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb b/lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb deleted file mode 100644 index 3ed0afaa..00000000 --- a/lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb +++ /dev/null @@ -1,263 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceGenericOIDCConfig - # The OIDC issuer of the identity provider. - attr_accessor :issuer - - # Client id generated by the identity provider. - attr_accessor :client_id - - # The scopes requested by ZITADEL during the request on the identity provider. - attr_accessor :scopes - - # If true, provider information get mapped from the id token, not from the userinfo endpoint. - attr_accessor :is_id_token_mapping - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'issuer' => :'issuer', - :'client_id' => :'clientId', - :'scopes' => :'scopes', - :'is_id_token_mapping' => :'isIdTokenMapping' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'issuer' => :'String', - :'client_id' => :'String', - :'scopes' => :'Array', - :'is_id_token_mapping' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGenericOIDCConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGenericOIDCConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - - if attributes.key?(:'is_id_token_mapping') - self.is_id_token_mapping = attributes[:'is_id_token_mapping'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - issuer == o.issuer && - client_id == o.client_id && - scopes == o.scopes && - is_id_token_mapping == o.is_id_token_mapping - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [issuer, client_id, scopes, is_id_token_mapping].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb b/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb deleted file mode 100644 index 3e8912d4..00000000 --- a/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceGetIDPByIDResponse - attr_accessor :idp - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp' => :'idp' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp' => :'IdentityProviderServiceIDP' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGetIDPByIDResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGetIDPByIDResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp') - self.idp = attributes[:'idp'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp == o.idp - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_git_hub_config.rb b/lib/zitadel/client/models/identity_provider_service_git_hub_config.rb deleted file mode 100644 index 6fdcf8e6..00000000 --- a/lib/zitadel/client/models/identity_provider_service_git_hub_config.rb +++ /dev/null @@ -1,243 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceGitHubConfig - # The client ID of the GitHub App. - attr_accessor :client_id - - # The scopes requested by ZITADEL during the request to GitHub. - attr_accessor :scopes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'clientId', - :'scopes' => :'scopes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'scopes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitHubConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitHubConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - scopes == o.scopes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, scopes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb b/lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb deleted file mode 100644 index c8f924fb..00000000 --- a/lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb +++ /dev/null @@ -1,270 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceGitHubEnterpriseServerConfig - # The client ID of the GitHub App. - attr_accessor :client_id - - attr_accessor :authorization_endpoint - - attr_accessor :token_endpoint - - attr_accessor :user_endpoint - - # The scopes requested by ZITADEL during the request to GitHub. - attr_accessor :scopes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'clientId', - :'authorization_endpoint' => :'authorizationEndpoint', - :'token_endpoint' => :'tokenEndpoint', - :'user_endpoint' => :'userEndpoint', - :'scopes' => :'scopes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'authorization_endpoint' => :'String', - :'token_endpoint' => :'String', - :'user_endpoint' => :'String', - :'scopes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitHubEnterpriseServerConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitHubEnterpriseServerConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'authorization_endpoint') - self.authorization_endpoint = attributes[:'authorization_endpoint'] - end - - if attributes.key?(:'token_endpoint') - self.token_endpoint = attributes[:'token_endpoint'] - end - - if attributes.key?(:'user_endpoint') - self.user_endpoint = attributes[:'user_endpoint'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - authorization_endpoint == o.authorization_endpoint && - token_endpoint == o.token_endpoint && - user_endpoint == o.user_endpoint && - scopes == o.scopes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, authorization_endpoint, token_endpoint, user_endpoint, scopes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_git_lab_config.rb b/lib/zitadel/client/models/identity_provider_service_git_lab_config.rb deleted file mode 100644 index 94abda3c..00000000 --- a/lib/zitadel/client/models/identity_provider_service_git_lab_config.rb +++ /dev/null @@ -1,243 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceGitLabConfig - # Client id of the GitLab application. - attr_accessor :client_id - - # The scopes requested by ZITADEL during the request to GitLab. - attr_accessor :scopes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'clientId', - :'scopes' => :'scopes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'scopes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitLabConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitLabConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - scopes == o.scopes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, scopes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb b/lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb deleted file mode 100644 index 6d5efebd..00000000 --- a/lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb +++ /dev/null @@ -1,252 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceGitLabSelfHostedConfig - attr_accessor :issuer - - # Client id of the GitLab application. - attr_accessor :client_id - - # The scopes requested by ZITADEL during the request to GitLab. - attr_accessor :scopes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'issuer' => :'issuer', - :'client_id' => :'clientId', - :'scopes' => :'scopes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'issuer' => :'String', - :'client_id' => :'String', - :'scopes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitLabSelfHostedConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitLabSelfHostedConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - issuer == o.issuer && - client_id == o.client_id && - scopes == o.scopes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [issuer, client_id, scopes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_google_config.rb b/lib/zitadel/client/models/identity_provider_service_google_config.rb deleted file mode 100644 index 800843e9..00000000 --- a/lib/zitadel/client/models/identity_provider_service_google_config.rb +++ /dev/null @@ -1,243 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceGoogleConfig - # Client id of the Google application. - attr_accessor :client_id - - # The scopes requested by ZITADEL during the request to Google. - attr_accessor :scopes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'clientId', - :'scopes' => :'scopes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'scopes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGoogleConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGoogleConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - scopes == o.scopes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, scopes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p.rb deleted file mode 100644 index 579f8eee..00000000 --- a/lib/zitadel/client/models/identity_provider_service_i_d_p.rb +++ /dev/null @@ -1,302 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceIDP - # Unique identifier for the identity provider. - attr_accessor :id - - attr_accessor :details - - attr_accessor :state - - attr_accessor :name - - attr_accessor :type - - attr_accessor :config - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'details' => :'details', - :'state' => :'state', - :'name' => :'name', - :'type' => :'type', - :'config' => :'config' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'details' => :'IdentityProviderServiceDetails', - :'state' => :'IdentityProviderServiceIDPState', - :'name' => :'String', - :'type' => :'IdentityProviderServiceIDPType', - :'config' => :'IdentityProviderServiceIDPConfig' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceIDP` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceIDP`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'IDP_STATE_UNSPECIFIED' - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - else - self.type = 'IDP_TYPE_UNSPECIFIED' - end - - if attributes.key?(:'config') - self.config = attributes[:'config'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - details == o.details && - state == o.state && - name == o.name && - type == o.type && - config == o.config - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, details, state, name, type, config].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb deleted file mode 100644 index e8556de7..00000000 --- a/lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb +++ /dev/null @@ -1,338 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceIDPConfig - attr_accessor :options - - attr_accessor :ldap - - attr_accessor :google - - attr_accessor :oauth - - attr_accessor :oidc - - attr_accessor :jwt - - attr_accessor :github - - attr_accessor :github_es - - attr_accessor :gitlab - - attr_accessor :gitlab_self_hosted - - attr_accessor :azure_ad - - attr_accessor :apple - - attr_accessor :saml - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'options' => :'options', - :'ldap' => :'ldap', - :'google' => :'google', - :'oauth' => :'oauth', - :'oidc' => :'oidc', - :'jwt' => :'jwt', - :'github' => :'github', - :'github_es' => :'githubEs', - :'gitlab' => :'gitlab', - :'gitlab_self_hosted' => :'gitlabSelfHosted', - :'azure_ad' => :'azureAd', - :'apple' => :'apple', - :'saml' => :'saml' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'options' => :'IdentityProviderServiceOptions', - :'ldap' => :'IdentityProviderServiceLDAPConfig', - :'google' => :'IdentityProviderServiceGoogleConfig', - :'oauth' => :'IdentityProviderServiceOAuthConfig', - :'oidc' => :'IdentityProviderServiceGenericOIDCConfig', - :'jwt' => :'IdentityProviderServiceJWTConfig', - :'github' => :'IdentityProviderServiceGitHubConfig', - :'github_es' => :'IdentityProviderServiceGitHubEnterpriseServerConfig', - :'gitlab' => :'IdentityProviderServiceGitLabConfig', - :'gitlab_self_hosted' => :'IdentityProviderServiceGitLabSelfHostedConfig', - :'azure_ad' => :'IdentityProviderServiceAzureADConfig', - :'apple' => :'IdentityProviderServiceAppleConfig', - :'saml' => :'IdentityProviderServiceSAMLConfig' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceIDPConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceIDPConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'options') - self.options = attributes[:'options'] - end - - if attributes.key?(:'ldap') - self.ldap = attributes[:'ldap'] - end - - if attributes.key?(:'google') - self.google = attributes[:'google'] - end - - if attributes.key?(:'oauth') - self.oauth = attributes[:'oauth'] - end - - if attributes.key?(:'oidc') - self.oidc = attributes[:'oidc'] - end - - if attributes.key?(:'jwt') - self.jwt = attributes[:'jwt'] - end - - if attributes.key?(:'github') - self.github = attributes[:'github'] - end - - if attributes.key?(:'github_es') - self.github_es = attributes[:'github_es'] - end - - if attributes.key?(:'gitlab') - self.gitlab = attributes[:'gitlab'] - end - - if attributes.key?(:'gitlab_self_hosted') - self.gitlab_self_hosted = attributes[:'gitlab_self_hosted'] - end - - if attributes.key?(:'azure_ad') - self.azure_ad = attributes[:'azure_ad'] - end - - if attributes.key?(:'apple') - self.apple = attributes[:'apple'] - end - - if attributes.key?(:'saml') - self.saml = attributes[:'saml'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - options == o.options && - ldap == o.ldap && - google == o.google && - oauth == o.oauth && - oidc == o.oidc && - jwt == o.jwt && - github == o.github && - github_es == o.github_es && - gitlab == o.gitlab && - gitlab_self_hosted == o.gitlab_self_hosted && - azure_ad == o.azure_ad && - apple == o.apple && - saml == o.saml - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [options, ldap, google, oauth, oidc, jwt, github, github_es, gitlab, gitlab_self_hosted, azure_ad, apple, saml].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb deleted file mode 100644 index 6a72c524..00000000 --- a/lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb +++ /dev/null @@ -1,44 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceIDPState - IDP_STATE_UNSPECIFIED = "IDP_STATE_UNSPECIFIED".freeze - IDP_STATE_ACTIVE = "IDP_STATE_ACTIVE".freeze - IDP_STATE_INACTIVE = "IDP_STATE_INACTIVE".freeze - IDP_STATE_REMOVED = "IDP_STATE_REMOVED".freeze - IDP_STATE_MIGRATED = "IDP_STATE_MIGRATED".freeze - - def self.all_vars - @all_vars ||= [IDP_STATE_UNSPECIFIED, IDP_STATE_ACTIVE, IDP_STATE_INACTIVE, IDP_STATE_REMOVED, IDP_STATE_MIGRATED].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if IdentityProviderServiceIDPState.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceIDPState" - end - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb deleted file mode 100644 index f8bc969f..00000000 --- a/lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceIDPType - IDP_TYPE_UNSPECIFIED = "IDP_TYPE_UNSPECIFIED".freeze - IDP_TYPE_OIDC = "IDP_TYPE_OIDC".freeze - IDP_TYPE_JWT = "IDP_TYPE_JWT".freeze - IDP_TYPE_LDAP = "IDP_TYPE_LDAP".freeze - IDP_TYPE_OAUTH = "IDP_TYPE_OAUTH".freeze - IDP_TYPE_AZURE_AD = "IDP_TYPE_AZURE_AD".freeze - IDP_TYPE_GITHUB = "IDP_TYPE_GITHUB".freeze - IDP_TYPE_GITHUB_ES = "IDP_TYPE_GITHUB_ES".freeze - IDP_TYPE_GITLAB = "IDP_TYPE_GITLAB".freeze - IDP_TYPE_GITLAB_SELF_HOSTED = "IDP_TYPE_GITLAB_SELF_HOSTED".freeze - IDP_TYPE_GOOGLE = "IDP_TYPE_GOOGLE".freeze - IDP_TYPE_APPLE = "IDP_TYPE_APPLE".freeze - IDP_TYPE_SAML = "IDP_TYPE_SAML".freeze - - def self.all_vars - @all_vars ||= [IDP_TYPE_UNSPECIFIED, IDP_TYPE_OIDC, IDP_TYPE_JWT, IDP_TYPE_LDAP, IDP_TYPE_OAUTH, IDP_TYPE_AZURE_AD, IDP_TYPE_GITHUB, IDP_TYPE_GITHUB_ES, IDP_TYPE_GITLAB, IDP_TYPE_GITLAB_SELF_HOSTED, IDP_TYPE_GOOGLE, IDP_TYPE_APPLE, IDP_TYPE_SAML].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if IdentityProviderServiceIDPType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceIDPType" - end - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb b/lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb deleted file mode 100644 index f5e795a3..00000000 --- a/lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb +++ /dev/null @@ -1,261 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceJWTConfig - # The endpoint where the JWT can be extracted. - attr_accessor :jwt_endpoint - - # The issuer of the JWT (for validation). - attr_accessor :issuer - - # The endpoint to the key (JWK) which is used to sign the JWT with. - attr_accessor :keys_endpoint - - # The name of the header where the JWT is sent in, default is authorization. - attr_accessor :header_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'jwt_endpoint' => :'jwtEndpoint', - :'issuer' => :'issuer', - :'keys_endpoint' => :'keysEndpoint', - :'header_name' => :'headerName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'jwt_endpoint' => :'String', - :'issuer' => :'String', - :'keys_endpoint' => :'String', - :'header_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceJWTConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceJWTConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'jwt_endpoint') - self.jwt_endpoint = attributes[:'jwt_endpoint'] - end - - if attributes.key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - - if attributes.key?(:'keys_endpoint') - self.keys_endpoint = attributes[:'keys_endpoint'] - end - - if attributes.key?(:'header_name') - self.header_name = attributes[:'header_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - jwt_endpoint == o.jwt_endpoint && - issuer == o.issuer && - keys_endpoint == o.keys_endpoint && - header_name == o.header_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [jwt_endpoint, issuer, keys_endpoint, header_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb b/lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb deleted file mode 100644 index d5f8c406..00000000 --- a/lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb +++ /dev/null @@ -1,347 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceLDAPAttributes - attr_accessor :id_attribute - - attr_accessor :first_name_attribute - - attr_accessor :last_name_attribute - - attr_accessor :display_name_attribute - - attr_accessor :nick_name_attribute - - attr_accessor :preferred_username_attribute - - attr_accessor :email_attribute - - attr_accessor :email_verified_attribute - - attr_accessor :phone_attribute - - attr_accessor :phone_verified_attribute - - attr_accessor :preferred_language_attribute - - attr_accessor :avatar_url_attribute - - attr_accessor :profile_attribute - - attr_accessor :root_ca - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id_attribute' => :'idAttribute', - :'first_name_attribute' => :'firstNameAttribute', - :'last_name_attribute' => :'lastNameAttribute', - :'display_name_attribute' => :'displayNameAttribute', - :'nick_name_attribute' => :'nickNameAttribute', - :'preferred_username_attribute' => :'preferredUsernameAttribute', - :'email_attribute' => :'emailAttribute', - :'email_verified_attribute' => :'emailVerifiedAttribute', - :'phone_attribute' => :'phoneAttribute', - :'phone_verified_attribute' => :'phoneVerifiedAttribute', - :'preferred_language_attribute' => :'preferredLanguageAttribute', - :'avatar_url_attribute' => :'avatarUrlAttribute', - :'profile_attribute' => :'profileAttribute', - :'root_ca' => :'rootCa' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id_attribute' => :'String', - :'first_name_attribute' => :'String', - :'last_name_attribute' => :'String', - :'display_name_attribute' => :'String', - :'nick_name_attribute' => :'String', - :'preferred_username_attribute' => :'String', - :'email_attribute' => :'String', - :'email_verified_attribute' => :'String', - :'phone_attribute' => :'String', - :'phone_verified_attribute' => :'String', - :'preferred_language_attribute' => :'String', - :'avatar_url_attribute' => :'String', - :'profile_attribute' => :'String', - :'root_ca' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceLDAPAttributes` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceLDAPAttributes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id_attribute') - self.id_attribute = attributes[:'id_attribute'] - end - - if attributes.key?(:'first_name_attribute') - self.first_name_attribute = attributes[:'first_name_attribute'] - end - - if attributes.key?(:'last_name_attribute') - self.last_name_attribute = attributes[:'last_name_attribute'] - end - - if attributes.key?(:'display_name_attribute') - self.display_name_attribute = attributes[:'display_name_attribute'] - end - - if attributes.key?(:'nick_name_attribute') - self.nick_name_attribute = attributes[:'nick_name_attribute'] - end - - if attributes.key?(:'preferred_username_attribute') - self.preferred_username_attribute = attributes[:'preferred_username_attribute'] - end - - if attributes.key?(:'email_attribute') - self.email_attribute = attributes[:'email_attribute'] - end - - if attributes.key?(:'email_verified_attribute') - self.email_verified_attribute = attributes[:'email_verified_attribute'] - end - - if attributes.key?(:'phone_attribute') - self.phone_attribute = attributes[:'phone_attribute'] - end - - if attributes.key?(:'phone_verified_attribute') - self.phone_verified_attribute = attributes[:'phone_verified_attribute'] - end - - if attributes.key?(:'preferred_language_attribute') - self.preferred_language_attribute = attributes[:'preferred_language_attribute'] - end - - if attributes.key?(:'avatar_url_attribute') - self.avatar_url_attribute = attributes[:'avatar_url_attribute'] - end - - if attributes.key?(:'profile_attribute') - self.profile_attribute = attributes[:'profile_attribute'] - end - - if attributes.key?(:'root_ca') - self.root_ca = attributes[:'root_ca'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id_attribute == o.id_attribute && - first_name_attribute == o.first_name_attribute && - last_name_attribute == o.last_name_attribute && - display_name_attribute == o.display_name_attribute && - nick_name_attribute == o.nick_name_attribute && - preferred_username_attribute == o.preferred_username_attribute && - email_attribute == o.email_attribute && - email_verified_attribute == o.email_verified_attribute && - phone_attribute == o.phone_attribute && - phone_verified_attribute == o.phone_verified_attribute && - preferred_language_attribute == o.preferred_language_attribute && - avatar_url_attribute == o.avatar_url_attribute && - profile_attribute == o.profile_attribute && - root_ca == o.root_ca - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id_attribute, first_name_attribute, last_name_attribute, display_name_attribute, nick_name_attribute, preferred_username_attribute, email_attribute, email_verified_attribute, phone_attribute, phone_verified_attribute, preferred_language_attribute, avatar_url_attribute, profile_attribute, root_ca].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb b/lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb deleted file mode 100644 index cdcbe55f..00000000 --- a/lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb +++ /dev/null @@ -1,317 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceLDAPConfig - attr_accessor :servers - - attr_accessor :start_tls - - attr_accessor :base_dn - - attr_accessor :bind_dn - - attr_accessor :user_base - - attr_accessor :user_object_classes - - attr_accessor :user_filters - - attr_accessor :timeout - - attr_accessor :attributes - - attr_accessor :root_ca - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'servers' => :'servers', - :'start_tls' => :'startTls', - :'base_dn' => :'baseDn', - :'bind_dn' => :'bindDn', - :'user_base' => :'userBase', - :'user_object_classes' => :'userObjectClasses', - :'user_filters' => :'userFilters', - :'timeout' => :'timeout', - :'attributes' => :'attributes', - :'root_ca' => :'rootCa' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'servers' => :'Array', - :'start_tls' => :'Boolean', - :'base_dn' => :'String', - :'bind_dn' => :'String', - :'user_base' => :'String', - :'user_object_classes' => :'Array', - :'user_filters' => :'Array', - :'timeout' => :'String', - :'attributes' => :'IdentityProviderServiceLDAPAttributes', - :'root_ca' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceLDAPConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceLDAPConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'servers') - if (value = attributes[:'servers']).is_a?(Array) - self.servers = value - end - end - - if attributes.key?(:'start_tls') - self.start_tls = attributes[:'start_tls'] - end - - if attributes.key?(:'base_dn') - self.base_dn = attributes[:'base_dn'] - end - - if attributes.key?(:'bind_dn') - self.bind_dn = attributes[:'bind_dn'] - end - - if attributes.key?(:'user_base') - self.user_base = attributes[:'user_base'] - end - - if attributes.key?(:'user_object_classes') - if (value = attributes[:'user_object_classes']).is_a?(Array) - self.user_object_classes = value - end - end - - if attributes.key?(:'user_filters') - if (value = attributes[:'user_filters']).is_a?(Array) - self.user_filters = value - end - end - - if attributes.key?(:'timeout') - self.timeout = attributes[:'timeout'] - end - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'root_ca') - self.root_ca = attributes[:'root_ca'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - servers == o.servers && - start_tls == o.start_tls && - base_dn == o.base_dn && - bind_dn == o.bind_dn && - user_base == o.user_base && - user_object_classes == o.user_object_classes && - user_filters == o.user_filters && - timeout == o.timeout && - attributes == o.attributes && - root_ca == o.root_ca - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [servers, start_tls, base_dn, bind_dn, user_base, user_object_classes, user_filters, timeout, attributes, root_ca].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_o_auth_config.rb b/lib/zitadel/client/models/identity_provider_service_o_auth_config.rb deleted file mode 100644 index 6a36b30b..00000000 --- a/lib/zitadel/client/models/identity_provider_service_o_auth_config.rb +++ /dev/null @@ -1,283 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceOAuthConfig - # Client id generated by the identity provider. - attr_accessor :client_id - - # The endpoint where ZITADEL send the user to authenticate. - attr_accessor :authorization_endpoint - - # The endpoint where ZITADEL can get the token. - attr_accessor :token_endpoint - - # The endpoint where ZITADEL can get the user information. - attr_accessor :user_endpoint - - # The scopes requested by ZITADEL during the request on the identity provider. - attr_accessor :scopes - - # Defines how the attribute is called where ZITADEL can get the id of the user. - attr_accessor :id_attribute - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'clientId', - :'authorization_endpoint' => :'authorizationEndpoint', - :'token_endpoint' => :'tokenEndpoint', - :'user_endpoint' => :'userEndpoint', - :'scopes' => :'scopes', - :'id_attribute' => :'idAttribute' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'authorization_endpoint' => :'String', - :'token_endpoint' => :'String', - :'user_endpoint' => :'String', - :'scopes' => :'Array', - :'id_attribute' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceOAuthConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceOAuthConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'authorization_endpoint') - self.authorization_endpoint = attributes[:'authorization_endpoint'] - end - - if attributes.key?(:'token_endpoint') - self.token_endpoint = attributes[:'token_endpoint'] - end - - if attributes.key?(:'user_endpoint') - self.user_endpoint = attributes[:'user_endpoint'] - end - - if attributes.key?(:'scopes') - if (value = attributes[:'scopes']).is_a?(Array) - self.scopes = value - end - end - - if attributes.key?(:'id_attribute') - self.id_attribute = attributes[:'id_attribute'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - authorization_endpoint == o.authorization_endpoint && - token_endpoint == o.token_endpoint && - user_endpoint == o.user_endpoint && - scopes == o.scopes && - id_attribute == o.id_attribute - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, authorization_endpoint, token_endpoint, user_endpoint, scopes, id_attribute].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_options.rb b/lib/zitadel/client/models/identity_provider_service_options.rb deleted file mode 100644 index 43a19043..00000000 --- a/lib/zitadel/client/models/identity_provider_service_options.rb +++ /dev/null @@ -1,294 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceOptions - # Enable if users should be able to link an existing ZITADEL user with an external account. - attr_accessor :is_linking_allowed - - # Enable if users should be able to create a new account in ZITADEL when using an external account. - attr_accessor :is_creation_allowed - - # Enable if a new account in ZITADEL should be created automatically when login with an external account. - attr_accessor :is_auto_creation - - # Enable if a the ZITADEL account fields should be updated automatically on each login. - attr_accessor :is_auto_update - - attr_accessor :auto_linking - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'is_linking_allowed' => :'isLinkingAllowed', - :'is_creation_allowed' => :'isCreationAllowed', - :'is_auto_creation' => :'isAutoCreation', - :'is_auto_update' => :'isAutoUpdate', - :'auto_linking' => :'autoLinking' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'is_linking_allowed' => :'Boolean', - :'is_creation_allowed' => :'Boolean', - :'is_auto_creation' => :'Boolean', - :'is_auto_update' => :'Boolean', - :'auto_linking' => :'IdentityProviderServiceAutoLinkingOption' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceOptions` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'is_linking_allowed') - self.is_linking_allowed = attributes[:'is_linking_allowed'] - end - - if attributes.key?(:'is_creation_allowed') - self.is_creation_allowed = attributes[:'is_creation_allowed'] - end - - if attributes.key?(:'is_auto_creation') - self.is_auto_creation = attributes[:'is_auto_creation'] - end - - if attributes.key?(:'is_auto_update') - self.is_auto_update = attributes[:'is_auto_update'] - end - - if attributes.key?(:'auto_linking') - self.auto_linking = attributes[:'auto_linking'] - else - self.auto_linking = 'AUTO_LINKING_OPTION_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - is_linking_allowed == o.is_linking_allowed && - is_creation_allowed == o.is_creation_allowed && - is_auto_creation == o.is_auto_creation && - is_auto_update == o.is_auto_update && - auto_linking == o.auto_linking - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [is_linking_allowed, is_creation_allowed, is_auto_creation, is_auto_update, auto_linking].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_protobuf_any.rb b/lib/zitadel/client/models/identity_provider_service_protobuf_any.rb deleted file mode 100644 index 00c0d965..00000000 --- a/lib/zitadel/client/models/identity_provider_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_rpc_status.rb b/lib/zitadel/client/models/identity_provider_service_rpc_status.rb deleted file mode 100644 index ac1d7555..00000000 --- a/lib/zitadel/client/models/identity_provider_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb deleted file mode 100644 index 1c637d74..00000000 --- a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceSAMLBinding - SAML_BINDING_UNSPECIFIED = "SAML_BINDING_UNSPECIFIED".freeze - SAML_BINDING_POST = "SAML_BINDING_POST".freeze - SAML_BINDING_REDIRECT = "SAML_BINDING_REDIRECT".freeze - SAML_BINDING_ARTIFACT = "SAML_BINDING_ARTIFACT".freeze - - def self.all_vars - @all_vars ||= [SAML_BINDING_UNSPECIFIED, SAML_BINDING_POST, SAML_BINDING_REDIRECT, SAML_BINDING_ARTIFACT].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if IdentityProviderServiceSAMLBinding.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceSAMLBinding" - end - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb deleted file mode 100644 index 3676bf08..00000000 --- a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb +++ /dev/null @@ -1,295 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceSAMLConfig - # Metadata of the SAML identity provider. - attr_accessor :metadata_xml - - attr_accessor :binding - - # Boolean which defines if the authentication requests are signed. - attr_accessor :with_signed_request - - attr_accessor :name_id_format - - # 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`. - attr_accessor :transient_mapping_attribute_name - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'metadata_xml' => :'metadataXml', - :'binding' => :'binding', - :'with_signed_request' => :'withSignedRequest', - :'name_id_format' => :'nameIdFormat', - :'transient_mapping_attribute_name' => :'transientMappingAttributeName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'metadata_xml' => :'String', - :'binding' => :'IdentityProviderServiceSAMLBinding', - :'with_signed_request' => :'Boolean', - :'name_id_format' => :'IdentityProviderServiceSAMLNameIDFormat', - :'transient_mapping_attribute_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceSAMLConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceSAMLConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'metadata_xml') - self.metadata_xml = attributes[:'metadata_xml'] - end - - if attributes.key?(:'binding') - self.binding = attributes[:'binding'] - else - self.binding = 'SAML_BINDING_UNSPECIFIED' - end - - if attributes.key?(:'with_signed_request') - self.with_signed_request = attributes[:'with_signed_request'] - end - - if attributes.key?(:'name_id_format') - self.name_id_format = attributes[:'name_id_format'] - else - self.name_id_format = 'SAML_NAME_ID_FORMAT_UNSPECIFIED' - end - - if attributes.key?(:'transient_mapping_attribute_name') - self.transient_mapping_attribute_name = attributes[:'transient_mapping_attribute_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - metadata_xml == o.metadata_xml && - binding == o.binding && - with_signed_request == o.with_signed_request && - name_id_format == o.name_id_format && - transient_mapping_attribute_name == o.transient_mapping_attribute_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [metadata_xml, binding, with_signed_request, name_id_format, transient_mapping_attribute_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb deleted file mode 100644 index 71650a2f..00000000 --- a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class IdentityProviderServiceSAMLNameIDFormat - SAML_NAME_ID_FORMAT_UNSPECIFIED = "SAML_NAME_ID_FORMAT_UNSPECIFIED".freeze - SAML_NAME_ID_FORMAT_EMAIL_ADDRESS = "SAML_NAME_ID_FORMAT_EMAIL_ADDRESS".freeze - SAML_NAME_ID_FORMAT_PERSISTENT = "SAML_NAME_ID_FORMAT_PERSISTENT".freeze - SAML_NAME_ID_FORMAT_TRANSIENT = "SAML_NAME_ID_FORMAT_TRANSIENT".freeze - - def self.all_vars - @all_vars ||= [SAML_NAME_ID_FORMAT_UNSPECIFIED, SAML_NAME_ID_FORMAT_EMAIL_ADDRESS, SAML_NAME_ID_FORMAT_PERSISTENT, SAML_NAME_ID_FORMAT_TRANSIENT].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if IdentityProviderServiceSAMLNameIDFormat.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceSAMLNameIDFormat" - end - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_auth_request.rb b/lib/zitadel/client/models/o_i_d_c_service_auth_request.rb deleted file mode 100644 index e264aeab..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_auth_request.rb +++ /dev/null @@ -1,327 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceAuthRequest - # ID of the authorization request - attr_accessor :id - - # Time when the auth request was created - attr_accessor :creation_date - - # OIDC client ID of the application that created the auth request - attr_accessor :client_id - - # Requested scopes by the application, which the user must consent to. - attr_accessor :scope - - # Base URI that points back to the application - attr_accessor :redirect_uri - - # Prompts that must be displayed to the user - attr_accessor :prompt - - # 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. - attr_accessor :ui_locales - - # Login hint can be set by the application with a user identifier such as an email or phone number. - attr_accessor :login_hint - - # 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. - attr_accessor :max_age - - # User ID taken from a ID Token Hint if it was present and valid. - attr_accessor :hint_user_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'creation_date' => :'creationDate', - :'client_id' => :'clientId', - :'scope' => :'scope', - :'redirect_uri' => :'redirectUri', - :'prompt' => :'prompt', - :'ui_locales' => :'uiLocales', - :'login_hint' => :'loginHint', - :'max_age' => :'maxAge', - :'hint_user_id' => :'hintUserId' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'creation_date' => :'Time', - :'client_id' => :'String', - :'scope' => :'Array', - :'redirect_uri' => :'String', - :'prompt' => :'Array', - :'ui_locales' => :'Array', - :'login_hint' => :'String', - :'max_age' => :'String', - :'hint_user_id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceAuthRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceAuthRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'scope') - if (value = attributes[:'scope']).is_a?(Array) - self.scope = value - end - end - - if attributes.key?(:'redirect_uri') - self.redirect_uri = attributes[:'redirect_uri'] - end - - if attributes.key?(:'prompt') - if (value = attributes[:'prompt']).is_a?(Array) - self.prompt = value - end - end - - if attributes.key?(:'ui_locales') - if (value = attributes[:'ui_locales']).is_a?(Array) - self.ui_locales = value - end - end - - if attributes.key?(:'login_hint') - self.login_hint = attributes[:'login_hint'] - end - - if attributes.key?(:'max_age') - self.max_age = attributes[:'max_age'] - end - - if attributes.key?(:'hint_user_id') - self.hint_user_id = attributes[:'hint_user_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - creation_date == o.creation_date && - client_id == o.client_id && - scope == o.scope && - redirect_uri == o.redirect_uri && - prompt == o.prompt && - ui_locales == o.ui_locales && - login_hint == o.login_hint && - max_age == o.max_age && - hint_user_id == o.hint_user_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, creation_date, client_id, scope, redirect_uri, prompt, ui_locales, login_hint, max_age, hint_user_id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb b/lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb deleted file mode 100644 index 913656b9..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb +++ /dev/null @@ -1,272 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceAuthorizationError - attr_accessor :error - - attr_accessor :error_description - - attr_accessor :error_uri - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'error' => :'error', - :'error_description' => :'errorDescription', - :'error_uri' => :'errorUri' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'error' => :'OIDCServiceErrorReason', - :'error_description' => :'String', - :'error_uri' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceAuthorizationError` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceAuthorizationError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'error') - self.error = attributes[:'error'] - else - self.error = 'ERROR_REASON_UNSPECIFIED' - end - - if attributes.key?(:'error_description') - self.error_description = attributes[:'error_description'] - end - - if attributes.key?(:'error_uri') - self.error_uri = attributes[:'error_uri'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - error == o.error && - error_description == o.error_description && - error_uri == o.error_uri - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [error, error_description, error_uri].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb b/lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb deleted file mode 100644 index ab1595f3..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest - attr_accessor :session - - attr_accessor :deny - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session' => :'session', - :'deny' => :'deny' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session' => :'OIDCServiceSession', - :'deny' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session') - self.session = attributes[:'session'] - end - - if attributes.key?(:'deny') - self.deny = attributes[:'deny'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session == o.session && - deny == o.deny - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session, deny].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb b/lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb deleted file mode 100644 index 90d9fa82..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceCreateCallbackRequest - attr_accessor :session - - attr_accessor :error - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session' => :'session', - :'error' => :'error' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session' => :'OIDCServiceSession', - :'error' => :'OIDCServiceAuthorizationError' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceCreateCallbackRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceCreateCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session') - self.session = attributes[:'session'] - end - - if attributes.key?(:'error') - self.error = attributes[:'error'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session == o.session && - error == o.error - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session, error].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb b/lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb deleted file mode 100644 index 2883d8b2..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb +++ /dev/null @@ -1,240 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceCreateCallbackResponse - attr_accessor :details - - # 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. - attr_accessor :callback_url - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'callback_url' => :'callbackUrl' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'OIDCServiceDetails', - :'callback_url' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceCreateCallbackResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceCreateCallbackResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'callback_url') - self.callback_url = attributes[:'callback_url'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - callback_url == o.callback_url - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, callback_url].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_details.rb b/lib/zitadel/client/models/o_i_d_c_service_details.rb deleted file mode 100644 index 8153947b..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb b/lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb deleted file mode 100644 index d06221ca..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb +++ /dev/null @@ -1,273 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceDeviceAuthorizationRequest - # The unique identifier of the device authorization request to be used for authorizing or denying the request. - attr_accessor :id - - # The client_id of the application that initiated the device authorization request. - attr_accessor :client_id - - # The scopes requested by the application. - attr_accessor :scope - - # Name of the client application. - attr_accessor :app_name - - # Name of the project the client application is part of. - attr_accessor :project_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'client_id' => :'clientId', - :'scope' => :'scope', - :'app_name' => :'appName', - :'project_name' => :'projectName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'client_id' => :'String', - :'scope' => :'Array', - :'app_name' => :'String', - :'project_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceDeviceAuthorizationRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceDeviceAuthorizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'scope') - if (value = attributes[:'scope']).is_a?(Array) - self.scope = value - end - end - - if attributes.key?(:'app_name') - self.app_name = attributes[:'app_name'] - end - - if attributes.key?(:'project_name') - self.project_name = attributes[:'project_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - client_id == o.client_id && - scope == o.scope && - app_name == o.app_name && - project_name == o.project_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, client_id, scope, app_name, project_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_error_reason.rb b/lib/zitadel/client/models/o_i_d_c_service_error_reason.rb deleted file mode 100644 index 559d0051..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_error_reason.rb +++ /dev/null @@ -1,56 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceErrorReason - ERROR_REASON_UNSPECIFIED = "ERROR_REASON_UNSPECIFIED".freeze - ERROR_REASON_INVALID_REQUEST = "ERROR_REASON_INVALID_REQUEST".freeze - ERROR_REASON_UNAUTHORIZED_CLIENT = "ERROR_REASON_UNAUTHORIZED_CLIENT".freeze - ERROR_REASON_ACCESS_DENIED = "ERROR_REASON_ACCESS_DENIED".freeze - ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE = "ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE".freeze - ERROR_REASON_INVALID_SCOPE = "ERROR_REASON_INVALID_SCOPE".freeze - ERROR_REASON_SERVER_ERROR = "ERROR_REASON_SERVER_ERROR".freeze - ERROR_REASON_TEMPORARY_UNAVAILABLE = "ERROR_REASON_TEMPORARY_UNAVAILABLE".freeze - ERROR_REASON_INTERACTION_REQUIRED = "ERROR_REASON_INTERACTION_REQUIRED".freeze - ERROR_REASON_LOGIN_REQUIRED = "ERROR_REASON_LOGIN_REQUIRED".freeze - ERROR_REASON_ACCOUNT_SELECTION_REQUIRED = "ERROR_REASON_ACCOUNT_SELECTION_REQUIRED".freeze - ERROR_REASON_CONSENT_REQUIRED = "ERROR_REASON_CONSENT_REQUIRED".freeze - ERROR_REASON_INVALID_REQUEST_URI = "ERROR_REASON_INVALID_REQUEST_URI".freeze - ERROR_REASON_INVALID_REQUEST_OBJECT = "ERROR_REASON_INVALID_REQUEST_OBJECT".freeze - ERROR_REASON_REQUEST_NOT_SUPPORTED = "ERROR_REASON_REQUEST_NOT_SUPPORTED".freeze - ERROR_REASON_REQUEST_URI_NOT_SUPPORTED = "ERROR_REASON_REQUEST_URI_NOT_SUPPORTED".freeze - ERROR_REASON_REGISTRATION_NOT_SUPPORTED = "ERROR_REASON_REGISTRATION_NOT_SUPPORTED".freeze - - def self.all_vars - @all_vars ||= [ERROR_REASON_UNSPECIFIED, ERROR_REASON_INVALID_REQUEST, ERROR_REASON_UNAUTHORIZED_CLIENT, ERROR_REASON_ACCESS_DENIED, ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE, ERROR_REASON_INVALID_SCOPE, ERROR_REASON_SERVER_ERROR, ERROR_REASON_TEMPORARY_UNAVAILABLE, ERROR_REASON_INTERACTION_REQUIRED, ERROR_REASON_LOGIN_REQUIRED, ERROR_REASON_ACCOUNT_SELECTION_REQUIRED, ERROR_REASON_CONSENT_REQUIRED, ERROR_REASON_INVALID_REQUEST_URI, ERROR_REASON_INVALID_REQUEST_OBJECT, ERROR_REASON_REQUEST_NOT_SUPPORTED, ERROR_REASON_REQUEST_URI_NOT_SUPPORTED, ERROR_REASON_REGISTRATION_NOT_SUPPORTED].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if OIDCServiceErrorReason.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OIDCServiceErrorReason" - end - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb b/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb deleted file mode 100644 index 4fee18af..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceGetAuthRequestResponse - attr_accessor :auth_request - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'auth_request' => :'authRequest' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'auth_request' => :'OIDCServiceAuthRequest' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceGetAuthRequestResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceGetAuthRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'auth_request') - self.auth_request = attributes[:'auth_request'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - auth_request == o.auth_request - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [auth_request].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb b/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb deleted file mode 100644 index 51d48476..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceGetDeviceAuthorizationRequestResponse - attr_accessor :device_authorization_request - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'device_authorization_request' => :'deviceAuthorizationRequest' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'device_authorization_request' => :'OIDCServiceDeviceAuthorizationRequest' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceGetDeviceAuthorizationRequestResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceGetDeviceAuthorizationRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'device_authorization_request') - self.device_authorization_request = attributes[:'device_authorization_request'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - device_authorization_request == o.device_authorization_request - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [device_authorization_request].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_prompt.rb b/lib/zitadel/client/models/o_i_d_c_service_prompt.rb deleted file mode 100644 index a4368004..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_prompt.rb +++ /dev/null @@ -1,45 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServicePrompt - PROMPT_UNSPECIFIED = "PROMPT_UNSPECIFIED".freeze - PROMPT_NONE = "PROMPT_NONE".freeze - PROMPT_LOGIN = "PROMPT_LOGIN".freeze - PROMPT_CONSENT = "PROMPT_CONSENT".freeze - PROMPT_SELECT_ACCOUNT = "PROMPT_SELECT_ACCOUNT".freeze - PROMPT_CREATE = "PROMPT_CREATE".freeze - - def self.all_vars - @all_vars ||= [PROMPT_UNSPECIFIED, PROMPT_NONE, PROMPT_LOGIN, PROMPT_CONSENT, PROMPT_SELECT_ACCOUNT, PROMPT_CREATE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if OIDCServicePrompt.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OIDCServicePrompt" - end - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb b/lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb deleted file mode 100644 index 6ae4aa78..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb b/lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb deleted file mode 100644 index 11451a0f..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/o_i_d_c_service_session.rb b/lib/zitadel/client/models/o_i_d_c_service_session.rb deleted file mode 100644 index 1493e4ed..00000000 --- a/lib/zitadel/client/models/o_i_d_c_service_session.rb +++ /dev/null @@ -1,297 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OIDCServiceSession - # ID of the session, used to login the user. Connects the session to the Auth Request. - attr_accessor :session_id - - # Token to verify the session is valid - attr_accessor :session_token - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session_id' => :'sessionId', - :'session_token' => :'sessionToken' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session_id' => :'String', - :'session_token' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceSession` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session_id') - self.session_id = attributes[:'session_id'] - end - - if attributes.key?(:'session_token') - self.session_token = attributes[:'session_token'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@session_id.nil? && @session_id.to_s.length > 200 - invalid_properties.push('invalid value for "session_id", the character length must be smaller than or equal to 200.') - end - - if !@session_id.nil? && @session_id.to_s.length < 1 - invalid_properties.push('invalid value for "session_id", the character length must be great than or equal to 1.') - end - - if !@session_token.nil? && @session_token.to_s.length > 200 - invalid_properties.push('invalid value for "session_token", the character length must be smaller than or equal to 200.') - end - - if !@session_token.nil? && @session_token.to_s.length < 1 - invalid_properties.push('invalid value for "session_token", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@session_id.nil? && @session_id.to_s.length > 200 - return false if !@session_id.nil? && @session_id.to_s.length < 1 - return false if !@session_token.nil? && @session_token.to_s.length > 200 - return false if !@session_token.nil? && @session_token.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] session_id Value to be assigned - def session_id=(session_id) - if session_id.nil? - fail ArgumentError, 'session_id cannot be nil' - end - - if session_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "session_id", the character length must be smaller than or equal to 200.' - end - - if session_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "session_id", the character length must be great than or equal to 1.' - end - - @session_id = session_id - end - - # Custom attribute writer method with validation - # @param [Object] session_token Value to be assigned - def session_token=(session_token) - if session_token.nil? - fail ArgumentError, 'session_token cannot be nil' - end - - if session_token.to_s.length > 200 - fail ArgumentError, 'invalid value for "session_token", the character length must be smaller than or equal to 200.' - end - - if session_token.to_s.length < 1 - fail ArgumentError, 'invalid value for "session_token", the character length must be great than or equal to 1.' - end - - @session_token = session_token - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session_id == o.session_id && - session_token == o.session_token - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session_id, session_token].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_add_human_user_request.rb b/lib/zitadel/client/models/organization_service_add_human_user_request.rb deleted file mode 100644 index dd4838c1..00000000 --- a/lib/zitadel/client/models/organization_service_add_human_user_request.rb +++ /dev/null @@ -1,445 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceAddHumanUserRequest - # optionally set your own id unique for the user. - attr_accessor :user_id - - # optionally set a unique username, if none is provided the email will be used. - attr_accessor :username - - attr_accessor :organization - - attr_accessor :profile - - attr_accessor :email - - attr_accessor :phone - - attr_accessor :metadata - - attr_accessor :password - - attr_accessor :hashed_password - - attr_accessor :idp_links - - # 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. - attr_accessor :totp_secret - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'username' => :'username', - :'organization' => :'organization', - :'profile' => :'profile', - :'email' => :'email', - :'phone' => :'phone', - :'metadata' => :'metadata', - :'password' => :'password', - :'hashed_password' => :'hashedPassword', - :'idp_links' => :'idpLinks', - :'totp_secret' => :'totpSecret' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'username' => :'String', - :'organization' => :'Zitadelobjectv2Organization', - :'profile' => :'OrganizationServiceSetHumanProfile', - :'email' => :'OrganizationServiceSetHumanEmail', - :'phone' => :'OrganizationServiceSetHumanPhone', - :'metadata' => :'Array', - :'password' => :'OrganizationServicePassword', - :'hashed_password' => :'OrganizationServiceHashedPassword', - :'idp_links' => :'Array', - :'totp_secret' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddHumanUserRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddHumanUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'username') - self.username = attributes[:'username'] - end - - if attributes.key?(:'organization') - self.organization = attributes[:'organization'] - end - - if attributes.key?(:'profile') - self.profile = attributes[:'profile'] - else - self.profile = nil - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - else - self.email = nil - end - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - end - - if attributes.key?(:'metadata') - if (value = attributes[:'metadata']).is_a?(Array) - self.metadata = value - end - end - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - - if attributes.key?(:'hashed_password') - self.hashed_password = attributes[:'hashed_password'] - end - - if attributes.key?(:'idp_links') - if (value = attributes[:'idp_links']).is_a?(Array) - self.idp_links = value - end - end - - if attributes.key?(:'totp_secret') - self.totp_secret = attributes[:'totp_secret'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@user_id.nil? && @user_id.to_s.length > 200 - invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') - end - - if !@user_id.nil? && @user_id.to_s.length < 1 - invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') - end - - if !@username.nil? && @username.to_s.length > 200 - invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') - end - - if !@username.nil? && @username.to_s.length < 1 - invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') - end - - if @profile.nil? - invalid_properties.push('invalid value for "profile", profile cannot be nil.') - end - - if @email.nil? - invalid_properties.push('invalid value for "email", email cannot be nil.') - end - - if !@totp_secret.nil? && @totp_secret.to_s.length > 200 - invalid_properties.push('invalid value for "totp_secret", the character length must be smaller than or equal to 200.') - end - - if !@totp_secret.nil? && @totp_secret.to_s.length < 1 - invalid_properties.push('invalid value for "totp_secret", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@user_id.nil? && @user_id.to_s.length > 200 - return false if !@user_id.nil? && @user_id.to_s.length < 1 - return false if !@username.nil? && @username.to_s.length > 200 - return false if !@username.nil? && @username.to_s.length < 1 - return false if @profile.nil? - return false if @email.nil? - return false if !@totp_secret.nil? && @totp_secret.to_s.length > 200 - return false if !@totp_secret.nil? && @totp_secret.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] user_id Value to be assigned - def user_id=(user_id) - if user_id.nil? - fail ArgumentError, 'user_id cannot be nil' - end - - if user_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' - end - - if user_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' - end - - @user_id = user_id - end - - # Custom attribute writer method with validation - # @param [Object] username Value to be assigned - def username=(username) - if username.nil? - fail ArgumentError, 'username cannot be nil' - end - - if username.to_s.length > 200 - fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' - end - - if username.to_s.length < 1 - fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' - end - - @username = username - end - - # Custom attribute writer method with validation - # @param [Object] profile Value to be assigned - def profile=(profile) - if profile.nil? - fail ArgumentError, 'profile cannot be nil' - end - - @profile = profile - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if email.nil? - fail ArgumentError, 'email cannot be nil' - end - - @email = email - end - - # Custom attribute writer method with validation - # @param [Object] totp_secret Value to be assigned - def totp_secret=(totp_secret) - if totp_secret.nil? - fail ArgumentError, 'totp_secret cannot be nil' - end - - if totp_secret.to_s.length > 200 - fail ArgumentError, 'invalid value for "totp_secret", the character length must be smaller than or equal to 200.' - end - - if totp_secret.to_s.length < 1 - fail ArgumentError, 'invalid value for "totp_secret", the character length must be great than or equal to 1.' - end - - @totp_secret = totp_secret - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - username == o.username && - organization == o.organization && - profile == o.profile && - email == o.email && - phone == o.phone && - metadata == o.metadata && - password == o.password && - hashed_password == o.hashed_password && - idp_links == o.idp_links && - totp_secret == o.totp_secret - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, username, organization, profile, email, phone, metadata, password, hashed_password, idp_links, totp_secret].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_add_organization_request.rb b/lib/zitadel/client/models/organization_service_add_organization_request.rb deleted file mode 100644 index 4e94397e..00000000 --- a/lib/zitadel/client/models/organization_service_add_organization_request.rb +++ /dev/null @@ -1,276 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceAddOrganizationRequest - attr_accessor :name - - attr_accessor :admins - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'admins' => :'admins' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'name' => :'String', - :'admins' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - else - self.name = nil - end - - if attributes.key?(:'admins') - if (value = attributes[:'admins']).is_a?(Array) - self.admins = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @name.to_s.length > 200 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.') - end - - if @name.to_s.length < 1 - invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @name.nil? - return false if @name.to_s.length > 200 - return false if @name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if name.nil? - fail ArgumentError, 'name cannot be nil' - end - - if name.to_s.length > 200 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.' - end - - if name.to_s.length < 1 - fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' - end - - @name = name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - admins == o.admins - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [name, admins].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_add_organization_request_admin.rb b/lib/zitadel/client/models/organization_service_add_organization_request_admin.rb deleted file mode 100644 index d923e441..00000000 --- a/lib/zitadel/client/models/organization_service_add_organization_request_admin.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceAddOrganizationRequestAdmin - attr_accessor :user_id - - attr_accessor :human - - attr_accessor :roles - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'human' => :'human', - :'roles' => :'roles' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'human' => :'OrganizationServiceAddHumanUserRequest', - :'roles' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequestAdmin` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequestAdmin`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'human') - self.human = attributes[:'human'] - end - - if attributes.key?(:'roles') - if (value = attributes[:'roles']).is_a?(Array) - self.roles = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - human == o.human && - roles == o.roles - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, human, roles].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_add_organization_response.rb b/lib/zitadel/client/models/organization_service_add_organization_response.rb deleted file mode 100644 index 138e04c4..00000000 --- a/lib/zitadel/client/models/organization_service_add_organization_response.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceAddOrganizationResponse - attr_accessor :details - - attr_accessor :organization_id - - attr_accessor :created_admins - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'organization_id' => :'organizationId', - :'created_admins' => :'createdAdmins' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'OrganizationServiceDetails', - :'organization_id' => :'String', - :'created_admins' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'organization_id') - self.organization_id = attributes[:'organization_id'] - end - - if attributes.key?(:'created_admins') - if (value = attributes[:'created_admins']).is_a?(Array) - self.created_admins = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - organization_id == o.organization_id && - created_admins == o.created_admins - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, organization_id, created_admins].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb b/lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb deleted file mode 100644 index 9f746208..00000000 --- a/lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb +++ /dev/null @@ -1,248 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceAddOrganizationResponseCreatedAdmin - attr_accessor :user_id - - attr_accessor :email_code - - attr_accessor :phone_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'email_code' => :'emailCode', - :'phone_code' => :'phoneCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'email_code' => :'String', - :'phone_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponseCreatedAdmin` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponseCreatedAdmin`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'email_code') - self.email_code = attributes[:'email_code'] - end - - if attributes.key?(:'phone_code') - self.phone_code = attributes[:'phone_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - email_code == o.email_code && - phone_code == o.phone_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, email_code, phone_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_details.rb b/lib/zitadel/client/models/organization_service_details.rb deleted file mode 100644 index 4b8d6a89..00000000 --- a/lib/zitadel/client/models/organization_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_gender.rb b/lib/zitadel/client/models/organization_service_gender.rb deleted file mode 100644 index 935b3f19..00000000 --- a/lib/zitadel/client/models/organization_service_gender.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceGender - GENDER_UNSPECIFIED = "GENDER_UNSPECIFIED".freeze - GENDER_FEMALE = "GENDER_FEMALE".freeze - GENDER_MALE = "GENDER_MALE".freeze - GENDER_DIVERSE = "GENDER_DIVERSE".freeze - - def self.all_vars - @all_vars ||= [GENDER_UNSPECIFIED, GENDER_FEMALE, GENDER_MALE, GENDER_DIVERSE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if OrganizationServiceGender.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceGender" - end - end - -end diff --git a/lib/zitadel/client/models/organization_service_hashed_password.rb b/lib/zitadel/client/models/organization_service_hashed_password.rb deleted file mode 100644 index 232c25ef..00000000 --- a/lib/zitadel/client/models/organization_service_hashed_password.rb +++ /dev/null @@ -1,275 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceHashedPassword - # \"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\" - attr_accessor :hash - - attr_accessor :change_required - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'hash' => :'hash', - :'change_required' => :'changeRequired' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'hash' => :'String', - :'change_required' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceHashedPassword` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceHashedPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'hash') - self.hash = attributes[:'hash'] - else - self.hash = nil - end - - if attributes.key?(:'change_required') - self.change_required = attributes[:'change_required'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @hash.nil? - invalid_properties.push('invalid value for "hash", hash cannot be nil.') - end - - if @hash.to_s.length > 200 - invalid_properties.push('invalid value for "hash", the character length must be smaller than or equal to 200.') - end - - if @hash.to_s.length < 1 - invalid_properties.push('invalid value for "hash", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @hash.nil? - return false if @hash.to_s.length > 200 - return false if @hash.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] hash Value to be assigned - def hash=(hash) - if hash.nil? - fail ArgumentError, 'hash cannot be nil' - end - - if hash.to_s.length > 200 - fail ArgumentError, 'invalid value for "hash", the character length must be smaller than or equal to 200.' - end - - if hash.to_s.length < 1 - fail ArgumentError, 'invalid value for "hash", the character length must be great than or equal to 1.' - end - - @hash = hash - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - hash == o.hash && - change_required == o.change_required - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [hash, change_required].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_i_d_p_link.rb b/lib/zitadel/client/models/organization_service_i_d_p_link.rb deleted file mode 100644 index bab15485..00000000 --- a/lib/zitadel/client/models/organization_service_i_d_p_link.rb +++ /dev/null @@ -1,335 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceIDPLink - # ID of the identity provider - attr_accessor :idp_id - - # ID of the user of the identity provider - attr_accessor :user_id - - # username of the user of the identity provider - attr_accessor :user_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp_id' => :'idpId', - :'user_id' => :'userId', - :'user_name' => :'userName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp_id' => :'String', - :'user_id' => :'String', - :'user_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceIDPLink` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceIDPLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp_id') - self.idp_id = attributes[:'idp_id'] - end - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'user_name') - self.user_name = attributes[:'user_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@idp_id.nil? && @idp_id.to_s.length > 200 - invalid_properties.push('invalid value for "idp_id", the character length must be smaller than or equal to 200.') - end - - if !@idp_id.nil? && @idp_id.to_s.length < 1 - invalid_properties.push('invalid value for "idp_id", the character length must be great than or equal to 1.') - end - - if !@user_id.nil? && @user_id.to_s.length > 200 - invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') - end - - if !@user_id.nil? && @user_id.to_s.length < 1 - invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') - end - - if !@user_name.nil? && @user_name.to_s.length > 200 - invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 200.') - end - - if !@user_name.nil? && @user_name.to_s.length < 1 - invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@idp_id.nil? && @idp_id.to_s.length > 200 - return false if !@idp_id.nil? && @idp_id.to_s.length < 1 - return false if !@user_id.nil? && @user_id.to_s.length > 200 - return false if !@user_id.nil? && @user_id.to_s.length < 1 - return false if !@user_name.nil? && @user_name.to_s.length > 200 - return false if !@user_name.nil? && @user_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] idp_id Value to be assigned - def idp_id=(idp_id) - if idp_id.nil? - fail ArgumentError, 'idp_id cannot be nil' - end - - if idp_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_id", the character length must be smaller than or equal to 200.' - end - - if idp_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_id", the character length must be great than or equal to 1.' - end - - @idp_id = idp_id - end - - # Custom attribute writer method with validation - # @param [Object] user_id Value to be assigned - def user_id=(user_id) - if user_id.nil? - fail ArgumentError, 'user_id cannot be nil' - end - - if user_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' - end - - if user_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' - end - - @user_id = user_id - end - - # Custom attribute writer method with validation - # @param [Object] user_name Value to be assigned - def user_name=(user_name) - if user_name.nil? - fail ArgumentError, 'user_name cannot be nil' - end - - if user_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 200.' - end - - if user_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.' - end - - @user_name = user_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp_id == o.idp_id && - user_id == o.user_id && - user_name == o.user_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp_id, user_id, user_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_list_details.rb b/lib/zitadel/client/models/organization_service_list_details.rb deleted file mode 100644 index 5ffd426f..00000000 --- a/lib/zitadel/client/models/organization_service_list_details.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceListDetails - attr_accessor :total_result - - attr_accessor :processed_sequence - - # the last time the projection got updated - attr_accessor :timestamp - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_result' => :'totalResult', - :'processed_sequence' => :'processedSequence', - :'timestamp' => :'timestamp' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'total_result' => :'String', - :'processed_sequence' => :'String', - :'timestamp' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'total_result') - self.total_result = attributes[:'total_result'] - end - - if attributes.key?(:'processed_sequence') - self.processed_sequence = attributes[:'processed_sequence'] - end - - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total_result == o.total_result && - processed_sequence == o.processed_sequence && - timestamp == o.timestamp - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [total_result, processed_sequence, timestamp].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_list_organizations_request.rb b/lib/zitadel/client/models/organization_service_list_organizations_request.rb deleted file mode 100644 index 978396f0..00000000 --- a/lib/zitadel/client/models/organization_service_list_organizations_request.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceListOrganizationsRequest - attr_accessor :query - - attr_accessor :sorting_column - - attr_accessor :queries - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'query' => :'query', - :'sorting_column' => :'sortingColumn', - :'queries' => :'queries' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'query' => :'OrganizationServiceListQuery', - :'sorting_column' => :'OrganizationServiceOrganizationFieldName', - :'queries' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListOrganizationsRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListOrganizationsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'sorting_column') - self.sorting_column = attributes[:'sorting_column'] - else - self.sorting_column = 'ORGANIZATION_FIELD_NAME_UNSPECIFIED' - end - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query && - sorting_column == o.sorting_column && - queries == o.queries - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [query, sorting_column, queries].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_list_organizations_response.rb b/lib/zitadel/client/models/organization_service_list_organizations_response.rb deleted file mode 100644 index 0dc2d308..00000000 --- a/lib/zitadel/client/models/organization_service_list_organizations_response.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceListOrganizationsResponse - attr_accessor :details - - attr_accessor :sorting_column - - attr_accessor :result - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'sorting_column' => :'sortingColumn', - :'result' => :'result' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'OrganizationServiceListDetails', - :'sorting_column' => :'OrganizationServiceOrganizationFieldName', - :'result' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListOrganizationsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListOrganizationsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'sorting_column') - self.sorting_column = attributes[:'sorting_column'] - else - self.sorting_column = 'ORGANIZATION_FIELD_NAME_UNSPECIFIED' - end - - if attributes.key?(:'result') - if (value = attributes[:'result']).is_a?(Array) - self.result = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - sorting_column == o.sorting_column && - result == o.result - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, sorting_column, result].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_list_query.rb b/lib/zitadel/client/models/organization_service_list_query.rb deleted file mode 100644 index 23b0f181..00000000 --- a/lib/zitadel/client/models/organization_service_list_query.rb +++ /dev/null @@ -1,251 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Object unspecific list filters like offset, limit and asc/desc. - class OrganizationServiceListQuery - attr_accessor :offset - - # 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. - attr_accessor :limit - - # default is descending - attr_accessor :asc - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'offset' => :'offset', - :'limit' => :'limit', - :'asc' => :'asc' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'offset' => :'String', - :'limit' => :'Integer', - :'asc' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.key?(:'asc') - self.asc = attributes[:'asc'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - offset == o.offset && - limit == o.limit && - asc == o.asc - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [offset, limit, asc].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_organization_domain_query.rb b/lib/zitadel/client/models/organization_service_organization_domain_query.rb deleted file mode 100644 index 8050b183..00000000 --- a/lib/zitadel/client/models/organization_service_organization_domain_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceOrganizationDomainQuery - # Domain used in organization, not necessary primary domain. - attr_accessor :domain - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'domain' => :'domain', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'domain' => :'String', - :'method' => :'OrganizationServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationDomainQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationDomainQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'domain') - self.domain = attributes[:'domain'] - else - self.domain = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @domain.nil? - invalid_properties.push('invalid value for "domain", domain cannot be nil.') - end - - if @domain.to_s.length > 200 - invalid_properties.push('invalid value for "domain", the character length must be smaller than or equal to 200.') - end - - if @domain.to_s.length < 1 - invalid_properties.push('invalid value for "domain", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @domain.nil? - return false if @domain.to_s.length > 200 - return false if @domain.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] domain Value to be assigned - def domain=(domain) - if domain.nil? - fail ArgumentError, 'domain cannot be nil' - end - - if domain.to_s.length > 200 - fail ArgumentError, 'invalid value for "domain", the character length must be smaller than or equal to 200.' - end - - if domain.to_s.length < 1 - fail ArgumentError, 'invalid value for "domain", the character length must be great than or equal to 1.' - end - - @domain = domain - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - domain == o.domain && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [domain, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_organization_field_name.rb b/lib/zitadel/client/models/organization_service_organization_field_name.rb deleted file mode 100644 index c00de812..00000000 --- a/lib/zitadel/client/models/organization_service_organization_field_name.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceOrganizationFieldName - ORGANIZATION_FIELD_NAME_UNSPECIFIED = "ORGANIZATION_FIELD_NAME_UNSPECIFIED".freeze - ORGANIZATION_FIELD_NAME_NAME = "ORGANIZATION_FIELD_NAME_NAME".freeze - - def self.all_vars - @all_vars ||= [ORGANIZATION_FIELD_NAME_UNSPECIFIED, ORGANIZATION_FIELD_NAME_NAME].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if OrganizationServiceOrganizationFieldName.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceOrganizationFieldName" - end - end - -end diff --git a/lib/zitadel/client/models/organization_service_organization_i_d_query.rb b/lib/zitadel/client/models/organization_service_organization_i_d_query.rb deleted file mode 100644 index 68d26344..00000000 --- a/lib/zitadel/client/models/organization_service_organization_i_d_query.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceOrganizationIDQuery - # Unique identifier of the organization. - attr_accessor :id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationIDQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationIDQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - else - self.id = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @id.nil? - invalid_properties.push('invalid value for "id", id cannot be nil.') - end - - if @id.to_s.length > 200 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 200.') - end - - if @id.to_s.length < 1 - invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @id.nil? - return false if @id.to_s.length > 200 - return false if @id.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if id.nil? - fail ArgumentError, 'id cannot be nil' - end - - if id.to_s.length > 200 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 200.' - end - - if id.to_s.length < 1 - fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.' - end - - @id = id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_organization_name_query.rb b/lib/zitadel/client/models/organization_service_organization_name_query.rb deleted file mode 100644 index cc7b0eda..00000000 --- a/lib/zitadel/client/models/organization_service_organization_name_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceOrganizationNameQuery - # Name of the organization. - attr_accessor :name - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'name' => :'String', - :'method' => :'OrganizationServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationNameQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - else - self.name = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @name.to_s.length > 200 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.') - end - - if @name.to_s.length < 1 - invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @name.nil? - return false if @name.to_s.length > 200 - return false if @name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if name.nil? - fail ArgumentError, 'name cannot be nil' - end - - if name.to_s.length > 200 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.' - end - - if name.to_s.length < 1 - fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' - end - - @name = name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [name, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_organization_state.rb b/lib/zitadel/client/models/organization_service_organization_state.rb deleted file mode 100644 index a1f261f3..00000000 --- a/lib/zitadel/client/models/organization_service_organization_state.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceOrganizationState - ORGANIZATION_STATE_UNSPECIFIED = "ORGANIZATION_STATE_UNSPECIFIED".freeze - ORGANIZATION_STATE_ACTIVE = "ORGANIZATION_STATE_ACTIVE".freeze - ORGANIZATION_STATE_INACTIVE = "ORGANIZATION_STATE_INACTIVE".freeze - ORGANIZATION_STATE_REMOVED = "ORGANIZATION_STATE_REMOVED".freeze - - def self.all_vars - @all_vars ||= [ORGANIZATION_STATE_UNSPECIFIED, ORGANIZATION_STATE_ACTIVE, ORGANIZATION_STATE_INACTIVE, ORGANIZATION_STATE_REMOVED].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if OrganizationServiceOrganizationState.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceOrganizationState" - end - end - -end diff --git a/lib/zitadel/client/models/organization_service_organization_state_query.rb b/lib/zitadel/client/models/organization_service_organization_state_query.rb deleted file mode 100644 index ccd127ed..00000000 --- a/lib/zitadel/client/models/organization_service_organization_state_query.rb +++ /dev/null @@ -1,254 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceOrganizationStateQuery - attr_accessor :state - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'state' => :'state' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'state' => :'OrganizationServiceOrganizationState' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationStateQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationStateQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'ORGANIZATION_STATE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - state == o.state - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [state].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_password.rb b/lib/zitadel/client/models/organization_service_password.rb deleted file mode 100644 index a584ee61..00000000 --- a/lib/zitadel/client/models/organization_service_password.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServicePassword - attr_accessor :password - - attr_accessor :change_required - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'password' => :'password', - :'change_required' => :'changeRequired' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'password' => :'String', - :'change_required' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServicePassword` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServicePassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'password') - self.password = attributes[:'password'] - else - self.password = nil - end - - if attributes.key?(:'change_required') - self.change_required = attributes[:'change_required'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @password.nil? - invalid_properties.push('invalid value for "password", password cannot be nil.') - end - - if @password.to_s.length > 200 - invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') - end - - if @password.to_s.length < 1 - invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @password.nil? - return false if @password.to_s.length > 200 - return false if @password.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] password Value to be assigned - def password=(password) - if password.nil? - fail ArgumentError, 'password cannot be nil' - end - - if password.to_s.length > 200 - fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' - end - - if password.to_s.length < 1 - fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' - end - - @password = password - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - password == o.password && - change_required == o.change_required - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [password, change_required].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_protobuf_any.rb b/lib/zitadel/client/models/organization_service_protobuf_any.rb deleted file mode 100644 index 815a1efe..00000000 --- a/lib/zitadel/client/models/organization_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_rpc_status.rb b/lib/zitadel/client/models/organization_service_rpc_status.rb deleted file mode 100644 index f42b6076..00000000 --- a/lib/zitadel/client/models/organization_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_search_query.rb b/lib/zitadel/client/models/organization_service_search_query.rb deleted file mode 100644 index e6efd29b..00000000 --- a/lib/zitadel/client/models/organization_service_search_query.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceSearchQuery - attr_accessor :name_query - - attr_accessor :domain_query - - attr_accessor :state_query - - attr_accessor :id_query - - attr_accessor :default_query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name_query' => :'nameQuery', - :'domain_query' => :'domainQuery', - :'state_query' => :'stateQuery', - :'id_query' => :'idQuery', - :'default_query' => :'defaultQuery' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'name_query' => :'OrganizationServiceOrganizationNameQuery', - :'domain_query' => :'OrganizationServiceOrganizationDomainQuery', - :'state_query' => :'OrganizationServiceOrganizationStateQuery', - :'id_query' => :'OrganizationServiceOrganizationIDQuery', - :'default_query' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSearchQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSearchQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'name_query') - self.name_query = attributes[:'name_query'] - end - - if attributes.key?(:'domain_query') - self.domain_query = attributes[:'domain_query'] - end - - if attributes.key?(:'state_query') - self.state_query = attributes[:'state_query'] - end - - if attributes.key?(:'id_query') - self.id_query = attributes[:'id_query'] - end - - if attributes.key?(:'default_query') - self.default_query = attributes[:'default_query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name_query == o.name_query && - domain_query == o.domain_query && - state_query == o.state_query && - id_query == o.id_query && - default_query == o.default_query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [name_query, domain_query, state_query, id_query, default_query].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_send_email_verification_code.rb b/lib/zitadel/client/models/organization_service_send_email_verification_code.rb deleted file mode 100644 index 9f0e07e6..00000000 --- a/lib/zitadel/client/models/organization_service_send_email_verification_code.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceSendEmailVerificationCode - # 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 - attr_accessor :url_template - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'url_template' => :'urlTemplate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'url_template' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSendEmailVerificationCode` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSendEmailVerificationCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'url_template') - self.url_template = attributes[:'url_template'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@url_template.nil? && @url_template.to_s.length > 200 - invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') - end - - if !@url_template.nil? && @url_template.to_s.length < 1 - invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@url_template.nil? && @url_template.to_s.length > 200 - return false if !@url_template.nil? && @url_template.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] url_template Value to be assigned - def url_template=(url_template) - if url_template.nil? - fail ArgumentError, 'url_template cannot be nil' - end - - if url_template.to_s.length > 200 - fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' - end - - if url_template.to_s.length < 1 - fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' - end - - @url_template = url_template - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - url_template == o.url_template - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [url_template].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_set_human_email.rb b/lib/zitadel/client/models/organization_service_set_human_email.rb deleted file mode 100644 index 319a29ee..00000000 --- a/lib/zitadel/client/models/organization_service_set_human_email.rb +++ /dev/null @@ -1,292 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceSetHumanEmail - attr_accessor :email - - attr_accessor :send_code - - attr_accessor :return_code - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'email' => :'email', - :'send_code' => :'sendCode', - :'return_code' => :'returnCode', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'email' => :'String', - :'send_code' => :'OrganizationServiceSendEmailVerificationCode', - :'return_code' => :'Object', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetHumanEmail` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetHumanEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'email') - self.email = attributes[:'email'] - else - self.email = nil - end - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @email.nil? - invalid_properties.push('invalid value for "email", email cannot be nil.') - end - - if @email.to_s.length > 200 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') - end - - if @email.to_s.length < 1 - invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @email.nil? - return false if @email.to_s.length > 200 - return false if @email.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if email.nil? - fail ArgumentError, 'email cannot be nil' - end - - if email.to_s.length > 200 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' - end - - if email.to_s.length < 1 - fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' - end - - @email = email - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email == o.email && - send_code == o.send_code && - return_code == o.return_code && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [email, send_code, return_code, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_set_human_phone.rb b/lib/zitadel/client/models/organization_service_set_human_phone.rb deleted file mode 100644 index 826b79d7..00000000 --- a/lib/zitadel/client/models/organization_service_set_human_phone.rb +++ /dev/null @@ -1,276 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceSetHumanPhone - attr_accessor :phone - - attr_accessor :send_code - - attr_accessor :return_code - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'phone' => :'phone', - :'send_code' => :'sendCode', - :'return_code' => :'returnCode', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'phone' => :'String', - :'send_code' => :'Object', - :'return_code' => :'Object', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetHumanPhone` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetHumanPhone`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - end - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@phone.nil? && @phone.to_s.length > 200 - invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@phone.nil? && @phone.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] phone Value to be assigned - def phone=(phone) - if phone.nil? - fail ArgumentError, 'phone cannot be nil' - end - - if phone.to_s.length > 200 - fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' - end - - @phone = phone - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - phone == o.phone && - send_code == o.send_code && - return_code == o.return_code && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [phone, send_code, return_code, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_set_human_profile.rb b/lib/zitadel/client/models/organization_service_set_human_profile.rb deleted file mode 100644 index 5a7b5a4d..00000000 --- a/lib/zitadel/client/models/organization_service_set_human_profile.rb +++ /dev/null @@ -1,426 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceSetHumanProfile - attr_accessor :given_name - - attr_accessor :family_name - - attr_accessor :nick_name - - attr_accessor :display_name - - attr_accessor :preferred_language - - attr_accessor :gender - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'given_name' => :'givenName', - :'family_name' => :'familyName', - :'nick_name' => :'nickName', - :'display_name' => :'displayName', - :'preferred_language' => :'preferredLanguage', - :'gender' => :'gender' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'given_name' => :'String', - :'family_name' => :'String', - :'nick_name' => :'String', - :'display_name' => :'String', - :'preferred_language' => :'String', - :'gender' => :'OrganizationServiceGender' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetHumanProfile` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetHumanProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'given_name') - self.given_name = attributes[:'given_name'] - else - self.given_name = nil - end - - if attributes.key?(:'family_name') - self.family_name = attributes[:'family_name'] - else - self.family_name = nil - end - - if attributes.key?(:'nick_name') - self.nick_name = attributes[:'nick_name'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'preferred_language') - self.preferred_language = attributes[:'preferred_language'] - end - - if attributes.key?(:'gender') - self.gender = attributes[:'gender'] - else - self.gender = 'GENDER_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @given_name.nil? - invalid_properties.push('invalid value for "given_name", given_name cannot be nil.') - end - - if @given_name.to_s.length > 200 - invalid_properties.push('invalid value for "given_name", the character length must be smaller than or equal to 200.') - end - - if @given_name.to_s.length < 1 - invalid_properties.push('invalid value for "given_name", the character length must be great than or equal to 1.') - end - - if @family_name.nil? - invalid_properties.push('invalid value for "family_name", family_name cannot be nil.') - end - - if @family_name.to_s.length > 200 - invalid_properties.push('invalid value for "family_name", the character length must be smaller than or equal to 200.') - end - - if @family_name.to_s.length < 1 - invalid_properties.push('invalid value for "family_name", the character length must be great than or equal to 1.') - end - - if !@nick_name.nil? && @nick_name.to_s.length > 200 - invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') - end - - if !@display_name.nil? && @display_name.to_s.length > 200 - invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') - end - - if !@preferred_language.nil? && @preferred_language.to_s.length > 10 - invalid_properties.push('invalid value for "preferred_language", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @given_name.nil? - return false if @given_name.to_s.length > 200 - return false if @given_name.to_s.length < 1 - return false if @family_name.nil? - return false if @family_name.to_s.length > 200 - return false if @family_name.to_s.length < 1 - return false if !@nick_name.nil? && @nick_name.to_s.length > 200 - return false if !@display_name.nil? && @display_name.to_s.length > 200 - return false if !@preferred_language.nil? && @preferred_language.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] given_name Value to be assigned - def given_name=(given_name) - if given_name.nil? - fail ArgumentError, 'given_name cannot be nil' - end - - if given_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "given_name", the character length must be smaller than or equal to 200.' - end - - if given_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "given_name", the character length must be great than or equal to 1.' - end - - @given_name = given_name - end - - # Custom attribute writer method with validation - # @param [Object] family_name Value to be assigned - def family_name=(family_name) - if family_name.nil? - fail ArgumentError, 'family_name cannot be nil' - end - - if family_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "family_name", the character length must be smaller than or equal to 200.' - end - - if family_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "family_name", the character length must be great than or equal to 1.' - end - - @family_name = family_name - end - - # Custom attribute writer method with validation - # @param [Object] nick_name Value to be assigned - def nick_name=(nick_name) - if nick_name.nil? - fail ArgumentError, 'nick_name cannot be nil' - end - - if nick_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' - end - - @nick_name = nick_name - end - - # Custom attribute writer method with validation - # @param [Object] display_name Value to be assigned - def display_name=(display_name) - if display_name.nil? - fail ArgumentError, 'display_name cannot be nil' - end - - if display_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' - end - - @display_name = display_name - end - - # Custom attribute writer method with validation - # @param [Object] preferred_language Value to be assigned - def preferred_language=(preferred_language) - if preferred_language.nil? - fail ArgumentError, 'preferred_language cannot be nil' - end - - if preferred_language.to_s.length > 10 - fail ArgumentError, 'invalid value for "preferred_language", the character length must be smaller than or equal to 10.' - end - - @preferred_language = preferred_language - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - given_name == o.given_name && - family_name == o.family_name && - nick_name == o.nick_name && - display_name == o.display_name && - preferred_language == o.preferred_language && - gender == o.gender - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [given_name, family_name, nick_name, display_name, preferred_language, gender].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_set_metadata_entry.rb b/lib/zitadel/client/models/organization_service_set_metadata_entry.rb deleted file mode 100644 index d2177396..00000000 --- a/lib/zitadel/client/models/organization_service_set_metadata_entry.rb +++ /dev/null @@ -1,310 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceSetMetadataEntry - attr_accessor :key - - # The value has to be base64 encoded. - attr_accessor :value - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'key' => :'key', - :'value' => :'value' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'key' => :'String', - :'value' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetMetadataEntry` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetMetadataEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'key') - self.key = attributes[:'key'] - else - self.key = nil - end - - if attributes.key?(:'value') - self.value = attributes[:'value'] - else - self.value = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @key.nil? - invalid_properties.push('invalid value for "key", key cannot be nil.') - end - - if @key.to_s.length > 200 - invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 200.') - end - - if @key.to_s.length < 1 - invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.') - end - - if @value.nil? - invalid_properties.push('invalid value for "value", value cannot be nil.') - end - - if @value.to_s.length > 500000 - invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 500000.') - end - - if @value.to_s.length < 1 - invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @key.nil? - return false if @key.to_s.length > 200 - return false if @key.to_s.length < 1 - return false if @value.nil? - return false if @value.to_s.length > 500000 - return false if @value.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] key Value to be assigned - def key=(key) - if key.nil? - fail ArgumentError, 'key cannot be nil' - end - - if key.to_s.length > 200 - fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 200.' - end - - if key.to_s.length < 1 - fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.' - end - - @key = key - end - - # Custom attribute writer method with validation - # @param [Object] value Value to be assigned - def value=(value) - if value.nil? - fail ArgumentError, 'value cannot be nil' - end - - if value.to_s.length > 500000 - fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 500000.' - end - - if value.to_s.length < 1 - fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.' - end - - @value = value - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - key == o.key && - value == o.value - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [key, value].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/organization_service_text_query_method.rb b/lib/zitadel/client/models/organization_service_text_query_method.rb deleted file mode 100644 index 5152fe17..00000000 --- a/lib/zitadel/client/models/organization_service_text_query_method.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class OrganizationServiceTextQueryMethod - TEXT_QUERY_METHOD_EQUALS = "TEXT_QUERY_METHOD_EQUALS".freeze - TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE".freeze - TEXT_QUERY_METHOD_STARTS_WITH = "TEXT_QUERY_METHOD_STARTS_WITH".freeze - TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE".freeze - TEXT_QUERY_METHOD_CONTAINS = "TEXT_QUERY_METHOD_CONTAINS".freeze - TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE".freeze - TEXT_QUERY_METHOD_ENDS_WITH = "TEXT_QUERY_METHOD_ENDS_WITH".freeze - TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE".freeze - - def self.all_vars - @all_vars ||= [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if OrganizationServiceTextQueryMethod.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceTextQueryMethod" - end - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb b/lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb deleted file mode 100644 index 53e24906..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb +++ /dev/null @@ -1,263 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceAuthorizationError - attr_accessor :error - - attr_accessor :error_description - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'error' => :'error', - :'error_description' => :'errorDescription' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'error' => :'SAMLServiceErrorReason', - :'error_description' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceAuthorizationError` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceAuthorizationError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'error') - self.error = attributes[:'error'] - else - self.error = 'ERROR_REASON_UNSPECIFIED' - end - - if attributes.key?(:'error_description') - self.error_description = attributes[:'error_description'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - error == o.error && - error_description == o.error_description - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [error, error_description].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb b/lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb deleted file mode 100644 index 1bd0a70b..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceCreateResponseRequest - attr_accessor :session - - attr_accessor :error - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session' => :'session', - :'error' => :'error' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session' => :'SAMLServiceSession', - :'error' => :'SAMLServiceAuthorizationError' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceCreateResponseRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceCreateResponseRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session') - self.session = attributes[:'session'] - end - - if attributes.key?(:'error') - self.error = attributes[:'error'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session == o.session && - error == o.error - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session, error].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb b/lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb deleted file mode 100644 index c84d8c9f..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceCreateResponseResponse - attr_accessor :details - - # 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. - attr_accessor :url - - attr_accessor :redirect - - attr_accessor :post - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'url' => :'url', - :'redirect' => :'redirect', - :'post' => :'post' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SAMLServiceDetails', - :'url' => :'String', - :'redirect' => :'Object', - :'post' => :'SAMLServicePostResponse' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceCreateResponseResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceCreateResponseResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.key?(:'redirect') - self.redirect = attributes[:'redirect'] - end - - if attributes.key?(:'post') - self.post = attributes[:'post'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - url == o.url && - redirect == o.redirect && - post == o.post - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, url, redirect, post].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_details.rb b/lib/zitadel/client/models/s_a_m_l_service_details.rb deleted file mode 100644 index abc08358..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_error_reason.rb b/lib/zitadel/client/models/s_a_m_l_service_error_reason.rb deleted file mode 100644 index 67d3c02e..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_error_reason.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceErrorReason - ERROR_REASON_UNSPECIFIED = "ERROR_REASON_UNSPECIFIED".freeze - ERROR_REASON_VERSION_MISSMATCH = "ERROR_REASON_VERSION_MISSMATCH".freeze - ERROR_REASON_AUTH_N_FAILED = "ERROR_REASON_AUTH_N_FAILED".freeze - ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE = "ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE".freeze - ERROR_REASON_INVALID_NAMEID_POLICY = "ERROR_REASON_INVALID_NAMEID_POLICY".freeze - ERROR_REASON_REQUEST_DENIED = "ERROR_REASON_REQUEST_DENIED".freeze - ERROR_REASON_REQUEST_UNSUPPORTED = "ERROR_REASON_REQUEST_UNSUPPORTED".freeze - ERROR_REASON_UNSUPPORTED_BINDING = "ERROR_REASON_UNSUPPORTED_BINDING".freeze - - def self.all_vars - @all_vars ||= [ERROR_REASON_UNSPECIFIED, ERROR_REASON_VERSION_MISSMATCH, ERROR_REASON_AUTH_N_FAILED, ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE, ERROR_REASON_INVALID_NAMEID_POLICY, ERROR_REASON_REQUEST_DENIED, ERROR_REASON_REQUEST_UNSUPPORTED, ERROR_REASON_UNSUPPORTED_BINDING].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SAMLServiceErrorReason.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SAMLServiceErrorReason" - end - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb b/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb deleted file mode 100644 index 5e2d78d8..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceGetSAMLRequestResponse - attr_accessor :saml_request - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'saml_request' => :'samlRequest' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'saml_request' => :'SAMLServiceSAMLRequest' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceGetSAMLRequestResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceGetSAMLRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'saml_request') - self.saml_request = attributes[:'saml_request'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - saml_request == o.saml_request - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [saml_request].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_post_response.rb b/lib/zitadel/client/models/s_a_m_l_service_post_response.rb deleted file mode 100644 index 98881dd3..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_post_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServicePostResponse - attr_accessor :relay_state - - attr_accessor :saml_response - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'relay_state' => :'relayState', - :'saml_response' => :'samlResponse' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'relay_state' => :'String', - :'saml_response' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServicePostResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServicePostResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'relay_state') - self.relay_state = attributes[:'relay_state'] - end - - if attributes.key?(:'saml_response') - self.saml_response = attributes[:'saml_response'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - relay_state == o.relay_state && - saml_response == o.saml_response - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [relay_state, saml_response].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb b/lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb deleted file mode 100644 index 7e8d2def..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb b/lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb deleted file mode 100644 index e1880b5a..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb b/lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb deleted file mode 100644 index 58482625..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb +++ /dev/null @@ -1,281 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceSAMLRequest - # ID of the SAMLRequest - attr_accessor :id - - # Time when the SAMLRequest was created - attr_accessor :creation_date - - # SAML entityID of the application that created the SAMLRequest - attr_accessor :issuer - - # URL which points back to the assertion consumer service of the application - attr_accessor :assertion_consumer_service - - # RelayState provided by the application for the request - attr_accessor :relay_state - - # Binding used by the application for the request - attr_accessor :binding - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'creation_date' => :'creationDate', - :'issuer' => :'issuer', - :'assertion_consumer_service' => :'assertionConsumerService', - :'relay_state' => :'relayState', - :'binding' => :'binding' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'creation_date' => :'Time', - :'issuer' => :'String', - :'assertion_consumer_service' => :'String', - :'relay_state' => :'String', - :'binding' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceSAMLRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceSAMLRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - - if attributes.key?(:'issuer') - self.issuer = attributes[:'issuer'] - end - - if attributes.key?(:'assertion_consumer_service') - self.assertion_consumer_service = attributes[:'assertion_consumer_service'] - end - - if attributes.key?(:'relay_state') - self.relay_state = attributes[:'relay_state'] - end - - if attributes.key?(:'binding') - self.binding = attributes[:'binding'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - creation_date == o.creation_date && - issuer == o.issuer && - assertion_consumer_service == o.assertion_consumer_service && - relay_state == o.relay_state && - binding == o.binding - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, creation_date, issuer, assertion_consumer_service, relay_state, binding].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/s_a_m_l_service_session.rb b/lib/zitadel/client/models/s_a_m_l_service_session.rb deleted file mode 100644 index 3f0d5004..00000000 --- a/lib/zitadel/client/models/s_a_m_l_service_session.rb +++ /dev/null @@ -1,297 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SAMLServiceSession - # ID of the session, used to login the user. Connects the session to the SAML Request. - attr_accessor :session_id - - # Token to verify the session is valid. - attr_accessor :session_token - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session_id' => :'sessionId', - :'session_token' => :'sessionToken' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session_id' => :'String', - :'session_token' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceSession` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session_id') - self.session_id = attributes[:'session_id'] - end - - if attributes.key?(:'session_token') - self.session_token = attributes[:'session_token'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@session_id.nil? && @session_id.to_s.length > 200 - invalid_properties.push('invalid value for "session_id", the character length must be smaller than or equal to 200.') - end - - if !@session_id.nil? && @session_id.to_s.length < 1 - invalid_properties.push('invalid value for "session_id", the character length must be great than or equal to 1.') - end - - if !@session_token.nil? && @session_token.to_s.length > 200 - invalid_properties.push('invalid value for "session_token", the character length must be smaller than or equal to 200.') - end - - if !@session_token.nil? && @session_token.to_s.length < 1 - invalid_properties.push('invalid value for "session_token", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@session_id.nil? && @session_id.to_s.length > 200 - return false if !@session_id.nil? && @session_id.to_s.length < 1 - return false if !@session_token.nil? && @session_token.to_s.length > 200 - return false if !@session_token.nil? && @session_token.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] session_id Value to be assigned - def session_id=(session_id) - if session_id.nil? - fail ArgumentError, 'session_id cannot be nil' - end - - if session_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "session_id", the character length must be smaller than or equal to 200.' - end - - if session_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "session_id", the character length must be great than or equal to 1.' - end - - @session_id = session_id - end - - # Custom attribute writer method with validation - # @param [Object] session_token Value to be assigned - def session_token=(session_token) - if session_token.nil? - fail ArgumentError, 'session_token cannot be nil' - end - - if session_token.to_s.length > 200 - fail ArgumentError, 'invalid value for "session_token", the character length must be smaller than or equal to 200.' - end - - if session_token.to_s.length < 1 - fail ArgumentError, 'invalid value for "session_token", the character length must be great than or equal to 1.' - end - - @session_token = session_token - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session_id == o.session_id && - session_token == o.session_token - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session_id, session_token].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_challenges.rb b/lib/zitadel/client/models/session_service_challenges.rb deleted file mode 100644 index 698085ff..00000000 --- a/lib/zitadel/client/models/session_service_challenges.rb +++ /dev/null @@ -1,248 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceChallenges - attr_accessor :web_auth_n - - attr_accessor :otp_sms - - attr_accessor :otp_email - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'web_auth_n' => :'webAuthN', - :'otp_sms' => :'otpSms', - :'otp_email' => :'otpEmail' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'web_auth_n' => :'SessionServiceChallengesWebAuthN', - :'otp_sms' => :'String', - :'otp_email' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceChallenges` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceChallenges`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'web_auth_n') - self.web_auth_n = attributes[:'web_auth_n'] - end - - if attributes.key?(:'otp_sms') - self.otp_sms = attributes[:'otp_sms'] - end - - if attributes.key?(:'otp_email') - self.otp_email = attributes[:'otp_email'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - web_auth_n == o.web_auth_n && - otp_sms == o.otp_sms && - otp_email == o.otp_email - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [web_auth_n, otp_sms, otp_email].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_challenges_web_auth_n.rb b/lib/zitadel/client/models/session_service_challenges_web_auth_n.rb deleted file mode 100644 index 993d463d..00000000 --- a/lib/zitadel/client/models/session_service_challenges_web_auth_n.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceChallengesWebAuthN - # 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 - attr_accessor :public_key_credential_request_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'public_key_credential_request_options' => :'publicKeyCredentialRequestOptions' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'public_key_credential_request_options' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceChallengesWebAuthN` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceChallengesWebAuthN`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'public_key_credential_request_options') - self.public_key_credential_request_options = attributes[:'public_key_credential_request_options'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - public_key_credential_request_options == o.public_key_credential_request_options - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [public_key_credential_request_options].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_check_i_d_p_intent.rb b/lib/zitadel/client/models/session_service_check_i_d_p_intent.rb deleted file mode 100644 index a9cde4b0..00000000 --- a/lib/zitadel/client/models/session_service_check_i_d_p_intent.rb +++ /dev/null @@ -1,297 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCheckIDPIntent - # ID of the idp intent, previously returned on the success response of the IDP callback - attr_accessor :idp_intent_id - - # token of the idp intent, previously returned on the success response of the IDP callback - attr_accessor :idp_intent_token - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp_intent_id' => :'idpIntentId', - :'idp_intent_token' => :'idpIntentToken' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp_intent_id' => :'String', - :'idp_intent_token' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckIDPIntent` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckIDPIntent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp_intent_id') - self.idp_intent_id = attributes[:'idp_intent_id'] - end - - if attributes.key?(:'idp_intent_token') - self.idp_intent_token = attributes[:'idp_intent_token'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 - invalid_properties.push('invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.') - end - - if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 - invalid_properties.push('invalid value for "idp_intent_id", the character length must be great than or equal to 1.') - end - - if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 - invalid_properties.push('invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.') - end - - if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 - invalid_properties.push('invalid value for "idp_intent_token", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 - return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 - return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 - return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] idp_intent_id Value to be assigned - def idp_intent_id=(idp_intent_id) - if idp_intent_id.nil? - fail ArgumentError, 'idp_intent_id cannot be nil' - end - - if idp_intent_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.' - end - - if idp_intent_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be great than or equal to 1.' - end - - @idp_intent_id = idp_intent_id - end - - # Custom attribute writer method with validation - # @param [Object] idp_intent_token Value to be assigned - def idp_intent_token=(idp_intent_token) - if idp_intent_token.nil? - fail ArgumentError, 'idp_intent_token cannot be nil' - end - - if idp_intent_token.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.' - end - - if idp_intent_token.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be great than or equal to 1.' - end - - @idp_intent_token = idp_intent_token - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp_intent_id == o.idp_intent_id && - idp_intent_token == o.idp_intent_token - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp_intent_id, idp_intent_token].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_check_o_t_p.rb b/lib/zitadel/client/models/session_service_check_o_t_p.rb deleted file mode 100644 index 27e0cb01..00000000 --- a/lib/zitadel/client/models/session_service_check_o_t_p.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCheckOTP - attr_accessor :code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckOTP` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckOTP`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length < 1 - invalid_properties.push('invalid value for "code", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@code.nil? && @code.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if code.nil? - fail ArgumentError, 'code cannot be nil' - end - - if code.to_s.length < 1 - fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 1.' - end - - @code = code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_check_password.rb b/lib/zitadel/client/models/session_service_check_password.rb deleted file mode 100644 index c815ab40..00000000 --- a/lib/zitadel/client/models/session_service_check_password.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCheckPassword - attr_accessor :password - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'password' => :'password' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'password' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckPassword` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@password.nil? && @password.to_s.length > 200 - invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') - end - - if !@password.nil? && @password.to_s.length < 1 - invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@password.nil? && @password.to_s.length > 200 - return false if !@password.nil? && @password.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] password Value to be assigned - def password=(password) - if password.nil? - fail ArgumentError, 'password cannot be nil' - end - - if password.to_s.length > 200 - fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' - end - - if password.to_s.length < 1 - fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' - end - - @password = password - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - password == o.password - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [password].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_check_t_o_t_p.rb b/lib/zitadel/client/models/session_service_check_t_o_t_p.rb deleted file mode 100644 index aef73e2d..00000000 --- a/lib/zitadel/client/models/session_service_check_t_o_t_p.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCheckTOTP - attr_accessor :code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckTOTP` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckTOTP`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@code.nil? && @code.to_s.length > 6 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 6.') - end - - if !@code.nil? && @code.to_s.length < 6 - invalid_properties.push('invalid value for "code", the character length must be great than or equal to 6.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@code.nil? && @code.to_s.length > 6 - return false if !@code.nil? && @code.to_s.length < 6 - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if code.nil? - fail ArgumentError, 'code cannot be nil' - end - - if code.to_s.length > 6 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 6.' - end - - if code.to_s.length < 6 - fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 6.' - end - - @code = code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_check_user.rb b/lib/zitadel/client/models/session_service_check_user.rb deleted file mode 100644 index 9f275195..00000000 --- a/lib/zitadel/client/models/session_service_check_user.rb +++ /dev/null @@ -1,295 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCheckUser - attr_accessor :user_id - - attr_accessor :login_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'login_name' => :'loginName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'login_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckUser` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'login_name') - self.login_name = attributes[:'login_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@user_id.nil? && @user_id.to_s.length > 200 - invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') - end - - if !@user_id.nil? && @user_id.to_s.length < 1 - invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') - end - - if !@login_name.nil? && @login_name.to_s.length > 200 - invalid_properties.push('invalid value for "login_name", the character length must be smaller than or equal to 200.') - end - - if !@login_name.nil? && @login_name.to_s.length < 1 - invalid_properties.push('invalid value for "login_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@user_id.nil? && @user_id.to_s.length > 200 - return false if !@user_id.nil? && @user_id.to_s.length < 1 - return false if !@login_name.nil? && @login_name.to_s.length > 200 - return false if !@login_name.nil? && @login_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] user_id Value to be assigned - def user_id=(user_id) - if user_id.nil? - fail ArgumentError, 'user_id cannot be nil' - end - - if user_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' - end - - if user_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' - end - - @user_id = user_id - end - - # Custom attribute writer method with validation - # @param [Object] login_name Value to be assigned - def login_name=(login_name) - if login_name.nil? - fail ArgumentError, 'login_name cannot be nil' - end - - if login_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "login_name", the character length must be smaller than or equal to 200.' - end - - if login_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "login_name", the character length must be great than or equal to 1.' - end - - @login_name = login_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - login_name == o.login_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, login_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_check_web_auth_n.rb b/lib/zitadel/client/models/session_service_check_web_auth_n.rb deleted file mode 100644 index 0a786577..00000000 --- a/lib/zitadel/client/models/session_service_check_web_auth_n.rb +++ /dev/null @@ -1,248 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCheckWebAuthN - # JSON representation of public key credential issued by the webAuthN client - attr_accessor :credential_assertion_data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'credential_assertion_data' => :'credentialAssertionData' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'credential_assertion_data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckWebAuthN` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckWebAuthN`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'credential_assertion_data') - self.credential_assertion_data = attributes[:'credential_assertion_data'] - else - self.credential_assertion_data = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @credential_assertion_data.nil? - invalid_properties.push('invalid value for "credential_assertion_data", credential_assertion_data cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @credential_assertion_data.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] credential_assertion_data Value to be assigned - def credential_assertion_data=(credential_assertion_data) - if credential_assertion_data.nil? - fail ArgumentError, 'credential_assertion_data cannot be nil' - end - - @credential_assertion_data = credential_assertion_data - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - credential_assertion_data == o.credential_assertion_data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [credential_assertion_data].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_checks.rb b/lib/zitadel/client/models/session_service_checks.rb deleted file mode 100644 index ad5c6577..00000000 --- a/lib/zitadel/client/models/session_service_checks.rb +++ /dev/null @@ -1,284 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceChecks - attr_accessor :user - - attr_accessor :password - - attr_accessor :web_auth_n - - attr_accessor :idp_intent - - attr_accessor :totp - - attr_accessor :otp_sms - - attr_accessor :otp_email - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user' => :'user', - :'password' => :'password', - :'web_auth_n' => :'webAuthN', - :'idp_intent' => :'idpIntent', - :'totp' => :'totp', - :'otp_sms' => :'otpSms', - :'otp_email' => :'otpEmail' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user' => :'SessionServiceCheckUser', - :'password' => :'SessionServiceCheckPassword', - :'web_auth_n' => :'SessionServiceCheckWebAuthN', - :'idp_intent' => :'SessionServiceCheckIDPIntent', - :'totp' => :'SessionServiceCheckTOTP', - :'otp_sms' => :'SessionServiceCheckOTP', - :'otp_email' => :'SessionServiceCheckOTP' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceChecks` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceChecks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user') - self.user = attributes[:'user'] - end - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - - if attributes.key?(:'web_auth_n') - self.web_auth_n = attributes[:'web_auth_n'] - end - - if attributes.key?(:'idp_intent') - self.idp_intent = attributes[:'idp_intent'] - end - - if attributes.key?(:'totp') - self.totp = attributes[:'totp'] - end - - if attributes.key?(:'otp_sms') - self.otp_sms = attributes[:'otp_sms'] - end - - if attributes.key?(:'otp_email') - self.otp_email = attributes[:'otp_email'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user == o.user && - password == o.password && - web_auth_n == o.web_auth_n && - idp_intent == o.idp_intent && - totp == o.totp && - otp_sms == o.otp_sms && - otp_email == o.otp_email - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user, password, web_auth_n, idp_intent, totp, otp_sms, otp_email].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_create_session_request.rb b/lib/zitadel/client/models/session_service_create_session_request.rb deleted file mode 100644 index caa4d95e..00000000 --- a/lib/zitadel/client/models/session_service_create_session_request.rb +++ /dev/null @@ -1,270 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCreateSessionRequest - attr_accessor :checks - - # \"custom key value list to be stored on the session\" - attr_accessor :metadata - - attr_accessor :challenges - - attr_accessor :user_agent - - # \"duration (in seconds) after which the session will be automatically invalidated\" - attr_accessor :lifetime - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'checks' => :'checks', - :'metadata' => :'metadata', - :'challenges' => :'challenges', - :'user_agent' => :'userAgent', - :'lifetime' => :'lifetime' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'checks' => :'SessionServiceChecks', - :'metadata' => :'Hash', - :'challenges' => :'SessionServiceRequestChallenges', - :'user_agent' => :'SessionServiceUserAgent', - :'lifetime' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreateSessionRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreateSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'checks') - self.checks = attributes[:'checks'] - end - - if attributes.key?(:'metadata') - if (value = attributes[:'metadata']).is_a?(Hash) - self.metadata = value - end - end - - if attributes.key?(:'challenges') - self.challenges = attributes[:'challenges'] - end - - if attributes.key?(:'user_agent') - self.user_agent = attributes[:'user_agent'] - end - - if attributes.key?(:'lifetime') - self.lifetime = attributes[:'lifetime'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - checks == o.checks && - metadata == o.metadata && - challenges == o.challenges && - user_agent == o.user_agent && - lifetime == o.lifetime - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [checks, metadata, challenges, user_agent, lifetime].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_create_session_response.rb b/lib/zitadel/client/models/session_service_create_session_response.rb deleted file mode 100644 index 08b5cdc3..00000000 --- a/lib/zitadel/client/models/session_service_create_session_response.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCreateSessionResponse - attr_accessor :details - - # \"id of the session\" - attr_accessor :session_id - - # \"The current token of the session, which is required for delete session, get session or the request of other resources.\" - attr_accessor :session_token - - attr_accessor :challenges - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'session_id' => :'sessionId', - :'session_token' => :'sessionToken', - :'challenges' => :'challenges' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SessionServiceDetails', - :'session_id' => :'String', - :'session_token' => :'String', - :'challenges' => :'SessionServiceChallenges' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreateSessionResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreateSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'session_id') - self.session_id = attributes[:'session_id'] - end - - if attributes.key?(:'session_token') - self.session_token = attributes[:'session_token'] - end - - if attributes.key?(:'challenges') - self.challenges = attributes[:'challenges'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - session_id == o.session_id && - session_token == o.session_token && - challenges == o.challenges - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, session_id, session_token, challenges].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_creation_date_query.rb b/lib/zitadel/client/models/session_service_creation_date_query.rb deleted file mode 100644 index d8a83f13..00000000 --- a/lib/zitadel/client/models/session_service_creation_date_query.rb +++ /dev/null @@ -1,263 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCreationDateQuery - attr_accessor :creation_date - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'creation_date' => :'creationDate', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'creation_date' => :'Time', - :'method' => :'SessionServiceTimestampQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreationDateQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreationDateQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TIMESTAMP_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - creation_date == o.creation_date && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [creation_date, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_creator_query.rb b/lib/zitadel/client/models/session_service_creator_query.rb deleted file mode 100644 index 51185823..00000000 --- a/lib/zitadel/client/models/session_service_creator_query.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceCreatorQuery - # ID of the user who created the session. If empty, the calling user's ID is used. - attr_accessor :id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreatorQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreatorQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@id.nil? && @id.to_s.length > 200 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@id.nil? && @id.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if id.nil? - fail ArgumentError, 'id cannot be nil' - end - - if id.to_s.length > 200 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 200.' - end - - @id = id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_delete_session_request.rb b/lib/zitadel/client/models/session_service_delete_session_request.rb deleted file mode 100644 index 7bb5d5d7..00000000 --- a/lib/zitadel/client/models/session_service_delete_session_request.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceDeleteSessionRequest - # \"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.\" - attr_accessor :session_token - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session_token' => :'sessionToken' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session_token' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceDeleteSessionRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceDeleteSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session_token') - self.session_token = attributes[:'session_token'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session_token == o.session_token - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session_token].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_delete_session_response.rb b/lib/zitadel/client/models/session_service_delete_session_response.rb deleted file mode 100644 index 3a73d74a..00000000 --- a/lib/zitadel/client/models/session_service_delete_session_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceDeleteSessionResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SessionServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceDeleteSessionResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceDeleteSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_details.rb b/lib/zitadel/client/models/session_service_details.rb deleted file mode 100644 index bdc7f55b..00000000 --- a/lib/zitadel/client/models/session_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_factors.rb b/lib/zitadel/client/models/session_service_factors.rb deleted file mode 100644 index 41c73301..00000000 --- a/lib/zitadel/client/models/session_service_factors.rb +++ /dev/null @@ -1,284 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceFactors - attr_accessor :user - - attr_accessor :password - - attr_accessor :web_auth_n - - attr_accessor :intent - - attr_accessor :totp - - attr_accessor :otp_sms - - attr_accessor :otp_email - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user' => :'user', - :'password' => :'password', - :'web_auth_n' => :'webAuthN', - :'intent' => :'intent', - :'totp' => :'totp', - :'otp_sms' => :'otpSms', - :'otp_email' => :'otpEmail' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user' => :'SessionServiceUserFactor', - :'password' => :'SessionServicePasswordFactor', - :'web_auth_n' => :'SessionServiceWebAuthNFactor', - :'intent' => :'SessionServiceIntentFactor', - :'totp' => :'SessionServiceTOTPFactor', - :'otp_sms' => :'SessionServiceOTPFactor', - :'otp_email' => :'SessionServiceOTPFactor' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceFactors` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceFactors`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user') - self.user = attributes[:'user'] - end - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - - if attributes.key?(:'web_auth_n') - self.web_auth_n = attributes[:'web_auth_n'] - end - - if attributes.key?(:'intent') - self.intent = attributes[:'intent'] - end - - if attributes.key?(:'totp') - self.totp = attributes[:'totp'] - end - - if attributes.key?(:'otp_sms') - self.otp_sms = attributes[:'otp_sms'] - end - - if attributes.key?(:'otp_email') - self.otp_email = attributes[:'otp_email'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user == o.user && - password == o.password && - web_auth_n == o.web_auth_n && - intent == o.intent && - totp == o.totp && - otp_sms == o.otp_sms && - otp_email == o.otp_email - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user, password, web_auth_n, intent, totp, otp_sms, otp_email].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_get_session_response.rb b/lib/zitadel/client/models/session_service_get_session_response.rb deleted file mode 100644 index 697656d8..00000000 --- a/lib/zitadel/client/models/session_service_get_session_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceGetSessionResponse - attr_accessor :session - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session' => :'session' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session' => :'SessionServiceSession' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceGetSessionResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceGetSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session') - self.session = attributes[:'session'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session == o.session - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_i_ds_query.rb b/lib/zitadel/client/models/session_service_i_ds_query.rb deleted file mode 100644 index 13deb1d9..00000000 --- a/lib/zitadel/client/models/session_service_i_ds_query.rb +++ /dev/null @@ -1,232 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceIDsQuery - attr_accessor :ids - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'ids' => :'ids' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'ids' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceIDsQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceIDsQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'ids') - if (value = attributes[:'ids']).is_a?(Array) - self.ids = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ids == o.ids - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [ids].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_intent_factor.rb b/lib/zitadel/client/models/session_service_intent_factor.rb deleted file mode 100644 index 2e7c9a97..00000000 --- a/lib/zitadel/client/models/session_service_intent_factor.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceIntentFactor - # \"time when an intent was last checked\" - attr_accessor :verified_at - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verified_at' => :'verifiedAt' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verified_at' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceIntentFactor` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceIntentFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verified_at') - self.verified_at = attributes[:'verified_at'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verified_at == o.verified_at - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verified_at].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_list_details.rb b/lib/zitadel/client/models/session_service_list_details.rb deleted file mode 100644 index 2ba8edb3..00000000 --- a/lib/zitadel/client/models/session_service_list_details.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceListDetails - attr_accessor :total_result - - attr_accessor :processed_sequence - - # the last time the projection got updated - attr_accessor :timestamp - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_result' => :'totalResult', - :'processed_sequence' => :'processedSequence', - :'timestamp' => :'timestamp' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'total_result' => :'String', - :'processed_sequence' => :'String', - :'timestamp' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'total_result') - self.total_result = attributes[:'total_result'] - end - - if attributes.key?(:'processed_sequence') - self.processed_sequence = attributes[:'processed_sequence'] - end - - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total_result == o.total_result && - processed_sequence == o.processed_sequence && - timestamp == o.timestamp - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [total_result, processed_sequence, timestamp].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_list_query.rb b/lib/zitadel/client/models/session_service_list_query.rb deleted file mode 100644 index 474220b8..00000000 --- a/lib/zitadel/client/models/session_service_list_query.rb +++ /dev/null @@ -1,251 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Object unspecific list filters like offset, limit and asc/desc. - class SessionServiceListQuery - attr_accessor :offset - - # 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. - attr_accessor :limit - - # default is descending - attr_accessor :asc - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'offset' => :'offset', - :'limit' => :'limit', - :'asc' => :'asc' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'offset' => :'String', - :'limit' => :'Integer', - :'asc' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.key?(:'asc') - self.asc = attributes[:'asc'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - offset == o.offset && - limit == o.limit && - asc == o.asc - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [offset, limit, asc].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_list_sessions_request.rb b/lib/zitadel/client/models/session_service_list_sessions_request.rb deleted file mode 100644 index 5ae30ae0..00000000 --- a/lib/zitadel/client/models/session_service_list_sessions_request.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceListSessionsRequest - attr_accessor :query - - attr_accessor :queries - - attr_accessor :sorting_column - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'query' => :'query', - :'queries' => :'queries', - :'sorting_column' => :'sortingColumn' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'query' => :'SessionServiceListQuery', - :'queries' => :'Array', - :'sorting_column' => :'SessionServiceSessionFieldName' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListSessionsRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListSessionsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - - if attributes.key?(:'sorting_column') - self.sorting_column = attributes[:'sorting_column'] - else - self.sorting_column = 'SESSION_FIELD_NAME_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query && - queries == o.queries && - sorting_column == o.sorting_column - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [query, queries, sorting_column].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_list_sessions_response.rb b/lib/zitadel/client/models/session_service_list_sessions_response.rb deleted file mode 100644 index 7c7843b6..00000000 --- a/lib/zitadel/client/models/session_service_list_sessions_response.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceListSessionsResponse - attr_accessor :details - - attr_accessor :sessions - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'sessions' => :'sessions' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SessionServiceListDetails', - :'sessions' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListSessionsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListSessionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'sessions') - if (value = attributes[:'sessions']).is_a?(Array) - self.sessions = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - sessions == o.sessions - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, sessions].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb b/lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb deleted file mode 100644 index 5d961491..00000000 --- a/lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceOTPEmailSendCode - # 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 - attr_accessor :url_template - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'url_template' => :'urlTemplate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'url_template' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceOTPEmailSendCode` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceOTPEmailSendCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'url_template') - self.url_template = attributes[:'url_template'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@url_template.nil? && @url_template.to_s.length > 200 - invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') - end - - if !@url_template.nil? && @url_template.to_s.length < 1 - invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@url_template.nil? && @url_template.to_s.length > 200 - return false if !@url_template.nil? && @url_template.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] url_template Value to be assigned - def url_template=(url_template) - if url_template.nil? - fail ArgumentError, 'url_template cannot be nil' - end - - if url_template.to_s.length > 200 - fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' - end - - if url_template.to_s.length < 1 - fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' - end - - @url_template = url_template - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - url_template == o.url_template - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [url_template].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_o_t_p_factor.rb b/lib/zitadel/client/models/session_service_o_t_p_factor.rb deleted file mode 100644 index 4ca3a445..00000000 --- a/lib/zitadel/client/models/session_service_o_t_p_factor.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceOTPFactor - # \"time when the One-Time Password was last checked\" - attr_accessor :verified_at - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verified_at' => :'verifiedAt' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verified_at' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceOTPFactor` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceOTPFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verified_at') - self.verified_at = attributes[:'verified_at'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verified_at == o.verified_at - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verified_at].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_password_factor.rb b/lib/zitadel/client/models/session_service_password_factor.rb deleted file mode 100644 index 019af5d6..00000000 --- a/lib/zitadel/client/models/session_service_password_factor.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServicePasswordFactor - # \"time when the password was last checked\" - attr_accessor :verified_at - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verified_at' => :'verifiedAt' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verified_at' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServicePasswordFactor` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServicePasswordFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verified_at') - self.verified_at = attributes[:'verified_at'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verified_at == o.verified_at - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verified_at].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_protobuf_any.rb b/lib/zitadel/client/models/session_service_protobuf_any.rb deleted file mode 100644 index 0d1a4038..00000000 --- a/lib/zitadel/client/models/session_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_request_challenges.rb b/lib/zitadel/client/models/session_service_request_challenges.rb deleted file mode 100644 index a4b73df2..00000000 --- a/lib/zitadel/client/models/session_service_request_challenges.rb +++ /dev/null @@ -1,248 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceRequestChallenges - attr_accessor :web_auth_n - - attr_accessor :otp_sms - - attr_accessor :otp_email - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'web_auth_n' => :'webAuthN', - :'otp_sms' => :'otpSms', - :'otp_email' => :'otpEmail' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'web_auth_n' => :'SessionServiceRequestChallengesWebAuthN', - :'otp_sms' => :'SessionServiceRequestChallengesOTPSMS', - :'otp_email' => :'SessionServiceRequestChallengesOTPEmail' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallenges` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallenges`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'web_auth_n') - self.web_auth_n = attributes[:'web_auth_n'] - end - - if attributes.key?(:'otp_sms') - self.otp_sms = attributes[:'otp_sms'] - end - - if attributes.key?(:'otp_email') - self.otp_email = attributes[:'otp_email'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - web_auth_n == o.web_auth_n && - otp_sms == o.otp_sms && - otp_email == o.otp_email - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [web_auth_n, otp_sms, otp_email].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb b/lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb deleted file mode 100644 index 4fddc4e2..00000000 --- a/lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceRequestChallengesOTPEmail - attr_accessor :send_code - - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'send_code' => :'sendCode', - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'send_code' => :'SessionServiceOTPEmailSendCode', - :'return_code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPEmail` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - send_code == o.send_code && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [send_code, return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb b/lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb deleted file mode 100644 index 3ff6f216..00000000 --- a/lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceRequestChallengesOTPSMS - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'return_code' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPSMS` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPSMS`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb b/lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb deleted file mode 100644 index 33c7350f..00000000 --- a/lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb +++ /dev/null @@ -1,296 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceRequestChallengesWebAuthN - # \"Domain on which the session was created. Will be used in the WebAuthN challenge.\" - attr_accessor :domain - - attr_accessor :user_verification_requirement - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'domain' => :'domain', - :'user_verification_requirement' => :'userVerificationRequirement' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'domain' => :'String', - :'user_verification_requirement' => :'SessionServiceUserVerificationRequirement' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallengesWebAuthN` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallengesWebAuthN`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'domain') - self.domain = attributes[:'domain'] - else - self.domain = nil - end - - if attributes.key?(:'user_verification_requirement') - self.user_verification_requirement = attributes[:'user_verification_requirement'] - else - self.user_verification_requirement = 'USER_VERIFICATION_REQUIREMENT_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @domain.nil? - invalid_properties.push('invalid value for "domain", domain cannot be nil.') - end - - if @user_verification_requirement.nil? - invalid_properties.push('invalid value for "user_verification_requirement", user_verification_requirement cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @domain.nil? - return false if @user_verification_requirement.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] domain Value to be assigned - def domain=(domain) - if domain.nil? - fail ArgumentError, 'domain cannot be nil' - end - - @domain = domain - end - - # Custom attribute writer method with validation - # @param [Object] user_verification_requirement Value to be assigned - def user_verification_requirement=(user_verification_requirement) - if user_verification_requirement.nil? - fail ArgumentError, 'user_verification_requirement cannot be nil' - end - - @user_verification_requirement = user_verification_requirement - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - domain == o.domain && - user_verification_requirement == o.user_verification_requirement - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [domain, user_verification_requirement].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_rpc_status.rb b/lib/zitadel/client/models/session_service_rpc_status.rb deleted file mode 100644 index 39bc2f5c..00000000 --- a/lib/zitadel/client/models/session_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_search_query.rb b/lib/zitadel/client/models/session_service_search_query.rb deleted file mode 100644 index 4b92a5ea..00000000 --- a/lib/zitadel/client/models/session_service_search_query.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceSearchQuery - attr_accessor :ids_query - - attr_accessor :user_id_query - - attr_accessor :creation_date_query - - attr_accessor :creator_query - - attr_accessor :user_agent_query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'ids_query' => :'idsQuery', - :'user_id_query' => :'userIdQuery', - :'creation_date_query' => :'creationDateQuery', - :'creator_query' => :'creatorQuery', - :'user_agent_query' => :'userAgentQuery' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'ids_query' => :'SessionServiceIDsQuery', - :'user_id_query' => :'SessionServiceUserIDQuery', - :'creation_date_query' => :'SessionServiceCreationDateQuery', - :'creator_query' => :'SessionServiceCreatorQuery', - :'user_agent_query' => :'SessionServiceUserAgentQuery' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSearchQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSearchQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'ids_query') - self.ids_query = attributes[:'ids_query'] - end - - if attributes.key?(:'user_id_query') - self.user_id_query = attributes[:'user_id_query'] - end - - if attributes.key?(:'creation_date_query') - self.creation_date_query = attributes[:'creation_date_query'] - end - - if attributes.key?(:'creator_query') - self.creator_query = attributes[:'creator_query'] - end - - if attributes.key?(:'user_agent_query') - self.user_agent_query = attributes[:'user_agent_query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ids_query == o.ids_query && - user_id_query == o.user_id_query && - creation_date_query == o.creation_date_query && - creator_query == o.creator_query && - user_agent_query == o.user_agent_query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [ids_query, user_id_query, creation_date_query, creator_query, user_agent_query].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_session.rb b/lib/zitadel/client/models/session_service_session.rb deleted file mode 100644 index 4757ec4c..00000000 --- a/lib/zitadel/client/models/session_service_session.rb +++ /dev/null @@ -1,301 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceSession - # \"id of the session\" - attr_accessor :id - - # \"time when the session was created\" - attr_accessor :creation_date - - # \"time when the session was last updated\" - attr_accessor :change_date - - # \"sequence of the session\" - attr_accessor :sequence - - attr_accessor :factors - - # \"custom key value list\" - attr_accessor :metadata - - attr_accessor :user_agent - - # \"time the session will be automatically invalidated\" - attr_accessor :expiration_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'creation_date' => :'creationDate', - :'change_date' => :'changeDate', - :'sequence' => :'sequence', - :'factors' => :'factors', - :'metadata' => :'metadata', - :'user_agent' => :'userAgent', - :'expiration_date' => :'expirationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'creation_date' => :'Time', - :'change_date' => :'Time', - :'sequence' => :'String', - :'factors' => :'SessionServiceFactors', - :'metadata' => :'Hash', - :'user_agent' => :'SessionServiceUserAgent', - :'expiration_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSession` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'factors') - self.factors = attributes[:'factors'] - end - - if attributes.key?(:'metadata') - if (value = attributes[:'metadata']).is_a?(Hash) - self.metadata = value - end - end - - if attributes.key?(:'user_agent') - self.user_agent = attributes[:'user_agent'] - end - - if attributes.key?(:'expiration_date') - self.expiration_date = attributes[:'expiration_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - creation_date == o.creation_date && - change_date == o.change_date && - sequence == o.sequence && - factors == o.factors && - metadata == o.metadata && - user_agent == o.user_agent && - expiration_date == o.expiration_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, creation_date, change_date, sequence, factors, metadata, user_agent, expiration_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_session_field_name.rb b/lib/zitadel/client/models/session_service_session_field_name.rb deleted file mode 100644 index a3a20fe2..00000000 --- a/lib/zitadel/client/models/session_service_session_field_name.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceSessionFieldName - SESSION_FIELD_NAME_UNSPECIFIED = "SESSION_FIELD_NAME_UNSPECIFIED".freeze - SESSION_FIELD_NAME_CREATION_DATE = "SESSION_FIELD_NAME_CREATION_DATE".freeze - - def self.all_vars - @all_vars ||= [SESSION_FIELD_NAME_UNSPECIFIED, SESSION_FIELD_NAME_CREATION_DATE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SessionServiceSessionFieldName.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SessionServiceSessionFieldName" - end - end - -end diff --git a/lib/zitadel/client/models/session_service_set_session_request.rb b/lib/zitadel/client/models/session_service_set_session_request.rb deleted file mode 100644 index 983a19d3..00000000 --- a/lib/zitadel/client/models/session_service_set_session_request.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceSetSessionRequest - # \"DEPRECATED: this field is ignored.\" - attr_accessor :session_token - - attr_accessor :checks - - # \"custom key value list to be stored on the session\" - attr_accessor :metadata - - attr_accessor :challenges - - # \"duration (in seconds) after which the session will be automatically invalidated\" - attr_accessor :lifetime - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'session_token' => :'sessionToken', - :'checks' => :'checks', - :'metadata' => :'metadata', - :'challenges' => :'challenges', - :'lifetime' => :'lifetime' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'session_token' => :'String', - :'checks' => :'SessionServiceChecks', - :'metadata' => :'Hash', - :'challenges' => :'SessionServiceRequestChallenges', - :'lifetime' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSetSessionRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSetSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'session_token') - self.session_token = attributes[:'session_token'] - end - - if attributes.key?(:'checks') - self.checks = attributes[:'checks'] - end - - if attributes.key?(:'metadata') - if (value = attributes[:'metadata']).is_a?(Hash) - self.metadata = value - end - end - - if attributes.key?(:'challenges') - self.challenges = attributes[:'challenges'] - end - - if attributes.key?(:'lifetime') - self.lifetime = attributes[:'lifetime'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@session_token.nil? && @session_token.to_s.length > 200 - invalid_properties.push('invalid value for "session_token", the character length must be smaller than or equal to 200.') - end - - if !@session_token.nil? && @session_token.to_s.length < 1 - invalid_properties.push('invalid value for "session_token", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@session_token.nil? && @session_token.to_s.length > 200 - return false if !@session_token.nil? && @session_token.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] session_token Value to be assigned - def session_token=(session_token) - if session_token.nil? - fail ArgumentError, 'session_token cannot be nil' - end - - if session_token.to_s.length > 200 - fail ArgumentError, 'invalid value for "session_token", the character length must be smaller than or equal to 200.' - end - - if session_token.to_s.length < 1 - fail ArgumentError, 'invalid value for "session_token", the character length must be great than or equal to 1.' - end - - @session_token = session_token - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - session_token == o.session_token && - checks == o.checks && - metadata == o.metadata && - challenges == o.challenges && - lifetime == o.lifetime - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [session_token, checks, metadata, challenges, lifetime].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_set_session_response.rb b/lib/zitadel/client/models/session_service_set_session_response.rb deleted file mode 100644 index 9582fd11..00000000 --- a/lib/zitadel/client/models/session_service_set_session_response.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceSetSessionResponse - attr_accessor :details - - # \"The current token of the session, which is required for delete session, get session or the request of other resources.\" - attr_accessor :session_token - - attr_accessor :challenges - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'session_token' => :'sessionToken', - :'challenges' => :'challenges' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SessionServiceDetails', - :'session_token' => :'String', - :'challenges' => :'SessionServiceChallenges' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSetSessionResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSetSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'session_token') - self.session_token = attributes[:'session_token'] - end - - if attributes.key?(:'challenges') - self.challenges = attributes[:'challenges'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - session_token == o.session_token && - challenges == o.challenges - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, session_token, challenges].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_t_o_t_p_factor.rb b/lib/zitadel/client/models/session_service_t_o_t_p_factor.rb deleted file mode 100644 index c5771e18..00000000 --- a/lib/zitadel/client/models/session_service_t_o_t_p_factor.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceTOTPFactor - # \"time when the Time-based One-Time Password was last checked\" - attr_accessor :verified_at - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verified_at' => :'verifiedAt' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verified_at' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceTOTPFactor` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceTOTPFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verified_at') - self.verified_at = attributes[:'verified_at'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verified_at == o.verified_at - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verified_at].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_timestamp_query_method.rb b/lib/zitadel/client/models/session_service_timestamp_query_method.rb deleted file mode 100644 index 892460cc..00000000 --- a/lib/zitadel/client/models/session_service_timestamp_query_method.rb +++ /dev/null @@ -1,44 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceTimestampQueryMethod - TIMESTAMP_QUERY_METHOD_EQUALS = "TIMESTAMP_QUERY_METHOD_EQUALS".freeze - TIMESTAMP_QUERY_METHOD_GREATER = "TIMESTAMP_QUERY_METHOD_GREATER".freeze - TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS = "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS".freeze - TIMESTAMP_QUERY_METHOD_LESS = "TIMESTAMP_QUERY_METHOD_LESS".freeze - TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS = "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS".freeze - - def self.all_vars - @all_vars ||= [TIMESTAMP_QUERY_METHOD_EQUALS, TIMESTAMP_QUERY_METHOD_GREATER, TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS, TIMESTAMP_QUERY_METHOD_LESS, TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SessionServiceTimestampQueryMethod.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SessionServiceTimestampQueryMethod" - end - end - -end diff --git a/lib/zitadel/client/models/session_service_user_agent.rb b/lib/zitadel/client/models/session_service_user_agent.rb deleted file mode 100644 index 6416fcfd..00000000 --- a/lib/zitadel/client/models/session_service_user_agent.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceUserAgent - attr_accessor :fingerprint_id - - attr_accessor :ip - - attr_accessor :description - - attr_accessor :header - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'fingerprint_id' => :'fingerprintId', - :'ip' => :'ip', - :'description' => :'description', - :'header' => :'header' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'fingerprint_id' => :'String', - :'ip' => :'String', - :'description' => :'String', - :'header' => :'Hash' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserAgent` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserAgent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'fingerprint_id') - self.fingerprint_id = attributes[:'fingerprint_id'] - end - - if attributes.key?(:'ip') - self.ip = attributes[:'ip'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'header') - if (value = attributes[:'header']).is_a?(Hash) - self.header = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - fingerprint_id == o.fingerprint_id && - ip == o.ip && - description == o.description && - header == o.header - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [fingerprint_id, ip, description, header].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_user_agent_header_values.rb b/lib/zitadel/client/models/session_service_user_agent_header_values.rb deleted file mode 100644 index 8ff13cfb..00000000 --- a/lib/zitadel/client/models/session_service_user_agent_header_values.rb +++ /dev/null @@ -1,233 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme. - class SessionServiceUserAgentHeaderValues - attr_accessor :values - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'values' => :'values' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'values' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserAgentHeaderValues` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserAgentHeaderValues`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'values') - if (value = attributes[:'values']).is_a?(Array) - self.values = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - values == o.values - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [values].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_user_agent_query.rb b/lib/zitadel/client/models/session_service_user_agent_query.rb deleted file mode 100644 index 921105d0..00000000 --- a/lib/zitadel/client/models/session_service_user_agent_query.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceUserAgentQuery - # 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. - attr_accessor :fingerprint_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'fingerprint_id' => :'fingerprintId' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'fingerprint_id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserAgentQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserAgentQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'fingerprint_id') - self.fingerprint_id = attributes[:'fingerprint_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@fingerprint_id.nil? && @fingerprint_id.to_s.length > 200 - invalid_properties.push('invalid value for "fingerprint_id", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@fingerprint_id.nil? && @fingerprint_id.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] fingerprint_id Value to be assigned - def fingerprint_id=(fingerprint_id) - if fingerprint_id.nil? - fail ArgumentError, 'fingerprint_id cannot be nil' - end - - if fingerprint_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "fingerprint_id", the character length must be smaller than or equal to 200.' - end - - @fingerprint_id = fingerprint_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - fingerprint_id == o.fingerprint_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [fingerprint_id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_user_factor.rb b/lib/zitadel/client/models/session_service_user_factor.rb deleted file mode 100644 index 5d97f938..00000000 --- a/lib/zitadel/client/models/session_service_user_factor.rb +++ /dev/null @@ -1,271 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceUserFactor - # \"time when the user was last checked\" - attr_accessor :verified_at - - # \"id of the checked user\" - attr_accessor :id - - # \"login name of the checked user\" - attr_accessor :login_name - - # \"display name of the checked user\" - attr_accessor :display_name - - # \"organization id of the checked user\" - attr_accessor :organization_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verified_at' => :'verifiedAt', - :'id' => :'id', - :'login_name' => :'loginName', - :'display_name' => :'displayName', - :'organization_id' => :'organizationId' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verified_at' => :'Time', - :'id' => :'String', - :'login_name' => :'String', - :'display_name' => :'String', - :'organization_id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserFactor` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verified_at') - self.verified_at = attributes[:'verified_at'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'login_name') - self.login_name = attributes[:'login_name'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'organization_id') - self.organization_id = attributes[:'organization_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verified_at == o.verified_at && - id == o.id && - login_name == o.login_name && - display_name == o.display_name && - organization_id == o.organization_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verified_at, id, login_name, display_name, organization_id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_user_i_d_query.rb b/lib/zitadel/client/models/session_service_user_i_d_query.rb deleted file mode 100644 index bdcdad12..00000000 --- a/lib/zitadel/client/models/session_service_user_i_d_query.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceUserIDQuery - attr_accessor :id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserIDQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserIDQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/session_service_user_verification_requirement.rb b/lib/zitadel/client/models/session_service_user_verification_requirement.rb deleted file mode 100644 index 66fd0f67..00000000 --- a/lib/zitadel/client/models/session_service_user_verification_requirement.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceUserVerificationRequirement - USER_VERIFICATION_REQUIREMENT_UNSPECIFIED = "USER_VERIFICATION_REQUIREMENT_UNSPECIFIED".freeze - USER_VERIFICATION_REQUIREMENT_REQUIRED = "USER_VERIFICATION_REQUIREMENT_REQUIRED".freeze - USER_VERIFICATION_REQUIREMENT_PREFERRED = "USER_VERIFICATION_REQUIREMENT_PREFERRED".freeze - USER_VERIFICATION_REQUIREMENT_DISCOURAGED = "USER_VERIFICATION_REQUIREMENT_DISCOURAGED".freeze - - def self.all_vars - @all_vars ||= [USER_VERIFICATION_REQUIREMENT_UNSPECIFIED, USER_VERIFICATION_REQUIREMENT_REQUIRED, USER_VERIFICATION_REQUIREMENT_PREFERRED, USER_VERIFICATION_REQUIREMENT_DISCOURAGED].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SessionServiceUserVerificationRequirement.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SessionServiceUserVerificationRequirement" - end - end - -end diff --git a/lib/zitadel/client/models/session_service_web_auth_n_factor.rb b/lib/zitadel/client/models/session_service_web_auth_n_factor.rb deleted file mode 100644 index f438365a..00000000 --- a/lib/zitadel/client/models/session_service_web_auth_n_factor.rb +++ /dev/null @@ -1,240 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SessionServiceWebAuthNFactor - # \"time when the passkey challenge was last checked\" - attr_accessor :verified_at - - attr_accessor :user_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verified_at' => :'verifiedAt', - :'user_verified' => :'userVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verified_at' => :'Time', - :'user_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceWebAuthNFactor` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceWebAuthNFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verified_at') - self.verified_at = attributes[:'verified_at'] - end - - if attributes.key?(:'user_verified') - self.user_verified = attributes[:'user_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verified_at == o.verified_at && - user_verified == o.user_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verified_at, user_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_auto_linking_option.rb b/lib/zitadel/client/models/settings_service_auto_linking_option.rb deleted file mode 100644 index 6b389433..00000000 --- a/lib/zitadel/client/models/settings_service_auto_linking_option.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceAutoLinkingOption - AUTO_LINKING_OPTION_UNSPECIFIED = "AUTO_LINKING_OPTION_UNSPECIFIED".freeze - AUTO_LINKING_OPTION_USERNAME = "AUTO_LINKING_OPTION_USERNAME".freeze - AUTO_LINKING_OPTION_EMAIL = "AUTO_LINKING_OPTION_EMAIL".freeze - - def self.all_vars - @all_vars ||= [AUTO_LINKING_OPTION_UNSPECIFIED, AUTO_LINKING_OPTION_USERNAME, AUTO_LINKING_OPTION_EMAIL].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SettingsServiceAutoLinkingOption.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceAutoLinkingOption" - end - end - -end diff --git a/lib/zitadel/client/models/settings_service_branding_settings.rb b/lib/zitadel/client/models/settings_service_branding_settings.rb deleted file mode 100644 index b0016184..00000000 --- a/lib/zitadel/client/models/settings_service_branding_settings.rb +++ /dev/null @@ -1,313 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceBrandingSettings - attr_accessor :light_theme - - attr_accessor :dark_theme - - # url to the font used - attr_accessor :font_url - - # hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set - attr_accessor :hide_login_name_suffix - - # boolean to disable the watermark - attr_accessor :disable_watermark - - attr_accessor :resource_owner_type - - attr_accessor :theme_mode - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'light_theme' => :'lightTheme', - :'dark_theme' => :'darkTheme', - :'font_url' => :'fontUrl', - :'hide_login_name_suffix' => :'hideLoginNameSuffix', - :'disable_watermark' => :'disableWatermark', - :'resource_owner_type' => :'resourceOwnerType', - :'theme_mode' => :'themeMode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'light_theme' => :'SettingsServiceTheme', - :'dark_theme' => :'SettingsServiceTheme', - :'font_url' => :'String', - :'hide_login_name_suffix' => :'Boolean', - :'disable_watermark' => :'Boolean', - :'resource_owner_type' => :'SettingsServiceResourceOwnerType', - :'theme_mode' => :'SettingsServiceThemeMode' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceBrandingSettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceBrandingSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'light_theme') - self.light_theme = attributes[:'light_theme'] - end - - if attributes.key?(:'dark_theme') - self.dark_theme = attributes[:'dark_theme'] - end - - if attributes.key?(:'font_url') - self.font_url = attributes[:'font_url'] - end - - if attributes.key?(:'hide_login_name_suffix') - self.hide_login_name_suffix = attributes[:'hide_login_name_suffix'] - end - - if attributes.key?(:'disable_watermark') - self.disable_watermark = attributes[:'disable_watermark'] - end - - if attributes.key?(:'resource_owner_type') - self.resource_owner_type = attributes[:'resource_owner_type'] - else - self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' - end - - if attributes.key?(:'theme_mode') - self.theme_mode = attributes[:'theme_mode'] - else - self.theme_mode = 'THEME_MODE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - light_theme == o.light_theme && - dark_theme == o.dark_theme && - font_url == o.font_url && - hide_login_name_suffix == o.hide_login_name_suffix && - disable_watermark == o.disable_watermark && - resource_owner_type == o.resource_owner_type && - theme_mode == o.theme_mode - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [light_theme, dark_theme, font_url, hide_login_name_suffix, disable_watermark, resource_owner_type, theme_mode].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_details.rb b/lib/zitadel/client/models/settings_service_details.rb deleted file mode 100644 index cefe1357..00000000 --- a/lib/zitadel/client/models/settings_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_domain_settings.rb b/lib/zitadel/client/models/settings_service_domain_settings.rb deleted file mode 100644 index 57999128..00000000 --- a/lib/zitadel/client/models/settings_service_domain_settings.rb +++ /dev/null @@ -1,284 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceDomainSettings - # the username has to end with the domain of its organization - attr_accessor :login_name_includes_domain - - # defines if organization domains should be verified upon creation, otherwise will be created already verified - attr_accessor :require_org_domain_verification - - # defines if the SMTP sender address domain should match an existing domain on the instance - attr_accessor :smtp_sender_address_matches_instance_domain - - attr_accessor :resource_owner_type - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'login_name_includes_domain' => :'loginNameIncludesDomain', - :'require_org_domain_verification' => :'requireOrgDomainVerification', - :'smtp_sender_address_matches_instance_domain' => :'smtpSenderAddressMatchesInstanceDomain', - :'resource_owner_type' => :'resourceOwnerType' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'login_name_includes_domain' => :'Boolean', - :'require_org_domain_verification' => :'Boolean', - :'smtp_sender_address_matches_instance_domain' => :'Boolean', - :'resource_owner_type' => :'SettingsServiceResourceOwnerType' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceDomainSettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceDomainSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'login_name_includes_domain') - self.login_name_includes_domain = attributes[:'login_name_includes_domain'] - end - - if attributes.key?(:'require_org_domain_verification') - self.require_org_domain_verification = attributes[:'require_org_domain_verification'] - end - - if attributes.key?(:'smtp_sender_address_matches_instance_domain') - self.smtp_sender_address_matches_instance_domain = attributes[:'smtp_sender_address_matches_instance_domain'] - end - - if attributes.key?(:'resource_owner_type') - self.resource_owner_type = attributes[:'resource_owner_type'] - else - self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - login_name_includes_domain == o.login_name_includes_domain && - require_org_domain_verification == o.require_org_domain_verification && - smtp_sender_address_matches_instance_domain == o.smtp_sender_address_matches_instance_domain && - resource_owner_type == o.resource_owner_type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [login_name_includes_domain, require_org_domain_verification, smtp_sender_address_matches_instance_domain, resource_owner_type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb b/lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb deleted file mode 100644 index 033a345a..00000000 --- a/lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb +++ /dev/null @@ -1,243 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceEmbeddedIframeSettings - # states if iframe embedding is enabled or disabled - attr_accessor :enabled - - # origins allowed loading ZITADEL in an iframe if enabled. - attr_accessor :allowed_origins - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'enabled' => :'enabled', - :'allowed_origins' => :'allowedOrigins' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'enabled' => :'Boolean', - :'allowed_origins' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceEmbeddedIframeSettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceEmbeddedIframeSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'enabled') - self.enabled = attributes[:'enabled'] - end - - if attributes.key?(:'allowed_origins') - if (value = attributes[:'allowed_origins']).is_a?(Array) - self.allowed_origins = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - enabled == o.enabled && - allowed_origins == o.allowed_origins - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [enabled, allowed_origins].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb b/lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb deleted file mode 100644 index 4f43fc90..00000000 --- a/lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetActiveIdentityProvidersResponse - attr_accessor :details - - attr_accessor :identity_providers - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'identity_providers' => :'identityProviders' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceListDetails', - :'identity_providers' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetActiveIdentityProvidersResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetActiveIdentityProvidersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'identity_providers') - if (value = attributes[:'identity_providers']).is_a?(Array) - self.identity_providers = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - identity_providers == o.identity_providers - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, identity_providers].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_branding_settings_response.rb b/lib/zitadel/client/models/settings_service_get_branding_settings_response.rb deleted file mode 100644 index 4c2a98e8..00000000 --- a/lib/zitadel/client/models/settings_service_get_branding_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetBrandingSettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServiceBrandingSettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetBrandingSettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetBrandingSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_domain_settings_response.rb b/lib/zitadel/client/models/settings_service_get_domain_settings_response.rb deleted file mode 100644 index 2742b4cf..00000000 --- a/lib/zitadel/client/models/settings_service_get_domain_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetDomainSettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServiceDomainSettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetDomainSettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetDomainSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_general_settings_response.rb b/lib/zitadel/client/models/settings_service_get_general_settings_response.rb deleted file mode 100644 index 24d1fec1..00000000 --- a/lib/zitadel/client/models/settings_service_get_general_settings_response.rb +++ /dev/null @@ -1,252 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetGeneralSettingsResponse - # default organization for the current context - attr_accessor :default_org_id - - # default language for the current context - attr_accessor :default_language - - attr_accessor :supported_languages - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'default_org_id' => :'defaultOrgId', - :'default_language' => :'defaultLanguage', - :'supported_languages' => :'supportedLanguages' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'default_org_id' => :'String', - :'default_language' => :'String', - :'supported_languages' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetGeneralSettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetGeneralSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'default_org_id') - self.default_org_id = attributes[:'default_org_id'] - end - - if attributes.key?(:'default_language') - self.default_language = attributes[:'default_language'] - end - - if attributes.key?(:'supported_languages') - if (value = attributes[:'supported_languages']).is_a?(Array) - self.supported_languages = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - default_org_id == o.default_org_id && - default_language == o.default_language && - supported_languages == o.supported_languages - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [default_org_id, default_language, supported_languages].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb b/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb deleted file mode 100644 index f4613363..00000000 --- a/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetLegalAndSupportSettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServiceLegalAndSupportSettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLegalAndSupportSettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLegalAndSupportSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb b/lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb deleted file mode 100644 index dd32c06b..00000000 --- a/lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetLockoutSettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServiceLockoutSettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLockoutSettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLockoutSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_login_settings_response.rb b/lib/zitadel/client/models/settings_service_get_login_settings_response.rb deleted file mode 100644 index 68373ce9..00000000 --- a/lib/zitadel/client/models/settings_service_get_login_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetLoginSettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServiceLoginSettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLoginSettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLoginSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb b/lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb deleted file mode 100644 index 91d4cba0..00000000 --- a/lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetPasswordComplexitySettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServicePasswordComplexitySettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetPasswordComplexitySettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetPasswordComplexitySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb b/lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb deleted file mode 100644 index 0f8fe3b7..00000000 --- a/lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetPasswordExpirySettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServicePasswordExpirySettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetPasswordExpirySettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetPasswordExpirySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_get_security_settings_response.rb b/lib/zitadel/client/models/settings_service_get_security_settings_response.rb deleted file mode 100644 index 94198f21..00000000 --- a/lib/zitadel/client/models/settings_service_get_security_settings_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceGetSecuritySettingsResponse - attr_accessor :details - - attr_accessor :settings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'settings' => :'settings' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails', - :'settings' => :'SettingsServiceSecuritySettings' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetSecuritySettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetSecuritySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'settings') - self.settings = attributes[:'settings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - settings == o.settings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, settings].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_identity_provider.rb b/lib/zitadel/client/models/settings_service_identity_provider.rb deleted file mode 100644 index 3a5dfaa0..00000000 --- a/lib/zitadel/client/models/settings_service_identity_provider.rb +++ /dev/null @@ -1,281 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceIdentityProvider - attr_accessor :id - - attr_accessor :name - - attr_accessor :type - - attr_accessor :options - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'name' => :'name', - :'type' => :'type', - :'options' => :'options' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'name' => :'String', - :'type' => :'SettingsServiceIdentityProviderType', - :'options' => :'SettingsServiceOptions' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceIdentityProvider` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceIdentityProvider`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - else - self.type = 'IDENTITY_PROVIDER_TYPE_UNSPECIFIED' - end - - if attributes.key?(:'options') - self.options = attributes[:'options'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - name == o.name && - type == o.type && - options == o.options - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, name, type, options].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_identity_provider_type.rb b/lib/zitadel/client/models/settings_service_identity_provider_type.rb deleted file mode 100644 index 29de3c86..00000000 --- a/lib/zitadel/client/models/settings_service_identity_provider_type.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceIdentityProviderType - IDENTITY_PROVIDER_TYPE_UNSPECIFIED = "IDENTITY_PROVIDER_TYPE_UNSPECIFIED".freeze - IDENTITY_PROVIDER_TYPE_OIDC = "IDENTITY_PROVIDER_TYPE_OIDC".freeze - IDENTITY_PROVIDER_TYPE_JWT = "IDENTITY_PROVIDER_TYPE_JWT".freeze - IDENTITY_PROVIDER_TYPE_LDAP = "IDENTITY_PROVIDER_TYPE_LDAP".freeze - IDENTITY_PROVIDER_TYPE_OAUTH = "IDENTITY_PROVIDER_TYPE_OAUTH".freeze - IDENTITY_PROVIDER_TYPE_AZURE_AD = "IDENTITY_PROVIDER_TYPE_AZURE_AD".freeze - IDENTITY_PROVIDER_TYPE_GITHUB = "IDENTITY_PROVIDER_TYPE_GITHUB".freeze - IDENTITY_PROVIDER_TYPE_GITHUB_ES = "IDENTITY_PROVIDER_TYPE_GITHUB_ES".freeze - IDENTITY_PROVIDER_TYPE_GITLAB = "IDENTITY_PROVIDER_TYPE_GITLAB".freeze - IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED = "IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED".freeze - IDENTITY_PROVIDER_TYPE_GOOGLE = "IDENTITY_PROVIDER_TYPE_GOOGLE".freeze - IDENTITY_PROVIDER_TYPE_SAML = "IDENTITY_PROVIDER_TYPE_SAML".freeze - IDENTITY_PROVIDER_TYPE_APPLE = "IDENTITY_PROVIDER_TYPE_APPLE".freeze - - def self.all_vars - @all_vars ||= [IDENTITY_PROVIDER_TYPE_UNSPECIFIED, IDENTITY_PROVIDER_TYPE_OIDC, IDENTITY_PROVIDER_TYPE_JWT, IDENTITY_PROVIDER_TYPE_LDAP, IDENTITY_PROVIDER_TYPE_OAUTH, IDENTITY_PROVIDER_TYPE_AZURE_AD, IDENTITY_PROVIDER_TYPE_GITHUB, IDENTITY_PROVIDER_TYPE_GITHUB_ES, IDENTITY_PROVIDER_TYPE_GITLAB, IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED, IDENTITY_PROVIDER_TYPE_GOOGLE, IDENTITY_PROVIDER_TYPE_SAML, IDENTITY_PROVIDER_TYPE_APPLE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SettingsServiceIdentityProviderType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceIdentityProviderType" - end - end - -end diff --git a/lib/zitadel/client/models/settings_service_legal_and_support_settings.rb b/lib/zitadel/client/models/settings_service_legal_and_support_settings.rb deleted file mode 100644 index 35a27227..00000000 --- a/lib/zitadel/client/models/settings_service_legal_and_support_settings.rb +++ /dev/null @@ -1,321 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceLegalAndSupportSettings - attr_accessor :tos_link - - attr_accessor :privacy_policy_link - - attr_accessor :help_link - - # help / support email address. - attr_accessor :support_email - - attr_accessor :resource_owner_type - - # Link to documentation to be shown in the console. - attr_accessor :docs_link - - # Link to an external resource that will be available to users in the console. - attr_accessor :custom_link - - # The button text that would be shown in console pointing to custom link. - attr_accessor :custom_link_text - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'tos_link' => :'tosLink', - :'privacy_policy_link' => :'privacyPolicyLink', - :'help_link' => :'helpLink', - :'support_email' => :'supportEmail', - :'resource_owner_type' => :'resourceOwnerType', - :'docs_link' => :'docsLink', - :'custom_link' => :'customLink', - :'custom_link_text' => :'customLinkText' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'tos_link' => :'String', - :'privacy_policy_link' => :'String', - :'help_link' => :'String', - :'support_email' => :'String', - :'resource_owner_type' => :'SettingsServiceResourceOwnerType', - :'docs_link' => :'String', - :'custom_link' => :'String', - :'custom_link_text' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceLegalAndSupportSettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceLegalAndSupportSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'tos_link') - self.tos_link = attributes[:'tos_link'] - end - - if attributes.key?(:'privacy_policy_link') - self.privacy_policy_link = attributes[:'privacy_policy_link'] - end - - if attributes.key?(:'help_link') - self.help_link = attributes[:'help_link'] - end - - if attributes.key?(:'support_email') - self.support_email = attributes[:'support_email'] - end - - if attributes.key?(:'resource_owner_type') - self.resource_owner_type = attributes[:'resource_owner_type'] - else - self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' - end - - if attributes.key?(:'docs_link') - self.docs_link = attributes[:'docs_link'] - end - - if attributes.key?(:'custom_link') - self.custom_link = attributes[:'custom_link'] - end - - if attributes.key?(:'custom_link_text') - self.custom_link_text = attributes[:'custom_link_text'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - tos_link == o.tos_link && - privacy_policy_link == o.privacy_policy_link && - help_link == o.help_link && - support_email == o.support_email && - resource_owner_type == o.resource_owner_type && - docs_link == o.docs_link && - custom_link == o.custom_link && - custom_link_text == o.custom_link_text - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [tos_link, privacy_policy_link, help_link, support_email, resource_owner_type, docs_link, custom_link, custom_link_text].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_list_details.rb b/lib/zitadel/client/models/settings_service_list_details.rb deleted file mode 100644 index 9ce658f1..00000000 --- a/lib/zitadel/client/models/settings_service_list_details.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceListDetails - attr_accessor :total_result - - attr_accessor :processed_sequence - - # the last time the projection got updated - attr_accessor :timestamp - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_result' => :'totalResult', - :'processed_sequence' => :'processedSequence', - :'timestamp' => :'timestamp' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'total_result' => :'String', - :'processed_sequence' => :'String', - :'timestamp' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceListDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'total_result') - self.total_result = attributes[:'total_result'] - end - - if attributes.key?(:'processed_sequence') - self.processed_sequence = attributes[:'processed_sequence'] - end - - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total_result == o.total_result && - processed_sequence == o.processed_sequence && - timestamp == o.timestamp - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [total_result, processed_sequence, timestamp].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_lockout_settings.rb b/lib/zitadel/client/models/settings_service_lockout_settings.rb deleted file mode 100644 index e9962bb2..00000000 --- a/lib/zitadel/client/models/settings_service_lockout_settings.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceLockoutSettings - # 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. - attr_accessor :max_password_attempts - - attr_accessor :resource_owner_type - - # 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. - attr_accessor :max_otp_attempts - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'max_password_attempts' => :'maxPasswordAttempts', - :'resource_owner_type' => :'resourceOwnerType', - :'max_otp_attempts' => :'maxOtpAttempts' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'max_password_attempts' => :'String', - :'resource_owner_type' => :'SettingsServiceResourceOwnerType', - :'max_otp_attempts' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceLockoutSettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceLockoutSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'max_password_attempts') - self.max_password_attempts = attributes[:'max_password_attempts'] - end - - if attributes.key?(:'resource_owner_type') - self.resource_owner_type = attributes[:'resource_owner_type'] - else - self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' - end - - if attributes.key?(:'max_otp_attempts') - self.max_otp_attempts = attributes[:'max_otp_attempts'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - max_password_attempts == o.max_password_attempts && - resource_owner_type == o.resource_owner_type && - max_otp_attempts == o.max_otp_attempts - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [max_password_attempts, resource_owner_type, max_otp_attempts].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_login_settings.rb b/lib/zitadel/client/models/settings_service_login_settings.rb deleted file mode 100644 index 088100f2..00000000 --- a/lib/zitadel/client/models/settings_service_login_settings.rb +++ /dev/null @@ -1,447 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceLoginSettings - # defines if a user is allowed to log in with username and password - attr_accessor :allow_username_password - - # defines if a person is allowed to register a user on this organization - attr_accessor :allow_register - - # defines if a user is allowed to add a defined identity provider. E.g. Google auth - attr_accessor :allow_external_idp - - # defines if a user MUST use a multi-factor to log in - attr_accessor :force_mfa - - attr_accessor :passkeys_type - - # defines if password reset link should be shown in the login screen - attr_accessor :hide_password_reset - - # defines if unknown username on login screen directly returns an error or always displays the password screen - attr_accessor :ignore_unknown_usernames - - # defines where the user will be redirected to if the login is started without app context (e.g. from mail) - attr_accessor :default_redirect_uri - - # Defines after how much time the user has to re-authenticate with the password. - attr_accessor :password_check_lifetime - - # Defines after how much time the user has to re-authenticate with an external provider. - attr_accessor :external_login_check_lifetime - - # Defines after how much time the mfa prompt will be shown again. - attr_accessor :mfa_init_skip_lifetime - - # Defines after how long the second factor check is valid. - attr_accessor :second_factor_check_lifetime - - # Defines how long the multi-factor check is valid. - attr_accessor :multi_factor_check_lifetime - - attr_accessor :second_factors - - attr_accessor :multi_factors - - # 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. - attr_accessor :allow_domain_discovery - - # defines if the user can additionally (to the login name) be identified by their verified email address - attr_accessor :disable_login_with_email - - # defines if the user can additionally (to the login name) be identified by their verified phone number - attr_accessor :disable_login_with_phone - - attr_accessor :resource_owner_type - - # if activated, only local authenticated users are forced to use MFA. Authentication through IDPs won't prompt a MFA step in the login. - attr_accessor :force_mfa_local_only - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'allow_username_password' => :'allowUsernamePassword', - :'allow_register' => :'allowRegister', - :'allow_external_idp' => :'allowExternalIdp', - :'force_mfa' => :'forceMfa', - :'passkeys_type' => :'passkeysType', - :'hide_password_reset' => :'hidePasswordReset', - :'ignore_unknown_usernames' => :'ignoreUnknownUsernames', - :'default_redirect_uri' => :'defaultRedirectUri', - :'password_check_lifetime' => :'passwordCheckLifetime', - :'external_login_check_lifetime' => :'externalLoginCheckLifetime', - :'mfa_init_skip_lifetime' => :'mfaInitSkipLifetime', - :'second_factor_check_lifetime' => :'secondFactorCheckLifetime', - :'multi_factor_check_lifetime' => :'multiFactorCheckLifetime', - :'second_factors' => :'secondFactors', - :'multi_factors' => :'multiFactors', - :'allow_domain_discovery' => :'allowDomainDiscovery', - :'disable_login_with_email' => :'disableLoginWithEmail', - :'disable_login_with_phone' => :'disableLoginWithPhone', - :'resource_owner_type' => :'resourceOwnerType', - :'force_mfa_local_only' => :'forceMfaLocalOnly' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'allow_username_password' => :'Boolean', - :'allow_register' => :'Boolean', - :'allow_external_idp' => :'Boolean', - :'force_mfa' => :'Boolean', - :'passkeys_type' => :'SettingsServicePasskeysType', - :'hide_password_reset' => :'Boolean', - :'ignore_unknown_usernames' => :'Boolean', - :'default_redirect_uri' => :'String', - :'password_check_lifetime' => :'String', - :'external_login_check_lifetime' => :'String', - :'mfa_init_skip_lifetime' => :'String', - :'second_factor_check_lifetime' => :'String', - :'multi_factor_check_lifetime' => :'String', - :'second_factors' => :'Array', - :'multi_factors' => :'Array', - :'allow_domain_discovery' => :'Boolean', - :'disable_login_with_email' => :'Boolean', - :'disable_login_with_phone' => :'Boolean', - :'resource_owner_type' => :'SettingsServiceResourceOwnerType', - :'force_mfa_local_only' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceLoginSettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceLoginSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'allow_username_password') - self.allow_username_password = attributes[:'allow_username_password'] - end - - if attributes.key?(:'allow_register') - self.allow_register = attributes[:'allow_register'] - end - - if attributes.key?(:'allow_external_idp') - self.allow_external_idp = attributes[:'allow_external_idp'] - end - - if attributes.key?(:'force_mfa') - self.force_mfa = attributes[:'force_mfa'] - end - - if attributes.key?(:'passkeys_type') - self.passkeys_type = attributes[:'passkeys_type'] - else - self.passkeys_type = 'PASSKEYS_TYPE_NOT_ALLOWED' - end - - if attributes.key?(:'hide_password_reset') - self.hide_password_reset = attributes[:'hide_password_reset'] - end - - if attributes.key?(:'ignore_unknown_usernames') - self.ignore_unknown_usernames = attributes[:'ignore_unknown_usernames'] - end - - if attributes.key?(:'default_redirect_uri') - self.default_redirect_uri = attributes[:'default_redirect_uri'] - end - - if attributes.key?(:'password_check_lifetime') - self.password_check_lifetime = attributes[:'password_check_lifetime'] - end - - if attributes.key?(:'external_login_check_lifetime') - self.external_login_check_lifetime = attributes[:'external_login_check_lifetime'] - end - - if attributes.key?(:'mfa_init_skip_lifetime') - self.mfa_init_skip_lifetime = attributes[:'mfa_init_skip_lifetime'] - end - - if attributes.key?(:'second_factor_check_lifetime') - self.second_factor_check_lifetime = attributes[:'second_factor_check_lifetime'] - end - - if attributes.key?(:'multi_factor_check_lifetime') - self.multi_factor_check_lifetime = attributes[:'multi_factor_check_lifetime'] - end - - if attributes.key?(:'second_factors') - if (value = attributes[:'second_factors']).is_a?(Array) - self.second_factors = value - end - end - - if attributes.key?(:'multi_factors') - if (value = attributes[:'multi_factors']).is_a?(Array) - self.multi_factors = value - end - end - - if attributes.key?(:'allow_domain_discovery') - self.allow_domain_discovery = attributes[:'allow_domain_discovery'] - end - - if attributes.key?(:'disable_login_with_email') - self.disable_login_with_email = attributes[:'disable_login_with_email'] - end - - if attributes.key?(:'disable_login_with_phone') - self.disable_login_with_phone = attributes[:'disable_login_with_phone'] - end - - if attributes.key?(:'resource_owner_type') - self.resource_owner_type = attributes[:'resource_owner_type'] - else - self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' - end - - if attributes.key?(:'force_mfa_local_only') - self.force_mfa_local_only = attributes[:'force_mfa_local_only'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - allow_username_password == o.allow_username_password && - allow_register == o.allow_register && - allow_external_idp == o.allow_external_idp && - force_mfa == o.force_mfa && - passkeys_type == o.passkeys_type && - hide_password_reset == o.hide_password_reset && - ignore_unknown_usernames == o.ignore_unknown_usernames && - default_redirect_uri == o.default_redirect_uri && - password_check_lifetime == o.password_check_lifetime && - external_login_check_lifetime == o.external_login_check_lifetime && - mfa_init_skip_lifetime == o.mfa_init_skip_lifetime && - second_factor_check_lifetime == o.second_factor_check_lifetime && - multi_factor_check_lifetime == o.multi_factor_check_lifetime && - second_factors == o.second_factors && - multi_factors == o.multi_factors && - allow_domain_discovery == o.allow_domain_discovery && - disable_login_with_email == o.disable_login_with_email && - disable_login_with_phone == o.disable_login_with_phone && - resource_owner_type == o.resource_owner_type && - force_mfa_local_only == o.force_mfa_local_only - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [allow_username_password, allow_register, allow_external_idp, force_mfa, passkeys_type, hide_password_reset, ignore_unknown_usernames, default_redirect_uri, password_check_lifetime, external_login_check_lifetime, mfa_init_skip_lifetime, second_factor_check_lifetime, multi_factor_check_lifetime, second_factors, multi_factors, allow_domain_discovery, disable_login_with_email, disable_login_with_phone, resource_owner_type, force_mfa_local_only].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_multi_factor_type.rb b/lib/zitadel/client/models/settings_service_multi_factor_type.rb deleted file mode 100644 index 5552e671..00000000 --- a/lib/zitadel/client/models/settings_service_multi_factor_type.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceMultiFactorType - MULTI_FACTOR_TYPE_UNSPECIFIED = "MULTI_FACTOR_TYPE_UNSPECIFIED".freeze - MULTI_FACTOR_TYPE_U2_F_WITH_VERIFICATION = "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION".freeze - - def self.all_vars - @all_vars ||= [MULTI_FACTOR_TYPE_UNSPECIFIED, MULTI_FACTOR_TYPE_U2_F_WITH_VERIFICATION].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SettingsServiceMultiFactorType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceMultiFactorType" - end - end - -end diff --git a/lib/zitadel/client/models/settings_service_options.rb b/lib/zitadel/client/models/settings_service_options.rb deleted file mode 100644 index 7d665fb7..00000000 --- a/lib/zitadel/client/models/settings_service_options.rb +++ /dev/null @@ -1,294 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceOptions - # Enable if users should be able to link an existing ZITADEL user with an external account. - attr_accessor :is_linking_allowed - - # Enable if users should be able to create a new account in ZITADEL when using an external account. - attr_accessor :is_creation_allowed - - # Enable if a new account in ZITADEL should be created automatically when login with an external account. - attr_accessor :is_auto_creation - - # Enable if a the ZITADEL account fields should be updated automatically on each login. - attr_accessor :is_auto_update - - attr_accessor :auto_linking - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'is_linking_allowed' => :'isLinkingAllowed', - :'is_creation_allowed' => :'isCreationAllowed', - :'is_auto_creation' => :'isAutoCreation', - :'is_auto_update' => :'isAutoUpdate', - :'auto_linking' => :'autoLinking' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'is_linking_allowed' => :'Boolean', - :'is_creation_allowed' => :'Boolean', - :'is_auto_creation' => :'Boolean', - :'is_auto_update' => :'Boolean', - :'auto_linking' => :'SettingsServiceAutoLinkingOption' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceOptions` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'is_linking_allowed') - self.is_linking_allowed = attributes[:'is_linking_allowed'] - end - - if attributes.key?(:'is_creation_allowed') - self.is_creation_allowed = attributes[:'is_creation_allowed'] - end - - if attributes.key?(:'is_auto_creation') - self.is_auto_creation = attributes[:'is_auto_creation'] - end - - if attributes.key?(:'is_auto_update') - self.is_auto_update = attributes[:'is_auto_update'] - end - - if attributes.key?(:'auto_linking') - self.auto_linking = attributes[:'auto_linking'] - else - self.auto_linking = 'AUTO_LINKING_OPTION_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - is_linking_allowed == o.is_linking_allowed && - is_creation_allowed == o.is_creation_allowed && - is_auto_creation == o.is_auto_creation && - is_auto_update == o.is_auto_update && - auto_linking == o.auto_linking - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [is_linking_allowed, is_creation_allowed, is_auto_creation, is_auto_update, auto_linking].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_passkeys_type.rb b/lib/zitadel/client/models/settings_service_passkeys_type.rb deleted file mode 100644 index ae6fbdf8..00000000 --- a/lib/zitadel/client/models/settings_service_passkeys_type.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServicePasskeysType - PASSKEYS_TYPE_NOT_ALLOWED = "PASSKEYS_TYPE_NOT_ALLOWED".freeze - PASSKEYS_TYPE_ALLOWED = "PASSKEYS_TYPE_ALLOWED".freeze - - def self.all_vars - @all_vars ||= [PASSKEYS_TYPE_NOT_ALLOWED, PASSKEYS_TYPE_ALLOWED].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SettingsServicePasskeysType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServicePasskeysType" - end - end - -end diff --git a/lib/zitadel/client/models/settings_service_password_complexity_settings.rb b/lib/zitadel/client/models/settings_service_password_complexity_settings.rb deleted file mode 100644 index ba59b76f..00000000 --- a/lib/zitadel/client/models/settings_service_password_complexity_settings.rb +++ /dev/null @@ -1,304 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServicePasswordComplexitySettings - # Defines the minimum length of a password. - attr_accessor :min_length - - # defines if the password MUST contain an upper case letter - attr_accessor :requires_uppercase - - # defines if the password MUST contain a lowercase letter - attr_accessor :requires_lowercase - - # defines if the password MUST contain a number - attr_accessor :requires_number - - # defines if the password MUST contain a symbol. E.g. \"$\" - attr_accessor :requires_symbol - - attr_accessor :resource_owner_type - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'min_length' => :'minLength', - :'requires_uppercase' => :'requiresUppercase', - :'requires_lowercase' => :'requiresLowercase', - :'requires_number' => :'requiresNumber', - :'requires_symbol' => :'requiresSymbol', - :'resource_owner_type' => :'resourceOwnerType' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'min_length' => :'String', - :'requires_uppercase' => :'Boolean', - :'requires_lowercase' => :'Boolean', - :'requires_number' => :'Boolean', - :'requires_symbol' => :'Boolean', - :'resource_owner_type' => :'SettingsServiceResourceOwnerType' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServicePasswordComplexitySettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServicePasswordComplexitySettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'min_length') - self.min_length = attributes[:'min_length'] - end - - if attributes.key?(:'requires_uppercase') - self.requires_uppercase = attributes[:'requires_uppercase'] - end - - if attributes.key?(:'requires_lowercase') - self.requires_lowercase = attributes[:'requires_lowercase'] - end - - if attributes.key?(:'requires_number') - self.requires_number = attributes[:'requires_number'] - end - - if attributes.key?(:'requires_symbol') - self.requires_symbol = attributes[:'requires_symbol'] - end - - if attributes.key?(:'resource_owner_type') - self.resource_owner_type = attributes[:'resource_owner_type'] - else - self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - min_length == o.min_length && - requires_uppercase == o.requires_uppercase && - requires_lowercase == o.requires_lowercase && - requires_number == o.requires_number && - requires_symbol == o.requires_symbol && - resource_owner_type == o.resource_owner_type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [min_length, requires_uppercase, requires_lowercase, requires_number, requires_symbol, resource_owner_type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_password_expiry_settings.rb b/lib/zitadel/client/models/settings_service_password_expiry_settings.rb deleted file mode 100644 index b62cd49d..00000000 --- a/lib/zitadel/client/models/settings_service_password_expiry_settings.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServicePasswordExpirySettings - # Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. - attr_accessor :max_age_days - - # Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. - attr_accessor :expire_warn_days - - attr_accessor :resource_owner_type - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'max_age_days' => :'maxAgeDays', - :'expire_warn_days' => :'expireWarnDays', - :'resource_owner_type' => :'resourceOwnerType' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'max_age_days' => :'String', - :'expire_warn_days' => :'String', - :'resource_owner_type' => :'SettingsServiceResourceOwnerType' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServicePasswordExpirySettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServicePasswordExpirySettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'max_age_days') - self.max_age_days = attributes[:'max_age_days'] - end - - if attributes.key?(:'expire_warn_days') - self.expire_warn_days = attributes[:'expire_warn_days'] - end - - if attributes.key?(:'resource_owner_type') - self.resource_owner_type = attributes[:'resource_owner_type'] - else - self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - max_age_days == o.max_age_days && - expire_warn_days == o.expire_warn_days && - resource_owner_type == o.resource_owner_type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [max_age_days, expire_warn_days, resource_owner_type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_protobuf_any.rb b/lib/zitadel/client/models/settings_service_protobuf_any.rb deleted file mode 100644 index 8b94f40c..00000000 --- a/lib/zitadel/client/models/settings_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_resource_owner_type.rb b/lib/zitadel/client/models/settings_service_resource_owner_type.rb deleted file mode 100644 index 290be2f5..00000000 --- a/lib/zitadel/client/models/settings_service_resource_owner_type.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceResourceOwnerType - RESOURCE_OWNER_TYPE_UNSPECIFIED = "RESOURCE_OWNER_TYPE_UNSPECIFIED".freeze - RESOURCE_OWNER_TYPE_INSTANCE = "RESOURCE_OWNER_TYPE_INSTANCE".freeze - RESOURCE_OWNER_TYPE_ORG = "RESOURCE_OWNER_TYPE_ORG".freeze - - def self.all_vars - @all_vars ||= [RESOURCE_OWNER_TYPE_UNSPECIFIED, RESOURCE_OWNER_TYPE_INSTANCE, RESOURCE_OWNER_TYPE_ORG].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SettingsServiceResourceOwnerType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceResourceOwnerType" - end - end - -end diff --git a/lib/zitadel/client/models/settings_service_rpc_status.rb b/lib/zitadel/client/models/settings_service_rpc_status.rb deleted file mode 100644 index 0c9e3e3f..00000000 --- a/lib/zitadel/client/models/settings_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_second_factor_type.rb b/lib/zitadel/client/models/settings_service_second_factor_type.rb deleted file mode 100644 index 12db1eca..00000000 --- a/lib/zitadel/client/models/settings_service_second_factor_type.rb +++ /dev/null @@ -1,44 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceSecondFactorType - SECOND_FACTOR_TYPE_UNSPECIFIED = "SECOND_FACTOR_TYPE_UNSPECIFIED".freeze - SECOND_FACTOR_TYPE_OTP = "SECOND_FACTOR_TYPE_OTP".freeze - SECOND_FACTOR_TYPE_U2_F = "SECOND_FACTOR_TYPE_U2F".freeze - SECOND_FACTOR_TYPE_OTP_EMAIL = "SECOND_FACTOR_TYPE_OTP_EMAIL".freeze - SECOND_FACTOR_TYPE_OTP_SMS = "SECOND_FACTOR_TYPE_OTP_SMS".freeze - - def self.all_vars - @all_vars ||= [SECOND_FACTOR_TYPE_UNSPECIFIED, SECOND_FACTOR_TYPE_OTP, SECOND_FACTOR_TYPE_U2_F, SECOND_FACTOR_TYPE_OTP_EMAIL, SECOND_FACTOR_TYPE_OTP_SMS].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SettingsServiceSecondFactorType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceSecondFactorType" - end - end - -end diff --git a/lib/zitadel/client/models/settings_service_security_settings.rb b/lib/zitadel/client/models/settings_service_security_settings.rb deleted file mode 100644 index a7bc40ee..00000000 --- a/lib/zitadel/client/models/settings_service_security_settings.rb +++ /dev/null @@ -1,240 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceSecuritySettings - attr_accessor :embedded_iframe - - # default language for the current context - attr_accessor :enable_impersonation - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'embedded_iframe' => :'embeddedIframe', - :'enable_impersonation' => :'enableImpersonation' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'embedded_iframe' => :'SettingsServiceEmbeddedIframeSettings', - :'enable_impersonation' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceSecuritySettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceSecuritySettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'embedded_iframe') - self.embedded_iframe = attributes[:'embedded_iframe'] - end - - if attributes.key?(:'enable_impersonation') - self.enable_impersonation = attributes[:'enable_impersonation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - embedded_iframe == o.embedded_iframe && - enable_impersonation == o.enable_impersonation - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [embedded_iframe, enable_impersonation].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_set_security_settings_request.rb b/lib/zitadel/client/models/settings_service_set_security_settings_request.rb deleted file mode 100644 index 0316d361..00000000 --- a/lib/zitadel/client/models/settings_service_set_security_settings_request.rb +++ /dev/null @@ -1,240 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceSetSecuritySettingsRequest - attr_accessor :embedded_iframe - - # allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well - attr_accessor :enable_impersonation - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'embedded_iframe' => :'embeddedIframe', - :'enable_impersonation' => :'enableImpersonation' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'embedded_iframe' => :'SettingsServiceEmbeddedIframeSettings', - :'enable_impersonation' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'embedded_iframe') - self.embedded_iframe = attributes[:'embedded_iframe'] - end - - if attributes.key?(:'enable_impersonation') - self.enable_impersonation = attributes[:'enable_impersonation'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - embedded_iframe == o.embedded_iframe && - enable_impersonation == o.enable_impersonation - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [embedded_iframe, enable_impersonation].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_set_security_settings_response.rb b/lib/zitadel/client/models/settings_service_set_security_settings_response.rb deleted file mode 100644 index 7354ac4a..00000000 --- a/lib/zitadel/client/models/settings_service_set_security_settings_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceSetSecuritySettingsResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'SettingsServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_theme.rb b/lib/zitadel/client/models/settings_service_theme.rb deleted file mode 100644 index a85624ee..00000000 --- a/lib/zitadel/client/models/settings_service_theme.rb +++ /dev/null @@ -1,281 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceTheme - # hex value for primary color - attr_accessor :primary_color - - # hex value for background color - attr_accessor :background_color - - # hex value for warn color - attr_accessor :warn_color - - # hex value for font color - attr_accessor :font_color - - # url to the logo - attr_accessor :logo_url - - # url to the icon - attr_accessor :icon_url - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'primary_color' => :'primaryColor', - :'background_color' => :'backgroundColor', - :'warn_color' => :'warnColor', - :'font_color' => :'fontColor', - :'logo_url' => :'logoUrl', - :'icon_url' => :'iconUrl' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'primary_color' => :'String', - :'background_color' => :'String', - :'warn_color' => :'String', - :'font_color' => :'String', - :'logo_url' => :'String', - :'icon_url' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceTheme` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceTheme`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'primary_color') - self.primary_color = attributes[:'primary_color'] - end - - if attributes.key?(:'background_color') - self.background_color = attributes[:'background_color'] - end - - if attributes.key?(:'warn_color') - self.warn_color = attributes[:'warn_color'] - end - - if attributes.key?(:'font_color') - self.font_color = attributes[:'font_color'] - end - - if attributes.key?(:'logo_url') - self.logo_url = attributes[:'logo_url'] - end - - if attributes.key?(:'icon_url') - self.icon_url = attributes[:'icon_url'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - primary_color == o.primary_color && - background_color == o.background_color && - warn_color == o.warn_color && - font_color == o.font_color && - logo_url == o.logo_url && - icon_url == o.icon_url - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [primary_color, background_color, warn_color, font_color, logo_url, icon_url].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/settings_service_theme_mode.rb b/lib/zitadel/client/models/settings_service_theme_mode.rb deleted file mode 100644 index fe78c972..00000000 --- a/lib/zitadel/client/models/settings_service_theme_mode.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class SettingsServiceThemeMode - THEME_MODE_UNSPECIFIED = "THEME_MODE_UNSPECIFIED".freeze - THEME_MODE_AUTO = "THEME_MODE_AUTO".freeze - THEME_MODE_LIGHT = "THEME_MODE_LIGHT".freeze - THEME_MODE_DARK = "THEME_MODE_DARK".freeze - - def self.all_vars - @all_vars ||= [THEME_MODE_UNSPECIFIED, THEME_MODE_AUTO, THEME_MODE_LIGHT, THEME_MODE_DARK].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if SettingsServiceThemeMode.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceThemeMode" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_access_token_type.rb b/lib/zitadel/client/models/user_service_access_token_type.rb deleted file mode 100644 index d3d2154e..00000000 --- a/lib/zitadel/client/models/user_service_access_token_type.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAccessTokenType - ACCESS_TOKEN_TYPE_BEARER = "ACCESS_TOKEN_TYPE_BEARER".freeze - ACCESS_TOKEN_TYPE_JWT = "ACCESS_TOKEN_TYPE_JWT".freeze - - def self.all_vars - @all_vars ||= [ACCESS_TOKEN_TYPE_BEARER, ACCESS_TOKEN_TYPE_JWT].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceAccessTokenType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceAccessTokenType" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_add_human_user_request.rb b/lib/zitadel/client/models/user_service_add_human_user_request.rb deleted file mode 100644 index 561c15e9..00000000 --- a/lib/zitadel/client/models/user_service_add_human_user_request.rb +++ /dev/null @@ -1,445 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAddHumanUserRequest - # optionally set your own id unique for the user. - attr_accessor :user_id - - # optionally set a unique username, if none is provided the email will be used. - attr_accessor :username - - attr_accessor :organization - - attr_accessor :profile - - attr_accessor :email - - attr_accessor :phone - - attr_accessor :metadata - - attr_accessor :password - - attr_accessor :hashed_password - - attr_accessor :idp_links - - # 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. - attr_accessor :totp_secret - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'username' => :'username', - :'organization' => :'organization', - :'profile' => :'profile', - :'email' => :'email', - :'phone' => :'phone', - :'metadata' => :'metadata', - :'password' => :'password', - :'hashed_password' => :'hashedPassword', - :'idp_links' => :'idpLinks', - :'totp_secret' => :'totpSecret' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'username' => :'String', - :'organization' => :'UserServiceOrganization', - :'profile' => :'UserServiceSetHumanProfile', - :'email' => :'UserServiceSetHumanEmail', - :'phone' => :'UserServiceSetHumanPhone', - :'metadata' => :'Array', - :'password' => :'UserServicePassword', - :'hashed_password' => :'UserServiceHashedPassword', - :'idp_links' => :'Array', - :'totp_secret' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddHumanUserRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddHumanUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'username') - self.username = attributes[:'username'] - end - - if attributes.key?(:'organization') - self.organization = attributes[:'organization'] - end - - if attributes.key?(:'profile') - self.profile = attributes[:'profile'] - else - self.profile = nil - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - else - self.email = nil - end - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - end - - if attributes.key?(:'metadata') - if (value = attributes[:'metadata']).is_a?(Array) - self.metadata = value - end - end - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - - if attributes.key?(:'hashed_password') - self.hashed_password = attributes[:'hashed_password'] - end - - if attributes.key?(:'idp_links') - if (value = attributes[:'idp_links']).is_a?(Array) - self.idp_links = value - end - end - - if attributes.key?(:'totp_secret') - self.totp_secret = attributes[:'totp_secret'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@user_id.nil? && @user_id.to_s.length > 200 - invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') - end - - if !@user_id.nil? && @user_id.to_s.length < 1 - invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') - end - - if !@username.nil? && @username.to_s.length > 200 - invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') - end - - if !@username.nil? && @username.to_s.length < 1 - invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') - end - - if @profile.nil? - invalid_properties.push('invalid value for "profile", profile cannot be nil.') - end - - if @email.nil? - invalid_properties.push('invalid value for "email", email cannot be nil.') - end - - if !@totp_secret.nil? && @totp_secret.to_s.length > 200 - invalid_properties.push('invalid value for "totp_secret", the character length must be smaller than or equal to 200.') - end - - if !@totp_secret.nil? && @totp_secret.to_s.length < 1 - invalid_properties.push('invalid value for "totp_secret", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@user_id.nil? && @user_id.to_s.length > 200 - return false if !@user_id.nil? && @user_id.to_s.length < 1 - return false if !@username.nil? && @username.to_s.length > 200 - return false if !@username.nil? && @username.to_s.length < 1 - return false if @profile.nil? - return false if @email.nil? - return false if !@totp_secret.nil? && @totp_secret.to_s.length > 200 - return false if !@totp_secret.nil? && @totp_secret.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] user_id Value to be assigned - def user_id=(user_id) - if user_id.nil? - fail ArgumentError, 'user_id cannot be nil' - end - - if user_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' - end - - if user_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' - end - - @user_id = user_id - end - - # Custom attribute writer method with validation - # @param [Object] username Value to be assigned - def username=(username) - if username.nil? - fail ArgumentError, 'username cannot be nil' - end - - if username.to_s.length > 200 - fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' - end - - if username.to_s.length < 1 - fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' - end - - @username = username - end - - # Custom attribute writer method with validation - # @param [Object] profile Value to be assigned - def profile=(profile) - if profile.nil? - fail ArgumentError, 'profile cannot be nil' - end - - @profile = profile - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if email.nil? - fail ArgumentError, 'email cannot be nil' - end - - @email = email - end - - # Custom attribute writer method with validation - # @param [Object] totp_secret Value to be assigned - def totp_secret=(totp_secret) - if totp_secret.nil? - fail ArgumentError, 'totp_secret cannot be nil' - end - - if totp_secret.to_s.length > 200 - fail ArgumentError, 'invalid value for "totp_secret", the character length must be smaller than or equal to 200.' - end - - if totp_secret.to_s.length < 1 - fail ArgumentError, 'invalid value for "totp_secret", the character length must be great than or equal to 1.' - end - - @totp_secret = totp_secret - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - username == o.username && - organization == o.organization && - profile == o.profile && - email == o.email && - phone == o.phone && - metadata == o.metadata && - password == o.password && - hashed_password == o.hashed_password && - idp_links == o.idp_links && - totp_secret == o.totp_secret - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, username, organization, profile, email, phone, metadata, password, hashed_password, idp_links, totp_secret].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_add_human_user_response.rb b/lib/zitadel/client/models/user_service_add_human_user_response.rb deleted file mode 100644 index 28cb54ef..00000000 --- a/lib/zitadel/client/models/user_service_add_human_user_response.rb +++ /dev/null @@ -1,257 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAddHumanUserResponse - attr_accessor :user_id - - attr_accessor :details - - attr_accessor :email_code - - attr_accessor :phone_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'details' => :'details', - :'email_code' => :'emailCode', - :'phone_code' => :'phoneCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'details' => :'UserServiceDetails', - :'email_code' => :'String', - :'phone_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddHumanUserResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddHumanUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'email_code') - self.email_code = attributes[:'email_code'] - end - - if attributes.key?(:'phone_code') - self.phone_code = attributes[:'phone_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - details == o.details && - email_code == o.email_code && - phone_code == o.phone_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, details, email_code, phone_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb b/lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb deleted file mode 100644 index 6aef28bf..00000000 --- a/lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAddIDPLinkRequest - attr_accessor :idp_link - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp_link' => :'idpLink' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp_link' => :'UserServiceIDPLink' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddIDPLinkRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddIDPLinkRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp_link') - self.idp_link = attributes[:'idp_link'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp_link == o.idp_link - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp_link].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb b/lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb deleted file mode 100644 index 587b599a..00000000 --- a/lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAddIDPLinkResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddIDPLinkResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddIDPLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb b/lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb deleted file mode 100644 index 8b89ec45..00000000 --- a/lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAddOTPEmailResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddOTPEmailResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddOTPEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb b/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb deleted file mode 100644 index aae704a0..00000000 --- a/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAddOTPSMSResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddOTPSMSResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddOTPSMSResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_and_query.rb b/lib/zitadel/client/models/user_service_and_query.rb deleted file mode 100644 index 111d0bd0..00000000 --- a/lib/zitadel/client/models/user_service_and_query.rb +++ /dev/null @@ -1,234 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Connect multiple sub-condition with and AND operator. - class UserServiceAndQuery - # the sub queries to 'AND' - attr_accessor :queries - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'queries' => :'queries' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'queries' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAndQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAndQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - queries == o.queries - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [queries].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_auth_factor.rb b/lib/zitadel/client/models/user_service_auth_factor.rb deleted file mode 100644 index 1bcc02c4..00000000 --- a/lib/zitadel/client/models/user_service_auth_factor.rb +++ /dev/null @@ -1,268 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAuthFactor - attr_accessor :state - - attr_accessor :otp - - attr_accessor :u2f - - attr_accessor :otp_sms - - attr_accessor :otp_email - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'state' => :'state', - :'otp' => :'otp', - :'u2f' => :'u2f', - :'otp_sms' => :'otpSms', - :'otp_email' => :'otpEmail' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'state' => :'UserServiceAuthFactorState', - :'otp' => :'Object', - :'u2f' => :'UserServiceAuthFactorU2F', - :'otp_sms' => :'Object', - :'otp_email' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAuthFactor` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAuthFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'AUTH_FACTOR_STATE_UNSPECIFIED' - end - - if attributes.key?(:'otp') - self.otp = attributes[:'otp'] - end - - if attributes.key?(:'u2f') - self.u2f = attributes[:'u2f'] - end - - if attributes.key?(:'otp_sms') - self.otp_sms = attributes[:'otp_sms'] - end - - if attributes.key?(:'otp_email') - self.otp_email = attributes[:'otp_email'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - state == o.state && - otp == o.otp && - u2f == o.u2f && - otp_sms == o.otp_sms && - otp_email == o.otp_email - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [state, otp, u2f, otp_sms, otp_email].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_auth_factor_state.rb b/lib/zitadel/client/models/user_service_auth_factor_state.rb deleted file mode 100644 index 44348691..00000000 --- a/lib/zitadel/client/models/user_service_auth_factor_state.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAuthFactorState - AUTH_FACTOR_STATE_UNSPECIFIED = "AUTH_FACTOR_STATE_UNSPECIFIED".freeze - AUTH_FACTOR_STATE_NOT_READY = "AUTH_FACTOR_STATE_NOT_READY".freeze - AUTH_FACTOR_STATE_READY = "AUTH_FACTOR_STATE_READY".freeze - AUTH_FACTOR_STATE_REMOVED = "AUTH_FACTOR_STATE_REMOVED".freeze - - def self.all_vars - @all_vars ||= [AUTH_FACTOR_STATE_UNSPECIFIED, AUTH_FACTOR_STATE_NOT_READY, AUTH_FACTOR_STATE_READY, AUTH_FACTOR_STATE_REMOVED].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceAuthFactorState.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceAuthFactorState" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_auth_factor_u2_f.rb b/lib/zitadel/client/models/user_service_auth_factor_u2_f.rb deleted file mode 100644 index fa1048a6..00000000 --- a/lib/zitadel/client/models/user_service_auth_factor_u2_f.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAuthFactorU2F - attr_accessor :id - - attr_accessor :name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'name' => :'name' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAuthFactorU2F` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAuthFactorU2F`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - name == o.name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_authentication_method_type.rb b/lib/zitadel/client/models/user_service_authentication_method_type.rb deleted file mode 100644 index d3e70a79..00000000 --- a/lib/zitadel/client/models/user_service_authentication_method_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceAuthenticationMethodType - AUTHENTICATION_METHOD_TYPE_UNSPECIFIED = "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED".freeze - AUTHENTICATION_METHOD_TYPE_PASSWORD = "AUTHENTICATION_METHOD_TYPE_PASSWORD".freeze - AUTHENTICATION_METHOD_TYPE_PASSKEY = "AUTHENTICATION_METHOD_TYPE_PASSKEY".freeze - AUTHENTICATION_METHOD_TYPE_IDP = "AUTHENTICATION_METHOD_TYPE_IDP".freeze - AUTHENTICATION_METHOD_TYPE_TOTP = "AUTHENTICATION_METHOD_TYPE_TOTP".freeze - AUTHENTICATION_METHOD_TYPE_U2_F = "AUTHENTICATION_METHOD_TYPE_U2F".freeze - AUTHENTICATION_METHOD_TYPE_OTP_SMS = "AUTHENTICATION_METHOD_TYPE_OTP_SMS".freeze - AUTHENTICATION_METHOD_TYPE_OTP_EMAIL = "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL".freeze - - def self.all_vars - @all_vars ||= [AUTHENTICATION_METHOD_TYPE_UNSPECIFIED, AUTHENTICATION_METHOD_TYPE_PASSWORD, AUTHENTICATION_METHOD_TYPE_PASSKEY, AUTHENTICATION_METHOD_TYPE_IDP, AUTHENTICATION_METHOD_TYPE_TOTP, AUTHENTICATION_METHOD_TYPE_U2_F, AUTHENTICATION_METHOD_TYPE_OTP_SMS, AUTHENTICATION_METHOD_TYPE_OTP_EMAIL].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceAuthenticationMethodType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceAuthenticationMethodType" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_create_invite_code_request.rb b/lib/zitadel/client/models/user_service_create_invite_code_request.rb deleted file mode 100644 index d691a4c2..00000000 --- a/lib/zitadel/client/models/user_service_create_invite_code_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceCreateInviteCodeRequest - attr_accessor :send_code - - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'send_code' => :'sendCode', - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'send_code' => :'UserServiceSendInviteCode', - :'return_code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreateInviteCodeRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreateInviteCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - send_code == o.send_code && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [send_code, return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_create_invite_code_response.rb b/lib/zitadel/client/models/user_service_create_invite_code_response.rb deleted file mode 100644 index 2ad90a73..00000000 --- a/lib/zitadel/client/models/user_service_create_invite_code_response.rb +++ /dev/null @@ -1,240 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceCreateInviteCodeResponse - attr_accessor :details - - # The invite code is returned if the verification was set to return_code. - attr_accessor :invite_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'invite_code' => :'inviteCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'invite_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreateInviteCodeResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreateInviteCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'invite_code') - self.invite_code = attributes[:'invite_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - invite_code == o.invite_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, invite_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb b/lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb deleted file mode 100644 index 2db10461..00000000 --- a/lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceCreatePasskeyRegistrationLinkRequest - attr_accessor :send_link - - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'send_link' => :'sendLink', - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'send_link' => :'UserServiceSendPasskeyRegistrationLink', - :'return_code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'send_link') - self.send_link = attributes[:'send_link'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - send_link == o.send_link && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [send_link, return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb b/lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb deleted file mode 100644 index d3592b03..00000000 --- a/lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceCreatePasskeyRegistrationLinkResponse - attr_accessor :details - - attr_accessor :code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'code' => :'code' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'code' => :'UserServicePasskeyRegistrationCode' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - code == o.code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_deactivate_user_response.rb b/lib/zitadel/client/models/user_service_deactivate_user_response.rb deleted file mode 100644 index 9efb53ab..00000000 --- a/lib/zitadel/client/models/user_service_deactivate_user_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceDeactivateUserResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDeactivateUserResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDeactivateUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_delete_user_response.rb b/lib/zitadel/client/models/user_service_delete_user_response.rb deleted file mode 100644 index a4254b64..00000000 --- a/lib/zitadel/client/models/user_service_delete_user_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceDeleteUserResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDeleteUserResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDeleteUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_details.rb b/lib/zitadel/client/models/user_service_details.rb deleted file mode 100644 index ac688016..00000000 --- a/lib/zitadel/client/models/user_service_details.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceDetails - # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :sequence - - # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation - attr_accessor :change_date - - attr_accessor :resource_owner - - attr_accessor :creation_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'sequence' => :'sequence', - :'change_date' => :'changeDate', - :'resource_owner' => :'resourceOwner', - :'creation_date' => :'creationDate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'sequence' => :'String', - :'change_date' => :'Time', - :'resource_owner' => :'String', - :'creation_date' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'sequence') - self.sequence = attributes[:'sequence'] - end - - if attributes.key?(:'change_date') - self.change_date = attributes[:'change_date'] - end - - if attributes.key?(:'resource_owner') - self.resource_owner = attributes[:'resource_owner'] - end - - if attributes.key?(:'creation_date') - self.creation_date = attributes[:'creation_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - sequence == o.sequence && - change_date == o.change_date && - resource_owner == o.resource_owner && - creation_date == o.creation_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [sequence, change_date, resource_owner, creation_date].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_display_name_query.rb b/lib/zitadel/client/models/user_service_display_name_query.rb deleted file mode 100644 index 9c3239bf..00000000 --- a/lib/zitadel/client/models/user_service_display_name_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific display name. - class UserServiceDisplayNameQuery - attr_accessor :display_name - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'display_name' => :'displayName', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'display_name' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDisplayNameQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDisplayNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - else - self.display_name = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @display_name.nil? - invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') - end - - if @display_name.to_s.length > 200 - invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') - end - - if @display_name.to_s.length < 1 - invalid_properties.push('invalid value for "display_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @display_name.nil? - return false if @display_name.to_s.length > 200 - return false if @display_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] display_name Value to be assigned - def display_name=(display_name) - if display_name.nil? - fail ArgumentError, 'display_name cannot be nil' - end - - if display_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' - end - - if display_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "display_name", the character length must be great than or equal to 1.' - end - - @display_name = display_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - display_name == o.display_name && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [display_name, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_email_query.rb b/lib/zitadel/client/models/user_service_email_query.rb deleted file mode 100644 index f62341f1..00000000 --- a/lib/zitadel/client/models/user_service_email_query.rb +++ /dev/null @@ -1,291 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific email. - class UserServiceEmailQuery - # email address of the user - attr_accessor :email_address - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'email_address' => :'emailAddress', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'email_address' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceEmailQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceEmailQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'email_address') - self.email_address = attributes[:'email_address'] - else - self.email_address = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @email_address.nil? - invalid_properties.push('invalid value for "email_address", email_address cannot be nil.') - end - - if @email_address.to_s.length > 200 - invalid_properties.push('invalid value for "email_address", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @email_address.nil? - return false if @email_address.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] email_address Value to be assigned - def email_address=(email_address) - if email_address.nil? - fail ArgumentError, 'email_address cannot be nil' - end - - if email_address.to_s.length > 200 - fail ArgumentError, 'invalid value for "email_address", the character length must be smaller than or equal to 200.' - end - - @email_address = email_address - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email_address == o.email_address && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [email_address, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_first_name_query.rb b/lib/zitadel/client/models/user_service_first_name_query.rb deleted file mode 100644 index a015372c..00000000 --- a/lib/zitadel/client/models/user_service_first_name_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific first name. - class UserServiceFirstNameQuery - attr_accessor :first_name - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'first_name' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceFirstNameQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceFirstNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'first_name') - self.first_name = attributes[:'first_name'] - else - self.first_name = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @first_name.nil? - invalid_properties.push('invalid value for "first_name", first_name cannot be nil.') - end - - if @first_name.to_s.length > 200 - invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 200.') - end - - if @first_name.to_s.length < 1 - invalid_properties.push('invalid value for "first_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @first_name.nil? - return false if @first_name.to_s.length > 200 - return false if @first_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] first_name Value to be assigned - def first_name=(first_name) - if first_name.nil? - fail ArgumentError, 'first_name cannot be nil' - end - - if first_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 200.' - end - - if first_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "first_name", the character length must be great than or equal to 1.' - end - - @first_name = first_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_name == o.first_name && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [first_name, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_gender.rb b/lib/zitadel/client/models/user_service_gender.rb deleted file mode 100644 index 9ad89198..00000000 --- a/lib/zitadel/client/models/user_service_gender.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceGender - GENDER_UNSPECIFIED = "GENDER_UNSPECIFIED".freeze - GENDER_FEMALE = "GENDER_FEMALE".freeze - GENDER_MALE = "GENDER_MALE".freeze - GENDER_DIVERSE = "GENDER_DIVERSE".freeze - - def self.all_vars - @all_vars ||= [GENDER_UNSPECIFIED, GENDER_FEMALE, GENDER_MALE, GENDER_DIVERSE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceGender.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceGender" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb b/lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb deleted file mode 100644 index 6fd54dc1..00000000 --- a/lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceGetUserByIDResponse - attr_accessor :details - - attr_accessor :user - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'user' => :'user' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'user' => :'UserServiceUser' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceGetUserByIDResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceGetUserByIDResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'user') - self.user = attributes[:'user'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - user == o.user - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, user].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_hashed_password.rb b/lib/zitadel/client/models/user_service_hashed_password.rb deleted file mode 100644 index fc033983..00000000 --- a/lib/zitadel/client/models/user_service_hashed_password.rb +++ /dev/null @@ -1,275 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceHashedPassword - # \"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\" - attr_accessor :hash - - attr_accessor :change_required - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'hash' => :'hash', - :'change_required' => :'changeRequired' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'hash' => :'String', - :'change_required' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHashedPassword` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHashedPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'hash') - self.hash = attributes[:'hash'] - else - self.hash = nil - end - - if attributes.key?(:'change_required') - self.change_required = attributes[:'change_required'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @hash.nil? - invalid_properties.push('invalid value for "hash", hash cannot be nil.') - end - - if @hash.to_s.length > 200 - invalid_properties.push('invalid value for "hash", the character length must be smaller than or equal to 200.') - end - - if @hash.to_s.length < 1 - invalid_properties.push('invalid value for "hash", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @hash.nil? - return false if @hash.to_s.length > 200 - return false if @hash.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] hash Value to be assigned - def hash=(hash) - if hash.nil? - fail ArgumentError, 'hash cannot be nil' - end - - if hash.to_s.length > 200 - fail ArgumentError, 'invalid value for "hash", the character length must be smaller than or equal to 200.' - end - - if hash.to_s.length < 1 - fail ArgumentError, 'invalid value for "hash", the character length must be great than or equal to 1.' - end - - @hash = hash - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - hash == o.hash && - change_required == o.change_required - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [hash, change_required].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_human_email.rb b/lib/zitadel/client/models/user_service_human_email.rb deleted file mode 100644 index 5c088847..00000000 --- a/lib/zitadel/client/models/user_service_human_email.rb +++ /dev/null @@ -1,267 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceHumanEmail - attr_accessor :email - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'email' => :'email', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'email' => :'String', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanEmail` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@email.nil? && @email.to_s.length > 200 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') - end - - if !@email.nil? && @email.to_s.length < 1 - invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@email.nil? && @email.to_s.length > 200 - return false if !@email.nil? && @email.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if email.nil? - fail ArgumentError, 'email cannot be nil' - end - - if email.to_s.length > 200 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' - end - - if email.to_s.length < 1 - fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' - end - - @email = email - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email == o.email && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [email, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb b/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb deleted file mode 100644 index 532c5a95..00000000 --- a/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceHumanMFAInitSkippedResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanMFAInitSkippedResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanMFAInitSkippedResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_human_phone.rb b/lib/zitadel/client/models/user_service_human_phone.rb deleted file mode 100644 index 0c4a4acc..00000000 --- a/lib/zitadel/client/models/user_service_human_phone.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceHumanPhone - attr_accessor :phone - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'phone' => :'phone', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'phone' => :'String', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanPhone` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanPhone`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@phone.nil? && @phone.to_s.length > 200 - invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@phone.nil? && @phone.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] phone Value to be assigned - def phone=(phone) - if phone.nil? - fail ArgumentError, 'phone cannot be nil' - end - - if phone.to_s.length > 200 - fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' - end - - @phone = phone - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - phone == o.phone && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [phone, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_human_profile.rb b/lib/zitadel/client/models/user_service_human_profile.rb deleted file mode 100644 index 072c9b81..00000000 --- a/lib/zitadel/client/models/user_service_human_profile.rb +++ /dev/null @@ -1,422 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceHumanProfile - attr_accessor :given_name - - attr_accessor :family_name - - attr_accessor :nick_name - - attr_accessor :display_name - - attr_accessor :preferred_language - - attr_accessor :gender - - # avatar URL of the user - attr_accessor :avatar_url - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'given_name' => :'givenName', - :'family_name' => :'familyName', - :'nick_name' => :'nickName', - :'display_name' => :'displayName', - :'preferred_language' => :'preferredLanguage', - :'gender' => :'gender', - :'avatar_url' => :'avatarUrl' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'given_name' => :'String', - :'family_name' => :'String', - :'nick_name' => :'String', - :'display_name' => :'String', - :'preferred_language' => :'String', - :'gender' => :'UserServiceGender', - :'avatar_url' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanProfile` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'given_name') - self.given_name = attributes[:'given_name'] - end - - if attributes.key?(:'family_name') - self.family_name = attributes[:'family_name'] - end - - if attributes.key?(:'nick_name') - self.nick_name = attributes[:'nick_name'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'preferred_language') - self.preferred_language = attributes[:'preferred_language'] - end - - if attributes.key?(:'gender') - self.gender = attributes[:'gender'] - else - self.gender = 'GENDER_UNSPECIFIED' - end - - if attributes.key?(:'avatar_url') - self.avatar_url = attributes[:'avatar_url'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@given_name.nil? && @given_name.to_s.length > 200 - invalid_properties.push('invalid value for "given_name", the character length must be smaller than or equal to 200.') - end - - if !@given_name.nil? && @given_name.to_s.length < 1 - invalid_properties.push('invalid value for "given_name", the character length must be great than or equal to 1.') - end - - if !@family_name.nil? && @family_name.to_s.length > 200 - invalid_properties.push('invalid value for "family_name", the character length must be smaller than or equal to 200.') - end - - if !@family_name.nil? && @family_name.to_s.length < 1 - invalid_properties.push('invalid value for "family_name", the character length must be great than or equal to 1.') - end - - if !@nick_name.nil? && @nick_name.to_s.length > 200 - invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') - end - - if !@display_name.nil? && @display_name.to_s.length > 200 - invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') - end - - if !@preferred_language.nil? && @preferred_language.to_s.length > 10 - invalid_properties.push('invalid value for "preferred_language", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@given_name.nil? && @given_name.to_s.length > 200 - return false if !@given_name.nil? && @given_name.to_s.length < 1 - return false if !@family_name.nil? && @family_name.to_s.length > 200 - return false if !@family_name.nil? && @family_name.to_s.length < 1 - return false if !@nick_name.nil? && @nick_name.to_s.length > 200 - return false if !@display_name.nil? && @display_name.to_s.length > 200 - return false if !@preferred_language.nil? && @preferred_language.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] given_name Value to be assigned - def given_name=(given_name) - if given_name.nil? - fail ArgumentError, 'given_name cannot be nil' - end - - if given_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "given_name", the character length must be smaller than or equal to 200.' - end - - if given_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "given_name", the character length must be great than or equal to 1.' - end - - @given_name = given_name - end - - # Custom attribute writer method with validation - # @param [Object] family_name Value to be assigned - def family_name=(family_name) - if family_name.nil? - fail ArgumentError, 'family_name cannot be nil' - end - - if family_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "family_name", the character length must be smaller than or equal to 200.' - end - - if family_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "family_name", the character length must be great than or equal to 1.' - end - - @family_name = family_name - end - - # Custom attribute writer method with validation - # @param [Object] nick_name Value to be assigned - def nick_name=(nick_name) - if nick_name.nil? - fail ArgumentError, 'nick_name cannot be nil' - end - - if nick_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' - end - - @nick_name = nick_name - end - - # Custom attribute writer method with validation - # @param [Object] display_name Value to be assigned - def display_name=(display_name) - if display_name.nil? - fail ArgumentError, 'display_name cannot be nil' - end - - if display_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' - end - - @display_name = display_name - end - - # Custom attribute writer method with validation - # @param [Object] preferred_language Value to be assigned - def preferred_language=(preferred_language) - if preferred_language.nil? - fail ArgumentError, 'preferred_language cannot be nil' - end - - if preferred_language.to_s.length > 10 - fail ArgumentError, 'invalid value for "preferred_language", the character length must be smaller than or equal to 10.' - end - - @preferred_language = preferred_language - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - given_name == o.given_name && - family_name == o.family_name && - nick_name == o.nick_name && - display_name == o.display_name && - preferred_language == o.preferred_language && - gender == o.gender && - avatar_url == o.avatar_url - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [given_name, family_name, nick_name, display_name, preferred_language, gender, avatar_url].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_human_user.rb b/lib/zitadel/client/models/user_service_human_user.rb deleted file mode 100644 index d9e3a8b0..00000000 --- a/lib/zitadel/client/models/user_service_human_user.rb +++ /dev/null @@ -1,353 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceHumanUser - # Unique identifier of the user. - attr_accessor :user_id - - attr_accessor :state - - # Username of the user, which can be globally unique or unique on organization level. - attr_accessor :username - - # Possible usable login names for the user. - attr_accessor :login_names - - # Preferred login name of the user. - attr_accessor :preferred_login_name - - attr_accessor :profile - - attr_accessor :email - - attr_accessor :phone - - # User is required to change the used password on the next login. - attr_accessor :password_change_required - - # The time the user last changed their password. - attr_accessor :password_changed - - # The time the user last skipped MFA initialization. - attr_accessor :mfa_init_skipped - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'state' => :'state', - :'username' => :'username', - :'login_names' => :'loginNames', - :'preferred_login_name' => :'preferredLoginName', - :'profile' => :'profile', - :'email' => :'email', - :'phone' => :'phone', - :'password_change_required' => :'passwordChangeRequired', - :'password_changed' => :'passwordChanged', - :'mfa_init_skipped' => :'mfaInitSkipped' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'state' => :'UserServiceUserState', - :'username' => :'String', - :'login_names' => :'Array', - :'preferred_login_name' => :'String', - :'profile' => :'UserServiceHumanProfile', - :'email' => :'UserServiceHumanEmail', - :'phone' => :'UserServiceHumanPhone', - :'password_change_required' => :'Boolean', - :'password_changed' => :'Time', - :'mfa_init_skipped' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanUser` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'USER_STATE_UNSPECIFIED' - end - - if attributes.key?(:'username') - self.username = attributes[:'username'] - end - - if attributes.key?(:'login_names') - if (value = attributes[:'login_names']).is_a?(Array) - self.login_names = value - end - end - - if attributes.key?(:'preferred_login_name') - self.preferred_login_name = attributes[:'preferred_login_name'] - end - - if attributes.key?(:'profile') - self.profile = attributes[:'profile'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - end - - if attributes.key?(:'password_change_required') - self.password_change_required = attributes[:'password_change_required'] - end - - if attributes.key?(:'password_changed') - self.password_changed = attributes[:'password_changed'] - end - - if attributes.key?(:'mfa_init_skipped') - self.mfa_init_skipped = attributes[:'mfa_init_skipped'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - state == o.state && - username == o.username && - login_names == o.login_names && - preferred_login_name == o.preferred_login_name && - profile == o.profile && - email == o.email && - phone == o.phone && - password_change_required == o.password_change_required && - password_changed == o.password_changed && - mfa_init_skipped == o.mfa_init_skipped - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, state, username, login_names, preferred_login_name, profile, email, phone, password_change_required, password_changed, mfa_init_skipped].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_i_d_p_information.rb b/lib/zitadel/client/models/user_service_i_d_p_information.rb deleted file mode 100644 index c4b5b7ab..00000000 --- a/lib/zitadel/client/models/user_service_i_d_p_information.rb +++ /dev/null @@ -1,288 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceIDPInformation - attr_accessor :oauth - - attr_accessor :ldap - - attr_accessor :saml - - # ID of the identity provider - attr_accessor :idp_id - - # ID of the user of the identity provider - attr_accessor :user_id - - # username of the user of the identity provider - attr_accessor :user_name - - # complete information returned by the identity provider - attr_accessor :raw_information - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'oauth' => :'oauth', - :'ldap' => :'ldap', - :'saml' => :'saml', - :'idp_id' => :'idpId', - :'user_id' => :'userId', - :'user_name' => :'userName', - :'raw_information' => :'rawInformation' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'oauth' => :'UserServiceIDPOAuthAccessInformation', - :'ldap' => :'UserServiceIDPLDAPAccessInformation', - :'saml' => :'UserServiceIDPSAMLAccessInformation', - :'idp_id' => :'String', - :'user_id' => :'String', - :'user_name' => :'String', - :'raw_information' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPInformation` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'oauth') - self.oauth = attributes[:'oauth'] - end - - if attributes.key?(:'ldap') - self.ldap = attributes[:'ldap'] - end - - if attributes.key?(:'saml') - self.saml = attributes[:'saml'] - end - - if attributes.key?(:'idp_id') - self.idp_id = attributes[:'idp_id'] - end - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'user_name') - self.user_name = attributes[:'user_name'] - end - - if attributes.key?(:'raw_information') - self.raw_information = attributes[:'raw_information'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - oauth == o.oauth && - ldap == o.ldap && - saml == o.saml && - idp_id == o.idp_id && - user_id == o.user_id && - user_name == o.user_name && - raw_information == o.raw_information - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [oauth, ldap, saml, idp_id, user_id, user_name, raw_information].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_i_d_p_intent.rb b/lib/zitadel/client/models/user_service_i_d_p_intent.rb deleted file mode 100644 index 74b4ecf9..00000000 --- a/lib/zitadel/client/models/user_service_i_d_p_intent.rb +++ /dev/null @@ -1,326 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceIDPIntent - # ID of the IDP intent - attr_accessor :idp_intent_id - - # token of the IDP intent - attr_accessor :idp_intent_token - - # ID of the ZITADEL user if external user already linked - attr_accessor :user_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp_intent_id' => :'idpIntentId', - :'idp_intent_token' => :'idpIntentToken', - :'user_id' => :'userId' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp_intent_id' => :'String', - :'idp_intent_token' => :'String', - :'user_id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPIntent` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPIntent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp_intent_id') - self.idp_intent_id = attributes[:'idp_intent_id'] - end - - if attributes.key?(:'idp_intent_token') - self.idp_intent_token = attributes[:'idp_intent_token'] - end - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 - invalid_properties.push('invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.') - end - - if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 - invalid_properties.push('invalid value for "idp_intent_id", the character length must be great than or equal to 1.') - end - - if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 - invalid_properties.push('invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.') - end - - if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 - invalid_properties.push('invalid value for "idp_intent_token", the character length must be great than or equal to 1.') - end - - if !@user_id.nil? && @user_id.to_s.length > 200 - invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 - return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 - return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 - return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 - return false if !@user_id.nil? && @user_id.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] idp_intent_id Value to be assigned - def idp_intent_id=(idp_intent_id) - if idp_intent_id.nil? - fail ArgumentError, 'idp_intent_id cannot be nil' - end - - if idp_intent_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.' - end - - if idp_intent_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be great than or equal to 1.' - end - - @idp_intent_id = idp_intent_id - end - - # Custom attribute writer method with validation - # @param [Object] idp_intent_token Value to be assigned - def idp_intent_token=(idp_intent_token) - if idp_intent_token.nil? - fail ArgumentError, 'idp_intent_token cannot be nil' - end - - if idp_intent_token.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.' - end - - if idp_intent_token.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be great than or equal to 1.' - end - - @idp_intent_token = idp_intent_token - end - - # Custom attribute writer method with validation - # @param [Object] user_id Value to be assigned - def user_id=(user_id) - if user_id.nil? - fail ArgumentError, 'user_id cannot be nil' - end - - if user_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' - end - - @user_id = user_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp_intent_id == o.idp_intent_id && - idp_intent_token == o.idp_intent_token && - user_id == o.user_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp_intent_id, idp_intent_token, user_id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb b/lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb deleted file mode 100644 index d35ecb6d..00000000 --- a/lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceIDPLDAPAccessInformation - attr_accessor :attributes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'attributes' => :'attributes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'attributes' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPLDAPAccessInformation` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPLDAPAccessInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [attributes].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_i_d_p_link.rb b/lib/zitadel/client/models/user_service_i_d_p_link.rb deleted file mode 100644 index 5bc754ed..00000000 --- a/lib/zitadel/client/models/user_service_i_d_p_link.rb +++ /dev/null @@ -1,335 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceIDPLink - # ID of the identity provider - attr_accessor :idp_id - - # ID of the user of the identity provider - attr_accessor :user_id - - # username of the user of the identity provider - attr_accessor :user_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp_id' => :'idpId', - :'user_id' => :'userId', - :'user_name' => :'userName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp_id' => :'String', - :'user_id' => :'String', - :'user_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPLink` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp_id') - self.idp_id = attributes[:'idp_id'] - end - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'user_name') - self.user_name = attributes[:'user_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@idp_id.nil? && @idp_id.to_s.length > 200 - invalid_properties.push('invalid value for "idp_id", the character length must be smaller than or equal to 200.') - end - - if !@idp_id.nil? && @idp_id.to_s.length < 1 - invalid_properties.push('invalid value for "idp_id", the character length must be great than or equal to 1.') - end - - if !@user_id.nil? && @user_id.to_s.length > 200 - invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') - end - - if !@user_id.nil? && @user_id.to_s.length < 1 - invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') - end - - if !@user_name.nil? && @user_name.to_s.length > 200 - invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 200.') - end - - if !@user_name.nil? && @user_name.to_s.length < 1 - invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@idp_id.nil? && @idp_id.to_s.length > 200 - return false if !@idp_id.nil? && @idp_id.to_s.length < 1 - return false if !@user_id.nil? && @user_id.to_s.length > 200 - return false if !@user_id.nil? && @user_id.to_s.length < 1 - return false if !@user_name.nil? && @user_name.to_s.length > 200 - return false if !@user_name.nil? && @user_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] idp_id Value to be assigned - def idp_id=(idp_id) - if idp_id.nil? - fail ArgumentError, 'idp_id cannot be nil' - end - - if idp_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_id", the character length must be smaller than or equal to 200.' - end - - if idp_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_id", the character length must be great than or equal to 1.' - end - - @idp_id = idp_id - end - - # Custom attribute writer method with validation - # @param [Object] user_id Value to be assigned - def user_id=(user_id) - if user_id.nil? - fail ArgumentError, 'user_id cannot be nil' - end - - if user_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' - end - - if user_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' - end - - @user_id = user_id - end - - # Custom attribute writer method with validation - # @param [Object] user_name Value to be assigned - def user_name=(user_name) - if user_name.nil? - fail ArgumentError, 'user_name cannot be nil' - end - - if user_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 200.' - end - - if user_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.' - end - - @user_name = user_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp_id == o.idp_id && - user_id == o.user_id && - user_name == o.user_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp_id, user_id, user_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb b/lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb deleted file mode 100644 index 5be6b497..00000000 --- a/lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceIDPOAuthAccessInformation - attr_accessor :access_token - - attr_accessor :id_token - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'access_token' => :'accessToken', - :'id_token' => :'idToken' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'access_token' => :'String', - :'id_token' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPOAuthAccessInformation` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPOAuthAccessInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'access_token') - self.access_token = attributes[:'access_token'] - end - - if attributes.key?(:'id_token') - self.id_token = attributes[:'id_token'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - access_token == o.access_token && - id_token == o.id_token - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [access_token, id_token].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb b/lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb deleted file mode 100644 index 6b6f1f67..00000000 --- a/lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceIDPSAMLAccessInformation - attr_accessor :assertion - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'assertion' => :'assertion' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'assertion' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPSAMLAccessInformation` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPSAMLAccessInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'assertion') - self.assertion = attributes[:'assertion'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - assertion == o.assertion - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [assertion].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_in_user_emails_query.rb b/lib/zitadel/client/models/user_service_in_user_emails_query.rb deleted file mode 100644 index a92f79de..00000000 --- a/lib/zitadel/client/models/user_service_in_user_emails_query.rb +++ /dev/null @@ -1,234 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with email in list of emails. - class UserServiceInUserEmailsQuery - # the emails of the users to include - attr_accessor :user_emails - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_emails' => :'userEmails' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_emails' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceInUserEmailsQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceInUserEmailsQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_emails') - if (value = attributes[:'user_emails']).is_a?(Array) - self.user_emails = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_emails == o.user_emails - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_emails].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_in_user_i_d_query.rb b/lib/zitadel/client/models/user_service_in_user_i_d_query.rb deleted file mode 100644 index f84c0588..00000000 --- a/lib/zitadel/client/models/user_service_in_user_i_d_query.rb +++ /dev/null @@ -1,234 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with ID in list of IDs. - class UserServiceInUserIDQuery - # the ids of the users to include - attr_accessor :user_ids - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_ids' => :'userIds' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_ids' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceInUserIDQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceInUserIDQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_ids') - if (value = attributes[:'user_ids']).is_a?(Array) - self.user_ids = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_ids == o.user_ids - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_ids].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb b/lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb deleted file mode 100644 index f8cb8b68..00000000 --- a/lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb +++ /dev/null @@ -1,297 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceLDAPCredentials - # Username used to login through LDAP - attr_accessor :username - - # Password used to login through LDAP - attr_accessor :password - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'username' => :'username', - :'password' => :'password' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'username' => :'String', - :'password' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLDAPCredentials` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLDAPCredentials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'username') - self.username = attributes[:'username'] - end - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@username.nil? && @username.to_s.length > 200 - invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') - end - - if !@username.nil? && @username.to_s.length < 1 - invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') - end - - if !@password.nil? && @password.to_s.length > 200 - invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') - end - - if !@password.nil? && @password.to_s.length < 1 - invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@username.nil? && @username.to_s.length > 200 - return false if !@username.nil? && @username.to_s.length < 1 - return false if !@password.nil? && @password.to_s.length > 200 - return false if !@password.nil? && @password.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] username Value to be assigned - def username=(username) - if username.nil? - fail ArgumentError, 'username cannot be nil' - end - - if username.to_s.length > 200 - fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' - end - - if username.to_s.length < 1 - fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' - end - - @username = username - end - - # Custom attribute writer method with validation - # @param [Object] password Value to be assigned - def password=(password) - if password.nil? - fail ArgumentError, 'password cannot be nil' - end - - if password.to_s.length > 200 - fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' - end - - if password.to_s.length < 1 - fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' - end - - @password = password - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - username == o.username && - password == o.password - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [username, password].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_last_name_query.rb b/lib/zitadel/client/models/user_service_last_name_query.rb deleted file mode 100644 index cc86a387..00000000 --- a/lib/zitadel/client/models/user_service_last_name_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific last name. - class UserServiceLastNameQuery - attr_accessor :last_name - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'last_name' => :'lastName', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'last_name' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLastNameQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLastNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'last_name') - self.last_name = attributes[:'last_name'] - else - self.last_name = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @last_name.nil? - invalid_properties.push('invalid value for "last_name", last_name cannot be nil.') - end - - if @last_name.to_s.length > 200 - invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 200.') - end - - if @last_name.to_s.length < 1 - invalid_properties.push('invalid value for "last_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @last_name.nil? - return false if @last_name.to_s.length > 200 - return false if @last_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] last_name Value to be assigned - def last_name=(last_name) - if last_name.nil? - fail ArgumentError, 'last_name cannot be nil' - end - - if last_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 200.' - end - - if last_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "last_name", the character length must be great than or equal to 1.' - end - - @last_name = last_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - last_name == o.last_name && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [last_name, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_authentication_factors_response.rb b/lib/zitadel/client/models/user_service_list_authentication_factors_response.rb deleted file mode 100644 index d4f994bd..00000000 --- a/lib/zitadel/client/models/user_service_list_authentication_factors_response.rb +++ /dev/null @@ -1,232 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListAuthenticationFactorsResponse - attr_accessor :result - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'result' => :'result' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'result' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListAuthenticationFactorsResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListAuthenticationFactorsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'result') - if (value = attributes[:'result']).is_a?(Array) - self.result = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - result == o.result - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [result].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb b/lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb deleted file mode 100644 index 5f741241..00000000 --- a/lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListAuthenticationMethodTypesResponse - attr_accessor :details - - attr_accessor :auth_method_types - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'auth_method_types' => :'authMethodTypes' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceListDetails', - :'auth_method_types' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListAuthenticationMethodTypesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListAuthenticationMethodTypesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'auth_method_types') - if (value = attributes[:'auth_method_types']).is_a?(Array) - self.auth_method_types = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - auth_method_types == o.auth_method_types - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, auth_method_types].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_details.rb b/lib/zitadel/client/models/user_service_list_details.rb deleted file mode 100644 index c2424933..00000000 --- a/lib/zitadel/client/models/user_service_list_details.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListDetails - attr_accessor :total_result - - attr_accessor :processed_sequence - - # the last time the projection got updated - attr_accessor :timestamp - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'total_result' => :'totalResult', - :'processed_sequence' => :'processedSequence', - :'timestamp' => :'timestamp' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'total_result' => :'String', - :'processed_sequence' => :'String', - :'timestamp' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListDetails` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'total_result') - self.total_result = attributes[:'total_result'] - end - - if attributes.key?(:'processed_sequence') - self.processed_sequence = attributes[:'processed_sequence'] - end - - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total_result == o.total_result && - processed_sequence == o.processed_sequence && - timestamp == o.timestamp - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [total_result, processed_sequence, timestamp].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb b/lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb deleted file mode 100644 index 44cb5210..00000000 --- a/lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListIDPLinksRequest - attr_accessor :query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'query' => :'query' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'query' => :'UserServiceListQuery' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListIDPLinksRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListIDPLinksRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [query].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb b/lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb deleted file mode 100644 index c5033431..00000000 --- a/lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListIDPLinksResponse - attr_accessor :details - - attr_accessor :result - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'result' => :'result' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceListDetails', - :'result' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListIDPLinksResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListIDPLinksResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'result') - if (value = attributes[:'result']).is_a?(Array) - self.result = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - result == o.result - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, result].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_passkeys_response.rb b/lib/zitadel/client/models/user_service_list_passkeys_response.rb deleted file mode 100644 index d5ffb0de..00000000 --- a/lib/zitadel/client/models/user_service_list_passkeys_response.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListPasskeysResponse - attr_accessor :details - - attr_accessor :result - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'result' => :'result' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceListDetails', - :'result' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListPasskeysResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListPasskeysResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'result') - if (value = attributes[:'result']).is_a?(Array) - self.result = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - result == o.result - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, result].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_query.rb b/lib/zitadel/client/models/user_service_list_query.rb deleted file mode 100644 index 3484fe15..00000000 --- a/lib/zitadel/client/models/user_service_list_query.rb +++ /dev/null @@ -1,251 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Object unspecific list filters like offset, limit and asc/desc. - class UserServiceListQuery - attr_accessor :offset - - # 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. - attr_accessor :limit - - # default is descending - attr_accessor :asc - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'offset' => :'offset', - :'limit' => :'limit', - :'asc' => :'asc' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'offset' => :'String', - :'limit' => :'Integer', - :'asc' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.key?(:'asc') - self.asc = attributes[:'asc'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - offset == o.offset && - limit == o.limit && - asc == o.asc - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [offset, limit, asc].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_users_request.rb b/lib/zitadel/client/models/user_service_list_users_request.rb deleted file mode 100644 index ab8aa922..00000000 --- a/lib/zitadel/client/models/user_service_list_users_request.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListUsersRequest - attr_accessor :query - - attr_accessor :sorting_column - - attr_accessor :queries - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'query' => :'query', - :'sorting_column' => :'sortingColumn', - :'queries' => :'queries' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'query' => :'UserServiceListQuery', - :'sorting_column' => :'UserServiceUserFieldName', - :'queries' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListUsersRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListUsersRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'sorting_column') - self.sorting_column = attributes[:'sorting_column'] - else - self.sorting_column = 'USER_FIELD_NAME_UNSPECIFIED' - end - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query && - sorting_column == o.sorting_column && - queries == o.queries - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [query, sorting_column, queries].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_list_users_response.rb b/lib/zitadel/client/models/user_service_list_users_response.rb deleted file mode 100644 index 04bf87fb..00000000 --- a/lib/zitadel/client/models/user_service_list_users_response.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceListUsersResponse - attr_accessor :details - - attr_accessor :sorting_column - - attr_accessor :result - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'sorting_column' => :'sortingColumn', - :'result' => :'result' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceListDetails', - :'sorting_column' => :'UserServiceUserFieldName', - :'result' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListUsersResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListUsersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'sorting_column') - self.sorting_column = attributes[:'sorting_column'] - else - self.sorting_column = 'USER_FIELD_NAME_UNSPECIFIED' - end - - if attributes.key?(:'result') - if (value = attributes[:'result']).is_a?(Array) - self.result = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - sorting_column == o.sorting_column && - result == o.result - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, sorting_column, result].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_lock_user_response.rb b/lib/zitadel/client/models/user_service_lock_user_response.rb deleted file mode 100644 index a75059ad..00000000 --- a/lib/zitadel/client/models/user_service_lock_user_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceLockUserResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLockUserResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLockUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_login_name_query.rb b/lib/zitadel/client/models/user_service_login_name_query.rb deleted file mode 100644 index e6842159..00000000 --- a/lib/zitadel/client/models/user_service_login_name_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific state. - class UserServiceLoginNameQuery - attr_accessor :login_name - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'login_name' => :'loginName', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'login_name' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLoginNameQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLoginNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'login_name') - self.login_name = attributes[:'login_name'] - else - self.login_name = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @login_name.nil? - invalid_properties.push('invalid value for "login_name", login_name cannot be nil.') - end - - if @login_name.to_s.length > 200 - invalid_properties.push('invalid value for "login_name", the character length must be smaller than or equal to 200.') - end - - if @login_name.to_s.length < 1 - invalid_properties.push('invalid value for "login_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @login_name.nil? - return false if @login_name.to_s.length > 200 - return false if @login_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] login_name Value to be assigned - def login_name=(login_name) - if login_name.nil? - fail ArgumentError, 'login_name cannot be nil' - end - - if login_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "login_name", the character length must be smaller than or equal to 200.' - end - - if login_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "login_name", the character length must be great than or equal to 1.' - end - - @login_name = login_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - login_name == o.login_name && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [login_name, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_machine_user.rb b/lib/zitadel/client/models/user_service_machine_user.rb deleted file mode 100644 index 84a9c87c..00000000 --- a/lib/zitadel/client/models/user_service_machine_user.rb +++ /dev/null @@ -1,281 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceMachineUser - attr_accessor :name - - attr_accessor :description - - attr_accessor :has_secret - - attr_accessor :access_token_type - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'description' => :'description', - :'has_secret' => :'hasSecret', - :'access_token_type' => :'accessTokenType' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'name' => :'String', - :'description' => :'String', - :'has_secret' => :'Boolean', - :'access_token_type' => :'UserServiceAccessTokenType' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceMachineUser` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceMachineUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'has_secret') - self.has_secret = attributes[:'has_secret'] - end - - if attributes.key?(:'access_token_type') - self.access_token_type = attributes[:'access_token_type'] - else - self.access_token_type = 'ACCESS_TOKEN_TYPE_BEARER' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - description == o.description && - has_secret == o.has_secret && - access_token_type == o.access_token_type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [name, description, has_secret, access_token_type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_nick_name_query.rb b/lib/zitadel/client/models/user_service_nick_name_query.rb deleted file mode 100644 index 632b2194..00000000 --- a/lib/zitadel/client/models/user_service_nick_name_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific nickname. - class UserServiceNickNameQuery - attr_accessor :nick_name - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'nick_name' => :'nickName', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'nick_name' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceNickNameQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceNickNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'nick_name') - self.nick_name = attributes[:'nick_name'] - else - self.nick_name = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @nick_name.nil? - invalid_properties.push('invalid value for "nick_name", nick_name cannot be nil.') - end - - if @nick_name.to_s.length > 200 - invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') - end - - if @nick_name.to_s.length < 1 - invalid_properties.push('invalid value for "nick_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @nick_name.nil? - return false if @nick_name.to_s.length > 200 - return false if @nick_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] nick_name Value to be assigned - def nick_name=(nick_name) - if nick_name.nil? - fail ArgumentError, 'nick_name cannot be nil' - end - - if nick_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' - end - - if nick_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "nick_name", the character length must be great than or equal to 1.' - end - - @nick_name = nick_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - nick_name == o.nick_name && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [nick_name, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_not_query.rb b/lib/zitadel/client/models/user_service_not_query.rb deleted file mode 100644 index 1ab607a5..00000000 --- a/lib/zitadel/client/models/user_service_not_query.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Negate the sub-condition. - class UserServiceNotQuery - attr_accessor :query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'query' => :'query' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'query' => :'UserServiceSearchQuery' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceNotQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceNotQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [query].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_notification_type.rb b/lib/zitadel/client/models/user_service_notification_type.rb deleted file mode 100644 index f09b9130..00000000 --- a/lib/zitadel/client/models/user_service_notification_type.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceNotificationType - NOTIFICATION_TYPE_UNSPECIFIED = "NOTIFICATION_TYPE_Unspecified".freeze - NOTIFICATION_TYPE_EMAIL = "NOTIFICATION_TYPE_Email".freeze - NOTIFICATION_TYPE_SMS = "NOTIFICATION_TYPE_SMS".freeze - - def self.all_vars - @all_vars ||= [NOTIFICATION_TYPE_UNSPECIFIED, NOTIFICATION_TYPE_EMAIL, NOTIFICATION_TYPE_SMS].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceNotificationType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceNotificationType" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_or_query.rb b/lib/zitadel/client/models/user_service_or_query.rb deleted file mode 100644 index 2a00e6d0..00000000 --- a/lib/zitadel/client/models/user_service_or_query.rb +++ /dev/null @@ -1,234 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Connect multiple sub-condition with and OR operator. - class UserServiceOrQuery - # the sub queries to 'OR' - attr_accessor :queries - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'queries' => :'queries' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'queries' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceOrQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceOrQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - queries == o.queries - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [queries].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_organization.rb b/lib/zitadel/client/models/user_service_organization.rb deleted file mode 100644 index bc6dc577..00000000 --- a/lib/zitadel/client/models/user_service_organization.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceOrganization - attr_accessor :org_id - - attr_accessor :org_domain - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'org_id' => :'orgId', - :'org_domain' => :'orgDomain' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'org_id' => :'String', - :'org_domain' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceOrganization` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceOrganization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'org_id') - self.org_id = attributes[:'org_id'] - end - - if attributes.key?(:'org_domain') - self.org_domain = attributes[:'org_domain'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - org_id == o.org_id && - org_domain == o.org_domain - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [org_id, org_domain].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_organization_id_query.rb b/lib/zitadel/client/models/user_service_organization_id_query.rb deleted file mode 100644 index f6d330f6..00000000 --- a/lib/zitadel/client/models/user_service_organization_id_query.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users under a specific organization as resource owner. - class UserServiceOrganizationIdQuery - attr_accessor :organization_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'organization_id' => :'organizationId' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'organization_id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceOrganizationIdQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceOrganizationIdQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'organization_id') - self.organization_id = attributes[:'organization_id'] - else - self.organization_id = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @organization_id.nil? - invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') - end - - if @organization_id.to_s.length > 200 - invalid_properties.push('invalid value for "organization_id", the character length must be smaller than or equal to 200.') - end - - if @organization_id.to_s.length < 1 - invalid_properties.push('invalid value for "organization_id", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @organization_id.nil? - return false if @organization_id.to_s.length > 200 - return false if @organization_id.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] organization_id Value to be assigned - def organization_id=(organization_id) - if organization_id.nil? - fail ArgumentError, 'organization_id cannot be nil' - end - - if organization_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "organization_id", the character length must be smaller than or equal to 200.' - end - - if organization_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "organization_id", the character length must be great than or equal to 1.' - end - - @organization_id = organization_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - organization_id == o.organization_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [organization_id].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_passkey.rb b/lib/zitadel/client/models/user_service_passkey.rb deleted file mode 100644 index 9e720f1b..00000000 --- a/lib/zitadel/client/models/user_service_passkey.rb +++ /dev/null @@ -1,300 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServicePasskey - attr_accessor :id - - attr_accessor :state - - attr_accessor :name - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'state' => :'state', - :'name' => :'name' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'state' => :'UserServiceAuthFactorState', - :'name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasskey` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasskey`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'AUTH_FACTOR_STATE_UNSPECIFIED' - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@name.nil? && @name.to_s.length > 200 - invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.') - end - - if !@name.nil? && @name.to_s.length < 1 - invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@name.nil? && @name.to_s.length > 200 - return false if !@name.nil? && @name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] name Value to be assigned - def name=(name) - if name.nil? - fail ArgumentError, 'name cannot be nil' - end - - if name.to_s.length > 200 - fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.' - end - - if name.to_s.length < 1 - fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' - end - - @name = name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - state == o.state && - name == o.name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, state, name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_passkey_authenticator.rb b/lib/zitadel/client/models/user_service_passkey_authenticator.rb deleted file mode 100644 index 3af3e336..00000000 --- a/lib/zitadel/client/models/user_service_passkey_authenticator.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServicePasskeyAuthenticator - PASSKEY_AUTHENTICATOR_UNSPECIFIED = "PASSKEY_AUTHENTICATOR_UNSPECIFIED".freeze - PASSKEY_AUTHENTICATOR_PLATFORM = "PASSKEY_AUTHENTICATOR_PLATFORM".freeze - PASSKEY_AUTHENTICATOR_CROSS_PLATFORM = "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM".freeze - - def self.all_vars - @all_vars ||= [PASSKEY_AUTHENTICATOR_UNSPECIFIED, PASSKEY_AUTHENTICATOR_PLATFORM, PASSKEY_AUTHENTICATOR_CROSS_PLATFORM].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServicePasskeyAuthenticator.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServicePasskeyAuthenticator" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_passkey_registration_code.rb b/lib/zitadel/client/models/user_service_passkey_registration_code.rb deleted file mode 100644 index 8947e2f7..00000000 --- a/lib/zitadel/client/models/user_service_passkey_registration_code.rb +++ /dev/null @@ -1,293 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServicePasskeyRegistrationCode - # \"id to the one time code generated by ZITADEL\" - attr_accessor :id - - # \"one time code generated by ZITADEL\" - attr_accessor :code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'code' => :'code' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasskeyRegistrationCode` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasskeyRegistrationCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - else - self.id = nil - end - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @id.nil? - invalid_properties.push('invalid value for "id", id cannot be nil.') - end - - if @id.to_s.length > 200 - invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 200.') - end - - if @code.nil? - invalid_properties.push('invalid value for "code", code cannot be nil.') - end - - if @code.to_s.length > 200 - invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @id.nil? - return false if @id.to_s.length > 200 - return false if @code.nil? - return false if @code.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] id Value to be assigned - def id=(id) - if id.nil? - fail ArgumentError, 'id cannot be nil' - end - - if id.to_s.length > 200 - fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 200.' - end - - @id = id - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if code.nil? - fail ArgumentError, 'code cannot be nil' - end - - if code.to_s.length > 200 - fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 200.' - end - - @code = code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - code == o.code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_password.rb b/lib/zitadel/client/models/user_service_password.rb deleted file mode 100644 index cea82b92..00000000 --- a/lib/zitadel/client/models/user_service_password.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServicePassword - attr_accessor :password - - attr_accessor :change_required - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'password' => :'password', - :'change_required' => :'changeRequired' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'password' => :'String', - :'change_required' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePassword` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'password') - self.password = attributes[:'password'] - else - self.password = nil - end - - if attributes.key?(:'change_required') - self.change_required = attributes[:'change_required'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @password.nil? - invalid_properties.push('invalid value for "password", password cannot be nil.') - end - - if @password.to_s.length > 200 - invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') - end - - if @password.to_s.length < 1 - invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @password.nil? - return false if @password.to_s.length > 200 - return false if @password.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] password Value to be assigned - def password=(password) - if password.nil? - fail ArgumentError, 'password cannot be nil' - end - - if password.to_s.length > 200 - fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' - end - - if password.to_s.length < 1 - fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' - end - - @password = password - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - password == o.password && - change_required == o.change_required - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [password, change_required].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_password_reset_request.rb b/lib/zitadel/client/models/user_service_password_reset_request.rb deleted file mode 100644 index cc87ec38..00000000 --- a/lib/zitadel/client/models/user_service_password_reset_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServicePasswordResetRequest - attr_accessor :send_link - - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'send_link' => :'sendLink', - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'send_link' => :'UserServiceSendPasswordResetLink', - :'return_code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasswordResetRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasswordResetRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'send_link') - self.send_link = attributes[:'send_link'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - send_link == o.send_link && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [send_link, return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_password_reset_response.rb b/lib/zitadel/client/models/user_service_password_reset_response.rb deleted file mode 100644 index c314793e..00000000 --- a/lib/zitadel/client/models/user_service_password_reset_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServicePasswordResetResponse - attr_accessor :details - - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasswordResetResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasswordResetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_phone_query.rb b/lib/zitadel/client/models/user_service_phone_query.rb deleted file mode 100644 index 01c9f1b4..00000000 --- a/lib/zitadel/client/models/user_service_phone_query.rb +++ /dev/null @@ -1,300 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific phone. - class UserServicePhoneQuery - # Phone number of the user - attr_accessor :number - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'number' => :'number', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'number' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePhoneQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePhoneQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'number') - self.number = attributes[:'number'] - else - self.number = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @number.nil? - invalid_properties.push('invalid value for "number", number cannot be nil.') - end - - if @number.to_s.length > 20 - invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') - end - - if @number.to_s.length < 1 - invalid_properties.push('invalid value for "number", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @number.nil? - return false if @number.to_s.length > 20 - return false if @number.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] number Value to be assigned - def number=(number) - if number.nil? - fail ArgumentError, 'number cannot be nil' - end - - if number.to_s.length > 20 - fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' - end - - if number.to_s.length < 1 - fail ArgumentError, 'invalid value for "number", the character length must be great than or equal to 1.' - end - - @number = number - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - number == o.number && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [number, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_protobuf_any.rb b/lib/zitadel/client/models/user_service_protobuf_any.rb deleted file mode 100644 index f4f105db..00000000 --- a/lib/zitadel/client/models/user_service_protobuf_any.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceProtobufAny - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'@type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceProtobufAny` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_reactivate_user_response.rb b/lib/zitadel/client/models/user_service_reactivate_user_response.rb deleted file mode 100644 index ee446655..00000000 --- a/lib/zitadel/client/models/user_service_reactivate_user_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceReactivateUserResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceReactivateUserResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceReactivateUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_redirect_u_r_ls.rb b/lib/zitadel/client/models/user_service_redirect_u_r_ls.rb deleted file mode 100644 index b735baac..00000000 --- a/lib/zitadel/client/models/user_service_redirect_u_r_ls.rb +++ /dev/null @@ -1,297 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRedirectURLs - # URL on which the user will be redirected after a successful login - attr_accessor :success_url - - # URL on which the user will be redirected after a failed login - attr_accessor :failure_url - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'success_url' => :'successUrl', - :'failure_url' => :'failureUrl' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'success_url' => :'String', - :'failure_url' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRedirectURLs` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRedirectURLs`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'success_url') - self.success_url = attributes[:'success_url'] - end - - if attributes.key?(:'failure_url') - self.failure_url = attributes[:'failure_url'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@success_url.nil? && @success_url.to_s.length > 2048 - invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 2048.') - end - - if !@success_url.nil? && @success_url.to_s.length < 1 - invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 1.') - end - - if !@failure_url.nil? && @failure_url.to_s.length > 2048 - invalid_properties.push('invalid value for "failure_url", the character length must be smaller than or equal to 2048.') - end - - if !@failure_url.nil? && @failure_url.to_s.length < 1 - invalid_properties.push('invalid value for "failure_url", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@success_url.nil? && @success_url.to_s.length > 2048 - return false if !@success_url.nil? && @success_url.to_s.length < 1 - return false if !@failure_url.nil? && @failure_url.to_s.length > 2048 - return false if !@failure_url.nil? && @failure_url.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] success_url Value to be assigned - def success_url=(success_url) - if success_url.nil? - fail ArgumentError, 'success_url cannot be nil' - end - - if success_url.to_s.length > 2048 - fail ArgumentError, 'invalid value for "success_url", the character length must be smaller than or equal to 2048.' - end - - if success_url.to_s.length < 1 - fail ArgumentError, 'invalid value for "success_url", the character length must be great than or equal to 1.' - end - - @success_url = success_url - end - - # Custom attribute writer method with validation - # @param [Object] failure_url Value to be assigned - def failure_url=(failure_url) - if failure_url.nil? - fail ArgumentError, 'failure_url cannot be nil' - end - - if failure_url.to_s.length > 2048 - fail ArgumentError, 'invalid value for "failure_url", the character length must be smaller than or equal to 2048.' - end - - if failure_url.to_s.length < 1 - fail ArgumentError, 'invalid value for "failure_url", the character length must be great than or equal to 1.' - end - - @failure_url = failure_url - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - success_url == o.success_url && - failure_url == o.failure_url - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [success_url, failure_url].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_register_passkey_request.rb b/lib/zitadel/client/models/user_service_register_passkey_request.rb deleted file mode 100644 index 9989822d..00000000 --- a/lib/zitadel/client/models/user_service_register_passkey_request.rb +++ /dev/null @@ -1,273 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRegisterPasskeyRequest - attr_accessor :code - - attr_accessor :authenticator - - # \"Domain on which the user is authenticated.\" - attr_accessor :domain - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'authenticator' => :'authenticator', - :'domain' => :'domain' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'UserServicePasskeyRegistrationCode', - :'authenticator' => :'UserServicePasskeyAuthenticator', - :'domain' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterPasskeyRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterPasskeyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'authenticator') - self.authenticator = attributes[:'authenticator'] - else - self.authenticator = 'PASSKEY_AUTHENTICATOR_UNSPECIFIED' - end - - if attributes.key?(:'domain') - self.domain = attributes[:'domain'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - authenticator == o.authenticator && - domain == o.domain - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, authenticator, domain].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_register_passkey_response.rb b/lib/zitadel/client/models/user_service_register_passkey_response.rb deleted file mode 100644 index cf29deb4..00000000 --- a/lib/zitadel/client/models/user_service_register_passkey_response.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRegisterPasskeyResponse - attr_accessor :details - - attr_accessor :passkey_id - - # 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 - attr_accessor :public_key_credential_creation_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'passkey_id' => :'passkeyId', - :'public_key_credential_creation_options' => :'publicKeyCredentialCreationOptions' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'passkey_id' => :'String', - :'public_key_credential_creation_options' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterPasskeyResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterPasskeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'passkey_id') - self.passkey_id = attributes[:'passkey_id'] - end - - if attributes.key?(:'public_key_credential_creation_options') - self.public_key_credential_creation_options = attributes[:'public_key_credential_creation_options'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - passkey_id == o.passkey_id && - public_key_credential_creation_options == o.public_key_credential_creation_options - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, passkey_id, public_key_credential_creation_options].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb b/lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb deleted file mode 100644 index 828ad8bf..00000000 --- a/lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb +++ /dev/null @@ -1,248 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRegisterTOTPResponse - attr_accessor :details - - attr_accessor :uri - - attr_accessor :secret - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'uri' => :'uri', - :'secret' => :'secret' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'uri' => :'String', - :'secret' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterTOTPResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterTOTPResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] - end - - if attributes.key?(:'secret') - self.secret = attributes[:'secret'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - uri == o.uri && - secret == o.secret - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, uri, secret].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_register_u2_f_request.rb b/lib/zitadel/client/models/user_service_register_u2_f_request.rb deleted file mode 100644 index 6f4da41f..00000000 --- a/lib/zitadel/client/models/user_service_register_u2_f_request.rb +++ /dev/null @@ -1,231 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRegisterU2FRequest - # \"Domain on which the user is authenticated.\" - attr_accessor :domain - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'domain' => :'domain' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'domain' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterU2FRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterU2FRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'domain') - self.domain = attributes[:'domain'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - domain == o.domain - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [domain].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_register_u2_f_response.rb b/lib/zitadel/client/models/user_service_register_u2_f_response.rb deleted file mode 100644 index 57637f21..00000000 --- a/lib/zitadel/client/models/user_service_register_u2_f_response.rb +++ /dev/null @@ -1,249 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRegisterU2FResponse - attr_accessor :details - - attr_accessor :u2f_id - - # 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 - attr_accessor :public_key_credential_creation_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'u2f_id' => :'u2fId', - :'public_key_credential_creation_options' => :'publicKeyCredentialCreationOptions' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'u2f_id' => :'String', - :'public_key_credential_creation_options' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterU2FResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterU2FResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'u2f_id') - self.u2f_id = attributes[:'u2f_id'] - end - - if attributes.key?(:'public_key_credential_creation_options') - self.public_key_credential_creation_options = attributes[:'public_key_credential_creation_options'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - u2f_id == o.u2f_id && - public_key_credential_creation_options == o.public_key_credential_creation_options - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, u2f_id, public_key_credential_creation_options].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb b/lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb deleted file mode 100644 index ec2a938a..00000000 --- a/lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRemoveIDPLinkResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveIDPLinkResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveIDPLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb b/lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb deleted file mode 100644 index 40a78f7f..00000000 --- a/lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRemoveOTPEmailResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveOTPEmailResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveOTPEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb b/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb deleted file mode 100644 index 06fd6379..00000000 --- a/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRemoveOTPSMSResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveOTPSMSResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveOTPSMSResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_remove_passkey_response.rb b/lib/zitadel/client/models/user_service_remove_passkey_response.rb deleted file mode 100644 index c42a24a7..00000000 --- a/lib/zitadel/client/models/user_service_remove_passkey_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRemovePasskeyResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemovePasskeyResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemovePasskeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_remove_phone_response.rb b/lib/zitadel/client/models/user_service_remove_phone_response.rb deleted file mode 100644 index d8148a7f..00000000 --- a/lib/zitadel/client/models/user_service_remove_phone_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRemovePhoneResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemovePhoneResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemovePhoneResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb b/lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb deleted file mode 100644 index f43f2869..00000000 --- a/lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRemoveTOTPResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveTOTPResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveTOTPResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_remove_u2_f_response.rb b/lib/zitadel/client/models/user_service_remove_u2_f_response.rb deleted file mode 100644 index c3323f40..00000000 --- a/lib/zitadel/client/models/user_service_remove_u2_f_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRemoveU2FResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveU2FResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveU2FResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_resend_email_code_request.rb b/lib/zitadel/client/models/user_service_resend_email_code_request.rb deleted file mode 100644 index 0a93585b..00000000 --- a/lib/zitadel/client/models/user_service_resend_email_code_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceResendEmailCodeRequest - attr_accessor :send_code - - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'send_code' => :'sendCode', - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'send_code' => :'UserServiceSendEmailVerificationCode', - :'return_code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendEmailCodeRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendEmailCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - send_code == o.send_code && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [send_code, return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_resend_email_code_response.rb b/lib/zitadel/client/models/user_service_resend_email_code_response.rb deleted file mode 100644 index 3f66585e..00000000 --- a/lib/zitadel/client/models/user_service_resend_email_code_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceResendEmailCodeResponse - attr_accessor :details - - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendEmailCodeResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendEmailCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_resend_invite_code_response.rb b/lib/zitadel/client/models/user_service_resend_invite_code_response.rb deleted file mode 100644 index c2106d48..00000000 --- a/lib/zitadel/client/models/user_service_resend_invite_code_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceResendInviteCodeResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendInviteCodeResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendInviteCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_resend_phone_code_request.rb b/lib/zitadel/client/models/user_service_resend_phone_code_request.rb deleted file mode 100644 index 4f529081..00000000 --- a/lib/zitadel/client/models/user_service_resend_phone_code_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceResendPhoneCodeRequest - attr_accessor :send_code - - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'send_code' => :'sendCode', - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'send_code' => :'Object', - :'return_code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendPhoneCodeRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendPhoneCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - send_code == o.send_code && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [send_code, return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_resend_phone_code_response.rb b/lib/zitadel/client/models/user_service_resend_phone_code_response.rb deleted file mode 100644 index 56d7eb45..00000000 --- a/lib/zitadel/client/models/user_service_resend_phone_code_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceResendPhoneCodeResponse - attr_accessor :details - - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendPhoneCodeResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendPhoneCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb deleted file mode 100644 index 7a8d45c8..00000000 --- a/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRetrieveIdentityProviderIntentRequest - # token of the idp intent, previously returned on the success response of the IDP callback - attr_accessor :idp_intent_token - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp_intent_token' => :'idpIntentToken' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp_intent_token' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp_intent_token') - self.idp_intent_token = attributes[:'idp_intent_token'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 - invalid_properties.push('invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.') - end - - if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 - invalid_properties.push('invalid value for "idp_intent_token", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 - return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] idp_intent_token Value to be assigned - def idp_intent_token=(idp_intent_token) - if idp_intent_token.nil? - fail ArgumentError, 'idp_intent_token cannot be nil' - end - - if idp_intent_token.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.' - end - - if idp_intent_token.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be great than or equal to 1.' - end - - @idp_intent_token = idp_intent_token - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp_intent_token == o.idp_intent_token - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp_intent_token].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb deleted file mode 100644 index 8827b956..00000000 --- a/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb +++ /dev/null @@ -1,258 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRetrieveIdentityProviderIntentResponse - attr_accessor :details - - attr_accessor :idp_information - - # ID of the user in ZITADEL if external user is linked - attr_accessor :user_id - - attr_accessor :add_human_user - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'idp_information' => :'idpInformation', - :'user_id' => :'userId', - :'add_human_user' => :'addHumanUser' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'idp_information' => :'UserServiceIDPInformation', - :'user_id' => :'String', - :'add_human_user' => :'UserServiceAddHumanUserRequest' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'idp_information') - self.idp_information = attributes[:'idp_information'] - end - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'add_human_user') - self.add_human_user = attributes[:'add_human_user'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - idp_information == o.idp_information && - user_id == o.user_id && - add_human_user == o.add_human_user - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, idp_information, user_id, add_human_user].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_rpc_status.rb b/lib/zitadel/client/models/user_service_rpc_status.rb deleted file mode 100644 index c518c004..00000000 --- a/lib/zitadel/client/models/user_service_rpc_status.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceRpcStatus - attr_accessor :code - - attr_accessor :message - - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message', - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Integer', - :'message' => :'String', - :'details' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRpcStatus` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'details') - if (value = attributes[:'details']).is_a?(Array) - self.details = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message, details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_search_query.rb b/lib/zitadel/client/models/user_service_search_query.rb deleted file mode 100644 index 84ec646d..00000000 --- a/lib/zitadel/client/models/user_service_search_query.rb +++ /dev/null @@ -1,365 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSearchQuery - attr_accessor :user_name_query - - attr_accessor :first_name_query - - attr_accessor :last_name_query - - attr_accessor :nick_name_query - - attr_accessor :display_name_query - - attr_accessor :email_query - - attr_accessor :state_query - - attr_accessor :type_query - - attr_accessor :login_name_query - - attr_accessor :in_user_ids_query - - attr_accessor :or_query - - attr_accessor :and_query - - attr_accessor :not_query - - attr_accessor :in_user_emails_query - - attr_accessor :organization_id_query - - attr_accessor :phone_query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_name_query' => :'userNameQuery', - :'first_name_query' => :'firstNameQuery', - :'last_name_query' => :'lastNameQuery', - :'nick_name_query' => :'nickNameQuery', - :'display_name_query' => :'displayNameQuery', - :'email_query' => :'emailQuery', - :'state_query' => :'stateQuery', - :'type_query' => :'typeQuery', - :'login_name_query' => :'loginNameQuery', - :'in_user_ids_query' => :'inUserIdsQuery', - :'or_query' => :'orQuery', - :'and_query' => :'andQuery', - :'not_query' => :'notQuery', - :'in_user_emails_query' => :'inUserEmailsQuery', - :'organization_id_query' => :'organizationIdQuery', - :'phone_query' => :'phoneQuery' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_name_query' => :'UserServiceUserNameQuery', - :'first_name_query' => :'UserServiceFirstNameQuery', - :'last_name_query' => :'UserServiceLastNameQuery', - :'nick_name_query' => :'UserServiceNickNameQuery', - :'display_name_query' => :'UserServiceDisplayNameQuery', - :'email_query' => :'UserServiceEmailQuery', - :'state_query' => :'UserServiceStateQuery', - :'type_query' => :'UserServiceTypeQuery', - :'login_name_query' => :'UserServiceLoginNameQuery', - :'in_user_ids_query' => :'UserServiceInUserIDQuery', - :'or_query' => :'UserServiceOrQuery', - :'and_query' => :'UserServiceAndQuery', - :'not_query' => :'UserServiceNotQuery', - :'in_user_emails_query' => :'UserServiceInUserEmailsQuery', - :'organization_id_query' => :'UserServiceOrganizationIdQuery', - :'phone_query' => :'UserServicePhoneQuery' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSearchQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSearchQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_name_query') - self.user_name_query = attributes[:'user_name_query'] - end - - if attributes.key?(:'first_name_query') - self.first_name_query = attributes[:'first_name_query'] - end - - if attributes.key?(:'last_name_query') - self.last_name_query = attributes[:'last_name_query'] - end - - if attributes.key?(:'nick_name_query') - self.nick_name_query = attributes[:'nick_name_query'] - end - - if attributes.key?(:'display_name_query') - self.display_name_query = attributes[:'display_name_query'] - end - - if attributes.key?(:'email_query') - self.email_query = attributes[:'email_query'] - end - - if attributes.key?(:'state_query') - self.state_query = attributes[:'state_query'] - end - - if attributes.key?(:'type_query') - self.type_query = attributes[:'type_query'] - end - - if attributes.key?(:'login_name_query') - self.login_name_query = attributes[:'login_name_query'] - end - - if attributes.key?(:'in_user_ids_query') - self.in_user_ids_query = attributes[:'in_user_ids_query'] - end - - if attributes.key?(:'or_query') - self.or_query = attributes[:'or_query'] - end - - if attributes.key?(:'and_query') - self.and_query = attributes[:'and_query'] - end - - if attributes.key?(:'not_query') - self.not_query = attributes[:'not_query'] - end - - if attributes.key?(:'in_user_emails_query') - self.in_user_emails_query = attributes[:'in_user_emails_query'] - end - - if attributes.key?(:'organization_id_query') - self.organization_id_query = attributes[:'organization_id_query'] - end - - if attributes.key?(:'phone_query') - self.phone_query = attributes[:'phone_query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_name_query == o.user_name_query && - first_name_query == o.first_name_query && - last_name_query == o.last_name_query && - nick_name_query == o.nick_name_query && - display_name_query == o.display_name_query && - email_query == o.email_query && - state_query == o.state_query && - type_query == o.type_query && - login_name_query == o.login_name_query && - in_user_ids_query == o.in_user_ids_query && - or_query == o.or_query && - and_query == o.and_query && - not_query == o.not_query && - in_user_emails_query == o.in_user_emails_query && - organization_id_query == o.organization_id_query && - phone_query == o.phone_query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_name_query, first_name_query, last_name_query, nick_name_query, display_name_query, email_query, state_query, type_query, login_name_query, in_user_ids_query, or_query, and_query, not_query, in_user_emails_query, organization_id_query, phone_query].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_send_email_code_request.rb b/lib/zitadel/client/models/user_service_send_email_code_request.rb deleted file mode 100644 index 5d24f6ad..00000000 --- a/lib/zitadel/client/models/user_service_send_email_code_request.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSendEmailCodeRequest - attr_accessor :send_code - - attr_accessor :return_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'send_code' => :'sendCode', - :'return_code' => :'returnCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'send_code' => :'UserServiceSendEmailVerificationCode', - :'return_code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendEmailCodeRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendEmailCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - send_code == o.send_code && - return_code == o.return_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [send_code, return_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_send_email_code_response.rb b/lib/zitadel/client/models/user_service_send_email_code_response.rb deleted file mode 100644 index 7f6f3cec..00000000 --- a/lib/zitadel/client/models/user_service_send_email_code_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSendEmailCodeResponse - attr_accessor :details - - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendEmailCodeResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendEmailCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_send_email_verification_code.rb b/lib/zitadel/client/models/user_service_send_email_verification_code.rb deleted file mode 100644 index 320d5d09..00000000 --- a/lib/zitadel/client/models/user_service_send_email_verification_code.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSendEmailVerificationCode - # 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 - attr_accessor :url_template - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'url_template' => :'urlTemplate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'url_template' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendEmailVerificationCode` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendEmailVerificationCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'url_template') - self.url_template = attributes[:'url_template'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@url_template.nil? && @url_template.to_s.length > 200 - invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') - end - - if !@url_template.nil? && @url_template.to_s.length < 1 - invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@url_template.nil? && @url_template.to_s.length > 200 - return false if !@url_template.nil? && @url_template.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] url_template Value to be assigned - def url_template=(url_template) - if url_template.nil? - fail ArgumentError, 'url_template cannot be nil' - end - - if url_template.to_s.length > 200 - fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' - end - - if url_template.to_s.length < 1 - fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' - end - - @url_template = url_template - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - url_template == o.url_template - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [url_template].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_send_invite_code.rb b/lib/zitadel/client/models/user_service_send_invite_code.rb deleted file mode 100644 index 2c785487..00000000 --- a/lib/zitadel/client/models/user_service_send_invite_code.rb +++ /dev/null @@ -1,297 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSendInviteCode - # 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 - attr_accessor :url_template - - # 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. - attr_accessor :application_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'url_template' => :'urlTemplate', - :'application_name' => :'applicationName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'url_template' => :'String', - :'application_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendInviteCode` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendInviteCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'url_template') - self.url_template = attributes[:'url_template'] - end - - if attributes.key?(:'application_name') - self.application_name = attributes[:'application_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@url_template.nil? && @url_template.to_s.length > 200 - invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') - end - - if !@url_template.nil? && @url_template.to_s.length < 1 - invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') - end - - if !@application_name.nil? && @application_name.to_s.length > 200 - invalid_properties.push('invalid value for "application_name", the character length must be smaller than or equal to 200.') - end - - if !@application_name.nil? && @application_name.to_s.length < 1 - invalid_properties.push('invalid value for "application_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@url_template.nil? && @url_template.to_s.length > 200 - return false if !@url_template.nil? && @url_template.to_s.length < 1 - return false if !@application_name.nil? && @application_name.to_s.length > 200 - return false if !@application_name.nil? && @application_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] url_template Value to be assigned - def url_template=(url_template) - if url_template.nil? - fail ArgumentError, 'url_template cannot be nil' - end - - if url_template.to_s.length > 200 - fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' - end - - if url_template.to_s.length < 1 - fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' - end - - @url_template = url_template - end - - # Custom attribute writer method with validation - # @param [Object] application_name Value to be assigned - def application_name=(application_name) - if application_name.nil? - fail ArgumentError, 'application_name cannot be nil' - end - - if application_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "application_name", the character length must be smaller than or equal to 200.' - end - - if application_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "application_name", the character length must be great than or equal to 1.' - end - - @application_name = application_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - url_template == o.url_template && - application_name == o.application_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [url_template, application_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_send_passkey_registration_link.rb b/lib/zitadel/client/models/user_service_send_passkey_registration_link.rb deleted file mode 100644 index 1e330b68..00000000 --- a/lib/zitadel/client/models/user_service_send_passkey_registration_link.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSendPasskeyRegistrationLink - # 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 - attr_accessor :url_template - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'url_template' => :'urlTemplate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'url_template' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendPasskeyRegistrationLink` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendPasskeyRegistrationLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'url_template') - self.url_template = attributes[:'url_template'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@url_template.nil? && @url_template.to_s.length > 200 - invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') - end - - if !@url_template.nil? && @url_template.to_s.length < 1 - invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@url_template.nil? && @url_template.to_s.length > 200 - return false if !@url_template.nil? && @url_template.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] url_template Value to be assigned - def url_template=(url_template) - if url_template.nil? - fail ArgumentError, 'url_template cannot be nil' - end - - if url_template.to_s.length > 200 - fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' - end - - if url_template.to_s.length < 1 - fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' - end - - @url_template = url_template - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - url_template == o.url_template - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [url_template].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_send_password_reset_link.rb b/lib/zitadel/client/models/user_service_send_password_reset_link.rb deleted file mode 100644 index b8a50d97..00000000 --- a/lib/zitadel/client/models/user_service_send_password_reset_link.rb +++ /dev/null @@ -1,292 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSendPasswordResetLink - attr_accessor :notification_type - - # 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 - attr_accessor :url_template - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'notification_type' => :'notificationType', - :'url_template' => :'urlTemplate' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'notification_type' => :'UserServiceNotificationType', - :'url_template' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendPasswordResetLink` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendPasswordResetLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'notification_type') - self.notification_type = attributes[:'notification_type'] - else - self.notification_type = 'NOTIFICATION_TYPE_Unspecified' - end - - if attributes.key?(:'url_template') - self.url_template = attributes[:'url_template'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@url_template.nil? && @url_template.to_s.length > 200 - invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') - end - - if !@url_template.nil? && @url_template.to_s.length < 1 - invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@url_template.nil? && @url_template.to_s.length > 200 - return false if !@url_template.nil? && @url_template.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] url_template Value to be assigned - def url_template=(url_template) - if url_template.nil? - fail ArgumentError, 'url_template cannot be nil' - end - - if url_template.to_s.length > 200 - fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' - end - - if url_template.to_s.length < 1 - fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' - end - - @url_template = url_template - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - notification_type == o.notification_type && - url_template == o.url_template - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [notification_type, url_template].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_email_request.rb b/lib/zitadel/client/models/user_service_set_email_request.rb deleted file mode 100644 index df755e8d..00000000 --- a/lib/zitadel/client/models/user_service_set_email_request.rb +++ /dev/null @@ -1,292 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetEmailRequest - attr_accessor :email - - attr_accessor :send_code - - attr_accessor :return_code - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'email' => :'email', - :'send_code' => :'sendCode', - :'return_code' => :'returnCode', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'email' => :'String', - :'send_code' => :'UserServiceSendEmailVerificationCode', - :'return_code' => :'Object', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetEmailRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'email') - self.email = attributes[:'email'] - else - self.email = nil - end - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @email.nil? - invalid_properties.push('invalid value for "email", email cannot be nil.') - end - - if @email.to_s.length > 200 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') - end - - if @email.to_s.length < 1 - invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @email.nil? - return false if @email.to_s.length > 200 - return false if @email.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if email.nil? - fail ArgumentError, 'email cannot be nil' - end - - if email.to_s.length > 200 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' - end - - if email.to_s.length < 1 - fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' - end - - @email = email - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email == o.email && - send_code == o.send_code && - return_code == o.return_code && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [email, send_code, return_code, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_email_response.rb b/lib/zitadel/client/models/user_service_set_email_response.rb deleted file mode 100644 index 124d0afe..00000000 --- a/lib/zitadel/client/models/user_service_set_email_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetEmailResponse - attr_accessor :details - - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetEmailResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_human_email.rb b/lib/zitadel/client/models/user_service_set_human_email.rb deleted file mode 100644 index 52a15ac5..00000000 --- a/lib/zitadel/client/models/user_service_set_human_email.rb +++ /dev/null @@ -1,292 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetHumanEmail - attr_accessor :email - - attr_accessor :send_code - - attr_accessor :return_code - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'email' => :'email', - :'send_code' => :'sendCode', - :'return_code' => :'returnCode', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'email' => :'String', - :'send_code' => :'UserServiceSendEmailVerificationCode', - :'return_code' => :'Object', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetHumanEmail` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetHumanEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'email') - self.email = attributes[:'email'] - else - self.email = nil - end - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @email.nil? - invalid_properties.push('invalid value for "email", email cannot be nil.') - end - - if @email.to_s.length > 200 - invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') - end - - if @email.to_s.length < 1 - invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @email.nil? - return false if @email.to_s.length > 200 - return false if @email.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] email Value to be assigned - def email=(email) - if email.nil? - fail ArgumentError, 'email cannot be nil' - end - - if email.to_s.length > 200 - fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' - end - - if email.to_s.length < 1 - fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' - end - - @email = email - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email == o.email && - send_code == o.send_code && - return_code == o.return_code && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [email, send_code, return_code, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_human_phone.rb b/lib/zitadel/client/models/user_service_set_human_phone.rb deleted file mode 100644 index 31662441..00000000 --- a/lib/zitadel/client/models/user_service_set_human_phone.rb +++ /dev/null @@ -1,276 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetHumanPhone - attr_accessor :phone - - attr_accessor :send_code - - attr_accessor :return_code - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'phone' => :'phone', - :'send_code' => :'sendCode', - :'return_code' => :'returnCode', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'phone' => :'String', - :'send_code' => :'Object', - :'return_code' => :'Object', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetHumanPhone` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetHumanPhone`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - end - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@phone.nil? && @phone.to_s.length > 200 - invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@phone.nil? && @phone.to_s.length > 200 - true - end - - # Custom attribute writer method with validation - # @param [Object] phone Value to be assigned - def phone=(phone) - if phone.nil? - fail ArgumentError, 'phone cannot be nil' - end - - if phone.to_s.length > 200 - fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' - end - - @phone = phone - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - phone == o.phone && - send_code == o.send_code && - return_code == o.return_code && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [phone, send_code, return_code, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_human_profile.rb b/lib/zitadel/client/models/user_service_set_human_profile.rb deleted file mode 100644 index 9f023728..00000000 --- a/lib/zitadel/client/models/user_service_set_human_profile.rb +++ /dev/null @@ -1,426 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetHumanProfile - attr_accessor :given_name - - attr_accessor :family_name - - attr_accessor :nick_name - - attr_accessor :display_name - - attr_accessor :preferred_language - - attr_accessor :gender - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'given_name' => :'givenName', - :'family_name' => :'familyName', - :'nick_name' => :'nickName', - :'display_name' => :'displayName', - :'preferred_language' => :'preferredLanguage', - :'gender' => :'gender' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'given_name' => :'String', - :'family_name' => :'String', - :'nick_name' => :'String', - :'display_name' => :'String', - :'preferred_language' => :'String', - :'gender' => :'UserServiceGender' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetHumanProfile` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetHumanProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'given_name') - self.given_name = attributes[:'given_name'] - else - self.given_name = nil - end - - if attributes.key?(:'family_name') - self.family_name = attributes[:'family_name'] - else - self.family_name = nil - end - - if attributes.key?(:'nick_name') - self.nick_name = attributes[:'nick_name'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'preferred_language') - self.preferred_language = attributes[:'preferred_language'] - end - - if attributes.key?(:'gender') - self.gender = attributes[:'gender'] - else - self.gender = 'GENDER_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @given_name.nil? - invalid_properties.push('invalid value for "given_name", given_name cannot be nil.') - end - - if @given_name.to_s.length > 200 - invalid_properties.push('invalid value for "given_name", the character length must be smaller than or equal to 200.') - end - - if @given_name.to_s.length < 1 - invalid_properties.push('invalid value for "given_name", the character length must be great than or equal to 1.') - end - - if @family_name.nil? - invalid_properties.push('invalid value for "family_name", family_name cannot be nil.') - end - - if @family_name.to_s.length > 200 - invalid_properties.push('invalid value for "family_name", the character length must be smaller than or equal to 200.') - end - - if @family_name.to_s.length < 1 - invalid_properties.push('invalid value for "family_name", the character length must be great than or equal to 1.') - end - - if !@nick_name.nil? && @nick_name.to_s.length > 200 - invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') - end - - if !@display_name.nil? && @display_name.to_s.length > 200 - invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') - end - - if !@preferred_language.nil? && @preferred_language.to_s.length > 10 - invalid_properties.push('invalid value for "preferred_language", the character length must be smaller than or equal to 10.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @given_name.nil? - return false if @given_name.to_s.length > 200 - return false if @given_name.to_s.length < 1 - return false if @family_name.nil? - return false if @family_name.to_s.length > 200 - return false if @family_name.to_s.length < 1 - return false if !@nick_name.nil? && @nick_name.to_s.length > 200 - return false if !@display_name.nil? && @display_name.to_s.length > 200 - return false if !@preferred_language.nil? && @preferred_language.to_s.length > 10 - true - end - - # Custom attribute writer method with validation - # @param [Object] given_name Value to be assigned - def given_name=(given_name) - if given_name.nil? - fail ArgumentError, 'given_name cannot be nil' - end - - if given_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "given_name", the character length must be smaller than or equal to 200.' - end - - if given_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "given_name", the character length must be great than or equal to 1.' - end - - @given_name = given_name - end - - # Custom attribute writer method with validation - # @param [Object] family_name Value to be assigned - def family_name=(family_name) - if family_name.nil? - fail ArgumentError, 'family_name cannot be nil' - end - - if family_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "family_name", the character length must be smaller than or equal to 200.' - end - - if family_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "family_name", the character length must be great than or equal to 1.' - end - - @family_name = family_name - end - - # Custom attribute writer method with validation - # @param [Object] nick_name Value to be assigned - def nick_name=(nick_name) - if nick_name.nil? - fail ArgumentError, 'nick_name cannot be nil' - end - - if nick_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' - end - - @nick_name = nick_name - end - - # Custom attribute writer method with validation - # @param [Object] display_name Value to be assigned - def display_name=(display_name) - if display_name.nil? - fail ArgumentError, 'display_name cannot be nil' - end - - if display_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' - end - - @display_name = display_name - end - - # Custom attribute writer method with validation - # @param [Object] preferred_language Value to be assigned - def preferred_language=(preferred_language) - if preferred_language.nil? - fail ArgumentError, 'preferred_language cannot be nil' - end - - if preferred_language.to_s.length > 10 - fail ArgumentError, 'invalid value for "preferred_language", the character length must be smaller than or equal to 10.' - end - - @preferred_language = preferred_language - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - given_name == o.given_name && - family_name == o.family_name && - nick_name == o.nick_name && - display_name == o.display_name && - preferred_language == o.preferred_language && - gender == o.gender - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [given_name, family_name, nick_name, display_name, preferred_language, gender].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_metadata_entry.rb b/lib/zitadel/client/models/user_service_set_metadata_entry.rb deleted file mode 100644 index a2be6e20..00000000 --- a/lib/zitadel/client/models/user_service_set_metadata_entry.rb +++ /dev/null @@ -1,310 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetMetadataEntry - attr_accessor :key - - # The value has to be base64 encoded. - attr_accessor :value - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'key' => :'key', - :'value' => :'value' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'key' => :'String', - :'value' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetMetadataEntry` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetMetadataEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'key') - self.key = attributes[:'key'] - else - self.key = nil - end - - if attributes.key?(:'value') - self.value = attributes[:'value'] - else - self.value = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @key.nil? - invalid_properties.push('invalid value for "key", key cannot be nil.') - end - - if @key.to_s.length > 200 - invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 200.') - end - - if @key.to_s.length < 1 - invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.') - end - - if @value.nil? - invalid_properties.push('invalid value for "value", value cannot be nil.') - end - - if @value.to_s.length > 500000 - invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 500000.') - end - - if @value.to_s.length < 1 - invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @key.nil? - return false if @key.to_s.length > 200 - return false if @key.to_s.length < 1 - return false if @value.nil? - return false if @value.to_s.length > 500000 - return false if @value.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] key Value to be assigned - def key=(key) - if key.nil? - fail ArgumentError, 'key cannot be nil' - end - - if key.to_s.length > 200 - fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 200.' - end - - if key.to_s.length < 1 - fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.' - end - - @key = key - end - - # Custom attribute writer method with validation - # @param [Object] value Value to be assigned - def value=(value) - if value.nil? - fail ArgumentError, 'value cannot be nil' - end - - if value.to_s.length > 500000 - fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 500000.' - end - - if value.to_s.length < 1 - fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.' - end - - @value = value - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - key == o.key && - value == o.value - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [key, value].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_password.rb b/lib/zitadel/client/models/user_service_set_password.rb deleted file mode 100644 index 80b40dfb..00000000 --- a/lib/zitadel/client/models/user_service_set_password.rb +++ /dev/null @@ -1,328 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetPassword - attr_accessor :password - - attr_accessor :hashed_password - - attr_accessor :current_password - - # \"the verification code generated during password reset request\" - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'password' => :'password', - :'hashed_password' => :'hashedPassword', - :'current_password' => :'currentPassword', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'password' => :'UserServicePassword', - :'hashed_password' => :'UserServiceHashedPassword', - :'current_password' => :'String', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPassword` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - - if attributes.key?(:'hashed_password') - self.hashed_password = attributes[:'hashed_password'] - end - - if attributes.key?(:'current_password') - self.current_password = attributes[:'current_password'] - else - self.current_password = nil - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - else - self.verification_code = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @current_password.nil? - invalid_properties.push('invalid value for "current_password", current_password cannot be nil.') - end - - if @current_password.to_s.length > 200 - invalid_properties.push('invalid value for "current_password", the character length must be smaller than or equal to 200.') - end - - if @current_password.to_s.length < 1 - invalid_properties.push('invalid value for "current_password", the character length must be great than or equal to 1.') - end - - if @verification_code.nil? - invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') - end - - if @verification_code.to_s.length > 20 - invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') - end - - if @verification_code.to_s.length < 1 - invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @current_password.nil? - return false if @current_password.to_s.length > 200 - return false if @current_password.to_s.length < 1 - return false if @verification_code.nil? - return false if @verification_code.to_s.length > 20 - return false if @verification_code.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] current_password Value to be assigned - def current_password=(current_password) - if current_password.nil? - fail ArgumentError, 'current_password cannot be nil' - end - - if current_password.to_s.length > 200 - fail ArgumentError, 'invalid value for "current_password", the character length must be smaller than or equal to 200.' - end - - if current_password.to_s.length < 1 - fail ArgumentError, 'invalid value for "current_password", the character length must be great than or equal to 1.' - end - - @current_password = current_password - end - - # Custom attribute writer method with validation - # @param [Object] verification_code Value to be assigned - def verification_code=(verification_code) - if verification_code.nil? - fail ArgumentError, 'verification_code cannot be nil' - end - - if verification_code.to_s.length > 20 - fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' - end - - if verification_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' - end - - @verification_code = verification_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - password == o.password && - hashed_password == o.hashed_password && - current_password == o.current_password && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [password, hashed_password, current_password, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_password_request.rb b/lib/zitadel/client/models/user_service_set_password_request.rb deleted file mode 100644 index 5311477f..00000000 --- a/lib/zitadel/client/models/user_service_set_password_request.rb +++ /dev/null @@ -1,319 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetPasswordRequest - attr_accessor :new_password - - attr_accessor :current_password - - # \"the verification code generated during password reset request\" - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'new_password' => :'newPassword', - :'current_password' => :'currentPassword', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'new_password' => :'UserServicePassword', - :'current_password' => :'String', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPasswordRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPasswordRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'new_password') - self.new_password = attributes[:'new_password'] - end - - if attributes.key?(:'current_password') - self.current_password = attributes[:'current_password'] - else - self.current_password = nil - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - else - self.verification_code = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @current_password.nil? - invalid_properties.push('invalid value for "current_password", current_password cannot be nil.') - end - - if @current_password.to_s.length > 200 - invalid_properties.push('invalid value for "current_password", the character length must be smaller than or equal to 200.') - end - - if @current_password.to_s.length < 1 - invalid_properties.push('invalid value for "current_password", the character length must be great than or equal to 1.') - end - - if @verification_code.nil? - invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') - end - - if @verification_code.to_s.length > 20 - invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') - end - - if @verification_code.to_s.length < 1 - invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @current_password.nil? - return false if @current_password.to_s.length > 200 - return false if @current_password.to_s.length < 1 - return false if @verification_code.nil? - return false if @verification_code.to_s.length > 20 - return false if @verification_code.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] current_password Value to be assigned - def current_password=(current_password) - if current_password.nil? - fail ArgumentError, 'current_password cannot be nil' - end - - if current_password.to_s.length > 200 - fail ArgumentError, 'invalid value for "current_password", the character length must be smaller than or equal to 200.' - end - - if current_password.to_s.length < 1 - fail ArgumentError, 'invalid value for "current_password", the character length must be great than or equal to 1.' - end - - @current_password = current_password - end - - # Custom attribute writer method with validation - # @param [Object] verification_code Value to be assigned - def verification_code=(verification_code) - if verification_code.nil? - fail ArgumentError, 'verification_code cannot be nil' - end - - if verification_code.to_s.length > 20 - fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' - end - - if verification_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' - end - - @verification_code = verification_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - new_password == o.new_password && - current_password == o.current_password && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [new_password, current_password, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_password_response.rb b/lib/zitadel/client/models/user_service_set_password_response.rb deleted file mode 100644 index 75f9114d..00000000 --- a/lib/zitadel/client/models/user_service_set_password_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetPasswordResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPasswordResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPasswordResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_phone_request.rb b/lib/zitadel/client/models/user_service_set_phone_request.rb deleted file mode 100644 index 321ea1f4..00000000 --- a/lib/zitadel/client/models/user_service_set_phone_request.rb +++ /dev/null @@ -1,292 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetPhoneRequest - attr_accessor :phone - - attr_accessor :send_code - - attr_accessor :return_code - - attr_accessor :is_verified - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'phone' => :'phone', - :'send_code' => :'sendCode', - :'return_code' => :'returnCode', - :'is_verified' => :'isVerified' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'phone' => :'String', - :'send_code' => :'Object', - :'return_code' => :'Object', - :'is_verified' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPhoneRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPhoneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - else - self.phone = nil - end - - if attributes.key?(:'send_code') - self.send_code = attributes[:'send_code'] - end - - if attributes.key?(:'return_code') - self.return_code = attributes[:'return_code'] - end - - if attributes.key?(:'is_verified') - self.is_verified = attributes[:'is_verified'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @phone.nil? - invalid_properties.push('invalid value for "phone", phone cannot be nil.') - end - - if @phone.to_s.length > 200 - invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') - end - - if @phone.to_s.length < 1 - invalid_properties.push('invalid value for "phone", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @phone.nil? - return false if @phone.to_s.length > 200 - return false if @phone.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] phone Value to be assigned - def phone=(phone) - if phone.nil? - fail ArgumentError, 'phone cannot be nil' - end - - if phone.to_s.length > 200 - fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' - end - - if phone.to_s.length < 1 - fail ArgumentError, 'invalid value for "phone", the character length must be great than or equal to 1.' - end - - @phone = phone - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - phone == o.phone && - send_code == o.send_code && - return_code == o.return_code && - is_verified == o.is_verified - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [phone, send_code, return_code, is_verified].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_set_phone_response.rb b/lib/zitadel/client/models/user_service_set_phone_response.rb deleted file mode 100644 index 7538b765..00000000 --- a/lib/zitadel/client/models/user_service_set_phone_response.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceSetPhoneResponse - attr_accessor :details - - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPhoneResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPhoneResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb b/lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb deleted file mode 100644 index e1a29887..00000000 --- a/lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb +++ /dev/null @@ -1,277 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceStartIdentityProviderIntentRequest - # ID for existing identity provider - attr_accessor :idp_id - - attr_accessor :urls - - attr_accessor :ldap - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'idp_id' => :'idpId', - :'urls' => :'urls', - :'ldap' => :'ldap' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'idp_id' => :'String', - :'urls' => :'UserServiceRedirectURLs', - :'ldap' => :'UserServiceLDAPCredentials' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'idp_id') - self.idp_id = attributes[:'idp_id'] - end - - if attributes.key?(:'urls') - self.urls = attributes[:'urls'] - end - - if attributes.key?(:'ldap') - self.ldap = attributes[:'ldap'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@idp_id.nil? && @idp_id.to_s.length > 200 - invalid_properties.push('invalid value for "idp_id", the character length must be smaller than or equal to 200.') - end - - if !@idp_id.nil? && @idp_id.to_s.length < 1 - invalid_properties.push('invalid value for "idp_id", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@idp_id.nil? && @idp_id.to_s.length > 200 - return false if !@idp_id.nil? && @idp_id.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] idp_id Value to be assigned - def idp_id=(idp_id) - if idp_id.nil? - fail ArgumentError, 'idp_id cannot be nil' - end - - if idp_id.to_s.length > 200 - fail ArgumentError, 'invalid value for "idp_id", the character length must be smaller than or equal to 200.' - end - - if idp_id.to_s.length < 1 - fail ArgumentError, 'invalid value for "idp_id", the character length must be great than or equal to 1.' - end - - @idp_id = idp_id - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - idp_id == o.idp_id && - urls == o.urls && - ldap == o.ldap - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [idp_id, urls, ldap].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb b/lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb deleted file mode 100644 index 85f784b7..00000000 --- a/lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceStartIdentityProviderIntentResponse - attr_accessor :details - - # URL to which the client should redirect - attr_accessor :auth_url - - attr_accessor :idp_intent - - # POST call information - attr_accessor :post_form - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'auth_url' => :'authUrl', - :'idp_intent' => :'idpIntent', - :'post_form' => :'postForm' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'auth_url' => :'String', - :'idp_intent' => :'UserServiceIDPIntent', - :'post_form' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'auth_url') - self.auth_url = attributes[:'auth_url'] - end - - if attributes.key?(:'idp_intent') - self.idp_intent = attributes[:'idp_intent'] - end - - if attributes.key?(:'post_form') - self.post_form = attributes[:'post_form'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - auth_url == o.auth_url && - idp_intent == o.idp_intent && - post_form == o.post_form - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, auth_url, idp_intent, post_form].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_state_query.rb b/lib/zitadel/client/models/user_service_state_query.rb deleted file mode 100644 index e81039e0..00000000 --- a/lib/zitadel/client/models/user_service_state_query.rb +++ /dev/null @@ -1,270 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific state. - class UserServiceStateQuery - attr_accessor :state - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'state' => :'state' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'state' => :'UserServiceUserState' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceStateQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceStateQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'USER_STATE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @state.nil? - invalid_properties.push('invalid value for "state", state cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @state.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] state Value to be assigned - def state=(state) - if state.nil? - fail ArgumentError, 'state cannot be nil' - end - - @state = state - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - state == o.state - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [state].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_text_query_method.rb b/lib/zitadel/client/models/user_service_text_query_method.rb deleted file mode 100644 index 52a96305..00000000 --- a/lib/zitadel/client/models/user_service_text_query_method.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceTextQueryMethod - TEXT_QUERY_METHOD_EQUALS = "TEXT_QUERY_METHOD_EQUALS".freeze - TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE".freeze - TEXT_QUERY_METHOD_STARTS_WITH = "TEXT_QUERY_METHOD_STARTS_WITH".freeze - TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE".freeze - TEXT_QUERY_METHOD_CONTAINS = "TEXT_QUERY_METHOD_CONTAINS".freeze - TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE".freeze - TEXT_QUERY_METHOD_ENDS_WITH = "TEXT_QUERY_METHOD_ENDS_WITH".freeze - TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE".freeze - - def self.all_vars - @all_vars ||= [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceTextQueryMethod.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceTextQueryMethod" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_type.rb b/lib/zitadel/client/models/user_service_type.rb deleted file mode 100644 index 3810ec4b..00000000 --- a/lib/zitadel/client/models/user_service_type.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceType - TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED".freeze - TYPE_HUMAN = "TYPE_HUMAN".freeze - TYPE_MACHINE = "TYPE_MACHINE".freeze - - def self.all_vars - @all_vars ||= [TYPE_UNSPECIFIED, TYPE_HUMAN, TYPE_MACHINE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceType.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceType" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_type_query.rb b/lib/zitadel/client/models/user_service_type_query.rb deleted file mode 100644 index ba61c5b3..00000000 --- a/lib/zitadel/client/models/user_service_type_query.rb +++ /dev/null @@ -1,270 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific type. - class UserServiceTypeQuery - attr_accessor :type - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'type' => :'type' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'type' => :'UserServiceType' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceTypeQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceTypeQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'type') - self.type = attributes[:'type'] - else - self.type = 'TYPE_UNSPECIFIED' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @type.nil? - invalid_properties.push('invalid value for "type", type cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] type Value to be assigned - def type=(type) - if type.nil? - fail ArgumentError, 'type cannot be nil' - end - - @type = type - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [type].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_unlock_user_response.rb b/lib/zitadel/client/models/user_service_unlock_user_response.rb deleted file mode 100644 index 02b59081..00000000 --- a/lib/zitadel/client/models/user_service_unlock_user_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceUnlockUserResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUnlockUserResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUnlockUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_update_human_user_request.rb b/lib/zitadel/client/models/user_service_update_human_user_request.rb deleted file mode 100644 index 11618e09..00000000 --- a/lib/zitadel/client/models/user_service_update_human_user_request.rb +++ /dev/null @@ -1,294 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceUpdateHumanUserRequest - attr_accessor :username - - attr_accessor :profile - - attr_accessor :email - - attr_accessor :phone - - attr_accessor :password - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'username' => :'username', - :'profile' => :'profile', - :'email' => :'email', - :'phone' => :'phone', - :'password' => :'password' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'username' => :'String', - :'profile' => :'UserServiceSetHumanProfile', - :'email' => :'UserServiceSetHumanEmail', - :'phone' => :'UserServiceSetHumanPhone', - :'password' => :'UserServiceSetPassword' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUpdateHumanUserRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUpdateHumanUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'username') - self.username = attributes[:'username'] - end - - if attributes.key?(:'profile') - self.profile = attributes[:'profile'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] - end - - if attributes.key?(:'password') - self.password = attributes[:'password'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if !@username.nil? && @username.to_s.length > 200 - invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') - end - - if !@username.nil? && @username.to_s.length < 1 - invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if !@username.nil? && @username.to_s.length > 200 - return false if !@username.nil? && @username.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] username Value to be assigned - def username=(username) - if username.nil? - fail ArgumentError, 'username cannot be nil' - end - - if username.to_s.length > 200 - fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' - end - - if username.to_s.length < 1 - fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' - end - - @username = username - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - username == o.username && - profile == o.profile && - email == o.email && - phone == o.phone && - password == o.password - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [username, profile, email, phone, password].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_update_human_user_response.rb b/lib/zitadel/client/models/user_service_update_human_user_response.rb deleted file mode 100644 index f026d4bf..00000000 --- a/lib/zitadel/client/models/user_service_update_human_user_response.rb +++ /dev/null @@ -1,248 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceUpdateHumanUserResponse - attr_accessor :details - - attr_accessor :email_code - - attr_accessor :phone_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details', - :'email_code' => :'emailCode', - :'phone_code' => :'phoneCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails', - :'email_code' => :'String', - :'phone_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUpdateHumanUserResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUpdateHumanUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'email_code') - self.email_code = attributes[:'email_code'] - end - - if attributes.key?(:'phone_code') - self.phone_code = attributes[:'phone_code'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details && - email_code == o.email_code && - phone_code == o.phone_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details, email_code, phone_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_user.rb b/lib/zitadel/client/models/user_service_user.rb deleted file mode 100644 index c03797de..00000000 --- a/lib/zitadel/client/models/user_service_user.rb +++ /dev/null @@ -1,297 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceUser - attr_accessor :user_id - - attr_accessor :details - - attr_accessor :state - - attr_accessor :username - - attr_accessor :login_names - - attr_accessor :preferred_login_name - - attr_accessor :human - - attr_accessor :machine - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_id' => :'userId', - :'details' => :'details', - :'state' => :'state', - :'username' => :'username', - :'login_names' => :'loginNames', - :'preferred_login_name' => :'preferredLoginName', - :'human' => :'human', - :'machine' => :'machine' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_id' => :'String', - :'details' => :'UserServiceDetails', - :'state' => :'UserServiceUserState', - :'username' => :'String', - :'login_names' => :'Array', - :'preferred_login_name' => :'String', - :'human' => :'UserServiceHumanUser', - :'machine' => :'UserServiceMachineUser' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUser` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_id') - self.user_id = attributes[:'user_id'] - end - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'USER_STATE_UNSPECIFIED' - end - - if attributes.key?(:'username') - self.username = attributes[:'username'] - end - - if attributes.key?(:'login_names') - if (value = attributes[:'login_names']).is_a?(Array) - self.login_names = value - end - end - - if attributes.key?(:'preferred_login_name') - self.preferred_login_name = attributes[:'preferred_login_name'] - end - - if attributes.key?(:'human') - self.human = attributes[:'human'] - end - - if attributes.key?(:'machine') - self.machine = attributes[:'machine'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_id == o.user_id && - details == o.details && - state == o.state && - username == o.username && - login_names == o.login_names && - preferred_login_name == o.preferred_login_name && - human == o.human && - machine == o.machine - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_id, details, state, username, login_names, preferred_login_name, human, machine].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_user_field_name.rb b/lib/zitadel/client/models/user_service_user_field_name.rb deleted file mode 100644 index fd907e9e..00000000 --- a/lib/zitadel/client/models/user_service_user_field_name.rb +++ /dev/null @@ -1,49 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceUserFieldName - USER_FIELD_NAME_UNSPECIFIED = "USER_FIELD_NAME_UNSPECIFIED".freeze - USER_FIELD_NAME_USER_NAME = "USER_FIELD_NAME_USER_NAME".freeze - USER_FIELD_NAME_FIRST_NAME = "USER_FIELD_NAME_FIRST_NAME".freeze - USER_FIELD_NAME_LAST_NAME = "USER_FIELD_NAME_LAST_NAME".freeze - USER_FIELD_NAME_NICK_NAME = "USER_FIELD_NAME_NICK_NAME".freeze - USER_FIELD_NAME_DISPLAY_NAME = "USER_FIELD_NAME_DISPLAY_NAME".freeze - USER_FIELD_NAME_EMAIL = "USER_FIELD_NAME_EMAIL".freeze - USER_FIELD_NAME_STATE = "USER_FIELD_NAME_STATE".freeze - USER_FIELD_NAME_TYPE = "USER_FIELD_NAME_TYPE".freeze - USER_FIELD_NAME_CREATION_DATE = "USER_FIELD_NAME_CREATION_DATE".freeze - - def self.all_vars - @all_vars ||= [USER_FIELD_NAME_UNSPECIFIED, USER_FIELD_NAME_USER_NAME, USER_FIELD_NAME_FIRST_NAME, USER_FIELD_NAME_LAST_NAME, USER_FIELD_NAME_NICK_NAME, USER_FIELD_NAME_DISPLAY_NAME, USER_FIELD_NAME_EMAIL, USER_FIELD_NAME_STATE, USER_FIELD_NAME_TYPE, USER_FIELD_NAME_CREATION_DATE].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceUserFieldName.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceUserFieldName" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_user_name_query.rb b/lib/zitadel/client/models/user_service_user_name_query.rb deleted file mode 100644 index 3e83519a..00000000 --- a/lib/zitadel/client/models/user_service_user_name_query.rb +++ /dev/null @@ -1,299 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - # Query for users with a specific user name. - class UserServiceUserNameQuery - attr_accessor :user_name - - attr_accessor :method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_name' => :'userName', - :'method' => :'method' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_name' => :'String', - :'method' => :'UserServiceTextQueryMethod' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUserNameQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUserNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_name') - self.user_name = attributes[:'user_name'] - else - self.user_name = nil - end - - if attributes.key?(:'method') - self.method = attributes[:'method'] - else - self.method = 'TEXT_QUERY_METHOD_EQUALS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @user_name.nil? - invalid_properties.push('invalid value for "user_name", user_name cannot be nil.') - end - - if @user_name.to_s.length > 200 - invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 200.') - end - - if @user_name.to_s.length < 1 - invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @user_name.nil? - return false if @user_name.to_s.length > 200 - return false if @user_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] user_name Value to be assigned - def user_name=(user_name) - if user_name.nil? - fail ArgumentError, 'user_name cannot be nil' - end - - if user_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 200.' - end - - if user_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.' - end - - @user_name = user_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_name == o.user_name && - method == o.method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_name, method].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_user_state.rb b/lib/zitadel/client/models/user_service_user_state.rb deleted file mode 100644 index 69ca26c5..00000000 --- a/lib/zitadel/client/models/user_service_user_state.rb +++ /dev/null @@ -1,45 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceUserState - USER_STATE_UNSPECIFIED = "USER_STATE_UNSPECIFIED".freeze - USER_STATE_ACTIVE = "USER_STATE_ACTIVE".freeze - USER_STATE_INACTIVE = "USER_STATE_INACTIVE".freeze - USER_STATE_DELETED = "USER_STATE_DELETED".freeze - USER_STATE_LOCKED = "USER_STATE_LOCKED".freeze - USER_STATE_INITIAL = "USER_STATE_INITIAL".freeze - - def self.all_vars - @all_vars ||= [USER_STATE_UNSPECIFIED, USER_STATE_ACTIVE, USER_STATE_INACTIVE, USER_STATE_DELETED, USER_STATE_LOCKED, USER_STATE_INITIAL].freeze - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - return value if UserServiceUserState.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceUserState" - end - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_email_request.rb b/lib/zitadel/client/models/user_service_verify_email_request.rb deleted file mode 100644 index 1dd96760..00000000 --- a/lib/zitadel/client/models/user_service_verify_email_request.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyEmailRequest - # \"the verification code generated during the set email request\" - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyEmailRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - else - self.verification_code = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @verification_code.nil? - invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') - end - - if @verification_code.to_s.length > 20 - invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') - end - - if @verification_code.to_s.length < 1 - invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @verification_code.nil? - return false if @verification_code.to_s.length > 20 - return false if @verification_code.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] verification_code Value to be assigned - def verification_code=(verification_code) - if verification_code.nil? - fail ArgumentError, 'verification_code cannot be nil' - end - - if verification_code.to_s.length > 20 - fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' - end - - if verification_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' - end - - @verification_code = verification_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_email_response.rb b/lib/zitadel/client/models/user_service_verify_email_response.rb deleted file mode 100644 index dcc059f7..00000000 --- a/lib/zitadel/client/models/user_service_verify_email_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyEmailResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyEmailResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_invite_code_request.rb b/lib/zitadel/client/models/user_service_verify_invite_code_request.rb deleted file mode 100644 index 4f6dd1b0..00000000 --- a/lib/zitadel/client/models/user_service_verify_invite_code_request.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyInviteCodeRequest - # \"the verification code generated during the invite code request\" - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyInviteCodeRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyInviteCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - else - self.verification_code = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @verification_code.nil? - invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') - end - - if @verification_code.to_s.length > 20 - invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') - end - - if @verification_code.to_s.length < 1 - invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @verification_code.nil? - return false if @verification_code.to_s.length > 20 - return false if @verification_code.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] verification_code Value to be assigned - def verification_code=(verification_code) - if verification_code.nil? - fail ArgumentError, 'verification_code cannot be nil' - end - - if verification_code.to_s.length > 20 - fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' - end - - if verification_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' - end - - @verification_code = verification_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_invite_code_response.rb b/lib/zitadel/client/models/user_service_verify_invite_code_response.rb deleted file mode 100644 index f52dd29a..00000000 --- a/lib/zitadel/client/models/user_service_verify_invite_code_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyInviteCodeResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyInviteCodeResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyInviteCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb b/lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb deleted file mode 100644 index 59b65487..00000000 --- a/lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb +++ /dev/null @@ -1,292 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyPasskeyRegistrationRequest - # PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential - attr_accessor :public_key_credential - - attr_accessor :passkey_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'public_key_credential' => :'publicKeyCredential', - :'passkey_name' => :'passkeyName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'public_key_credential' => :'Object', - :'passkey_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'public_key_credential') - self.public_key_credential = attributes[:'public_key_credential'] - else - self.public_key_credential = nil - end - - if attributes.key?(:'passkey_name') - self.passkey_name = attributes[:'passkey_name'] - else - self.passkey_name = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @public_key_credential.nil? - invalid_properties.push('invalid value for "public_key_credential", public_key_credential cannot be nil.') - end - - if @passkey_name.nil? - invalid_properties.push('invalid value for "passkey_name", passkey_name cannot be nil.') - end - - if @passkey_name.to_s.length > 200 - invalid_properties.push('invalid value for "passkey_name", the character length must be smaller than or equal to 200.') - end - - if @passkey_name.to_s.length < 1 - invalid_properties.push('invalid value for "passkey_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @public_key_credential.nil? - return false if @passkey_name.nil? - return false if @passkey_name.to_s.length > 200 - return false if @passkey_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] public_key_credential Value to be assigned - def public_key_credential=(public_key_credential) - if public_key_credential.nil? - fail ArgumentError, 'public_key_credential cannot be nil' - end - - @public_key_credential = public_key_credential - end - - # Custom attribute writer method with validation - # @param [Object] passkey_name Value to be assigned - def passkey_name=(passkey_name) - if passkey_name.nil? - fail ArgumentError, 'passkey_name cannot be nil' - end - - if passkey_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "passkey_name", the character length must be smaller than or equal to 200.' - end - - if passkey_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "passkey_name", the character length must be great than or equal to 1.' - end - - @passkey_name = passkey_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - public_key_credential == o.public_key_credential && - passkey_name == o.passkey_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [public_key_credential, passkey_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb b/lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb deleted file mode 100644 index bf7c42d9..00000000 --- a/lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyPasskeyRegistrationResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_phone_request.rb b/lib/zitadel/client/models/user_service_verify_phone_request.rb deleted file mode 100644 index 3ca9780d..00000000 --- a/lib/zitadel/client/models/user_service_verify_phone_request.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyPhoneRequest - # \"the verification code generated during the set phone request\" - attr_accessor :verification_code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verification_code' => :'verificationCode' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verification_code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPhoneRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPhoneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verification_code') - self.verification_code = attributes[:'verification_code'] - else - self.verification_code = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @verification_code.nil? - invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') - end - - if @verification_code.to_s.length > 20 - invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') - end - - if @verification_code.to_s.length < 1 - invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @verification_code.nil? - return false if @verification_code.to_s.length > 20 - return false if @verification_code.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] verification_code Value to be assigned - def verification_code=(verification_code) - if verification_code.nil? - fail ArgumentError, 'verification_code cannot be nil' - end - - if verification_code.to_s.length > 20 - fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' - end - - if verification_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' - end - - @verification_code = verification_code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verification_code == o.verification_code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verification_code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_phone_response.rb b/lib/zitadel/client/models/user_service_verify_phone_response.rb deleted file mode 100644 index c61c681b..00000000 --- a/lib/zitadel/client/models/user_service_verify_phone_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyPhoneResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPhoneResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPhoneResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb b/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb deleted file mode 100644 index f1774297..00000000 --- a/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb +++ /dev/null @@ -1,248 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyTOTPRegistrationRequest - # Code generated by TOTP app or device - attr_accessor :code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @code.nil? - invalid_properties.push('invalid value for "code", code cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @code.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] code Value to be assigned - def code=(code) - if code.nil? - fail ArgumentError, 'code cannot be nil' - end - - @code = code - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb b/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb deleted file mode 100644 index 6e822258..00000000 --- a/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyTOTPRegistrationResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb b/lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb deleted file mode 100644 index 22acce0a..00000000 --- a/lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb +++ /dev/null @@ -1,292 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyU2FRegistrationRequest - # PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential - attr_accessor :public_key_credential - - attr_accessor :token_name - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'public_key_credential' => :'publicKeyCredential', - :'token_name' => :'tokenName' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'public_key_credential' => :'Object', - :'token_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'public_key_credential') - self.public_key_credential = attributes[:'public_key_credential'] - else - self.public_key_credential = nil - end - - if attributes.key?(:'token_name') - self.token_name = attributes[:'token_name'] - else - self.token_name = nil - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @public_key_credential.nil? - invalid_properties.push('invalid value for "public_key_credential", public_key_credential cannot be nil.') - end - - if @token_name.nil? - invalid_properties.push('invalid value for "token_name", token_name cannot be nil.') - end - - if @token_name.to_s.length > 200 - invalid_properties.push('invalid value for "token_name", the character length must be smaller than or equal to 200.') - end - - if @token_name.to_s.length < 1 - invalid_properties.push('invalid value for "token_name", the character length must be great than or equal to 1.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @public_key_credential.nil? - return false if @token_name.nil? - return false if @token_name.to_s.length > 200 - return false if @token_name.to_s.length < 1 - true - end - - # Custom attribute writer method with validation - # @param [Object] public_key_credential Value to be assigned - def public_key_credential=(public_key_credential) - if public_key_credential.nil? - fail ArgumentError, 'public_key_credential cannot be nil' - end - - @public_key_credential = public_key_credential - end - - # Custom attribute writer method with validation - # @param [Object] token_name Value to be assigned - def token_name=(token_name) - if token_name.nil? - fail ArgumentError, 'token_name cannot be nil' - end - - if token_name.to_s.length > 200 - fail ArgumentError, 'invalid value for "token_name", the character length must be smaller than or equal to 200.' - end - - if token_name.to_s.length < 1 - fail ArgumentError, 'invalid value for "token_name", the character length must be great than or equal to 1.' - end - - @token_name = token_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - public_key_credential == o.public_key_credential && - token_name == o.token_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [public_key_credential, token_name].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb b/lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb deleted file mode 100644 index 72793fd1..00000000 --- a/lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class UserServiceVerifyU2FRegistrationResponse - attr_accessor :details - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'details' => :'details' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'details' => :'UserServiceDetails' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - details == o.details - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [details].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/zitadelobjectv2_organization.rb b/lib/zitadel/client/models/zitadelobjectv2_organization.rb deleted file mode 100644 index 1e58f140..00000000 --- a/lib/zitadel/client/models/zitadelobjectv2_organization.rb +++ /dev/null @@ -1,239 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class Zitadelobjectv2Organization - attr_accessor :org_id - - attr_accessor :org_domain - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'org_id' => :'orgId', - :'org_domain' => :'orgDomain' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'org_id' => :'String', - :'org_domain' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Zitadelobjectv2Organization` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Zitadelobjectv2Organization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'org_id') - self.org_id = attributes[:'org_id'] - end - - if attributes.key?(:'org_domain') - self.org_domain = attributes[:'org_domain'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - org_id == o.org_id && - org_domain == o.org_domain - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [org_id, org_domain].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end diff --git a/lib/zitadel/client/models/zitadelorgv2_organization.rb b/lib/zitadel/client/models/zitadelorgv2_organization.rb deleted file mode 100644 index f8727a95..00000000 --- a/lib/zitadel/client/models/zitadelorgv2_organization.rb +++ /dev/null @@ -1,293 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Zitadel::Client::Models - class Zitadelorgv2Organization - # Unique identifier of the organization. - attr_accessor :id - - attr_accessor :details - - attr_accessor :state - - # Name of the organization. - attr_accessor :name - - # Primary domain used in the organization. - attr_accessor :primary_domain - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'id' => :'id', - :'details' => :'details', - :'state' => :'state', - :'name' => :'name', - :'primary_domain' => :'primaryDomain' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'id' => :'String', - :'details' => :'OrganizationServiceDetails', - :'state' => :'OrganizationServiceOrganizationState', - :'name' => :'String', - :'primary_domain' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Models attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Zitadelorgv2Organization` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - # MODIFIED: Updated class name in error message - fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Zitadelorgv2Organization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'details') - self.details = attributes[:'details'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - else - self.state = 'ORGANIZATION_STATE_UNSPECIFIED' - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'primary_domain') - self.primary_domain = attributes[:'primary_domain'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - details == o.details && - state == o.state && - name == o.name && - primary_domain == o.primary_domain - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [id, details, state, name, primary_domain].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end -end - - end - -end From e4e77aa22077ae07f7d19ef2dfe5214e62afad7b Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Sun, 25 May 2025 15:13:35 +0300 Subject: [PATCH 2/2] chore: update generated output under .openapi markers --- lib/zitadel/client/api/action_service_api.rb | 670 ++++ lib/zitadel/client/api/feature_service_api.rb | 783 ++++ .../api/identity_provider_service_api.rb | 85 + lib/zitadel/client/api/o_i_d_c_service_api.rb | 296 ++ .../client/api/organization_service_api.rb | 158 + lib/zitadel/client/api/s_a_m_l_service_api.rb | 159 + lib/zitadel/client/api/session_service_api.rb | 372 ++ lib/zitadel/client/api/settings_api.rb | 147 + .../client/api/settings_service_api.rb | 595 +++ lib/zitadel/client/api/user_service_api.rb | 3210 +++++++++++++++++ lib/zitadel/client/api/web_key_service_api.rb | 273 ++ .../models/action_service_beta_condition.rb | 257 ++ ...ion_service_beta_create_target_response.rb | 251 ++ ...ion_service_beta_delete_target_response.rb | 231 ++ .../action_service_beta_event_execution.rb | 307 ++ .../models/action_service_beta_execution.rb | 262 ++ ...tion_service_beta_execution_target_type.rb | 240 ++ .../action_service_beta_function_execution.rb | 230 ++ ...action_service_beta_get_target_response.rb | 230 ++ ...tion_service_beta_in_target_i_ds_filter.rb | 233 ++ ..._beta_list_execution_functions_response.rb | 232 ++ ...ce_beta_list_execution_methods_response.rb | 232 ++ ...e_beta_list_execution_services_response.rb | 232 ++ ...n_service_beta_list_executions_response.rb | 241 ++ ...tion_service_beta_list_targets_response.rb | 241 ++ .../action_service_beta_pagination_request.rb | 251 ++ ...action_service_beta_pagination_response.rb | 241 ++ .../action_service_beta_r_e_s_t_call.rb | 231 ++ .../action_service_beta_r_e_s_t_webhook.rb | 231 ++ .../action_service_beta_request_execution.rb | 307 ++ .../action_service_beta_response_execution.rb | 307 ++ ...ion_service_beta_set_execution_response.rb | 231 ++ .../models/action_service_beta_target.rb | 315 ++ .../action_service_beta_target_field_name.rb | 48 + .../action_service_beta_target_name_filter.rb | 283 ++ ...ction_service_beta_target_search_filter.rb | 239 ++ .../action_service_beta_text_filter_method.rb | 47 + ...ion_service_beta_update_target_response.rb | 241 ++ .../action_service_create_target_request.rb | 332 ++ .../action_service_list_targets_request.rb | 275 ++ .../models/action_service_protobuf_any.rb | 230 ++ .../models/action_service_rpc_status.rb | 250 ++ .../action_service_set_execution_request.rb | 242 ++ .../action_service_update_target_request.rb | 342 ++ .../client/models/feature_service_details.rb | 259 ++ .../models/feature_service_feature_flag.rb | 265 ++ ..._service_get_instance_features_response.rb | 365 ++ ...vice_get_organization_features_response.rb | 230 ++ ...re_service_get_system_features_response.rb | 338 ++ ...ture_service_get_user_features_response.rb | 230 ++ .../feature_service_improved_performance.rb | 45 + ...rvice_improved_performance_feature_flag.rb | 266 ++ .../client/models/feature_service_login_v2.rb | 241 ++ .../feature_service_login_v2_feature_flag.rb | 272 ++ .../models/feature_service_protobuf_any.rb | 230 ++ ...ervice_reset_instance_features_response.rb | 230 ++ ...ce_reset_organization_features_response.rb | 230 ++ ..._service_reset_system_features_response.rb | 230 ++ ...re_service_reset_user_features_response.rb | 230 ++ .../models/feature_service_rpc_status.rb | 250 ++ ...e_service_set_instance_features_request.rb | 372 ++ ..._service_set_instance_features_response.rb | 230 ++ ...vice_set_organization_features_response.rb | 230 ++ ...ure_service_set_system_features_request.rb | 342 ++ ...re_service_set_system_features_response.rb | 230 ++ ...ture_service_set_user_features_response.rb | 230 ++ .../client/models/feature_service_source.rb | 46 + .../identity_provider_service_apple_config.rb | 263 ++ ...ty_provider_service_auto_linking_option.rb | 42 + ...ntity_provider_service_azure_a_d_config.rb | 261 ++ ...ntity_provider_service_azure_a_d_tenant.rb | 241 ++ ..._provider_service_azure_a_d_tenant_type.rb | 42 + .../identity_provider_service_details.rb | 259 ++ ...provider_service_generic_o_i_d_c_config.rb | 263 ++ ...vider_service_get_i_d_p_by_i_d_response.rb | 230 ++ ...dentity_provider_service_git_hub_config.rb | 243 ++ ...ervice_git_hub_enterprise_server_config.rb | 270 ++ ...dentity_provider_service_git_lab_config.rb | 243 ++ ...ider_service_git_lab_self_hosted_config.rb | 252 ++ ...identity_provider_service_google_config.rb | 243 ++ .../models/identity_provider_service_i_d_p.rb | 302 ++ .../identity_provider_service_i_d_p_config.rb | 338 ++ .../identity_provider_service_i_d_p_state.rb | 44 + .../identity_provider_service_i_d_p_type.rb | 52 + .../identity_provider_service_j_w_t_config.rb | 261 ++ ...ity_provider_service_l_d_a_p_attributes.rb | 347 ++ ...dentity_provider_service_l_d_a_p_config.rb | 317 ++ ...identity_provider_service_o_auth_config.rb | 283 ++ .../identity_provider_service_options.rb | 294 ++ .../identity_provider_service_protobuf_any.rb | 230 ++ .../identity_provider_service_rpc_status.rb | 250 ++ ...entity_provider_service_s_a_m_l_binding.rb | 43 + ...dentity_provider_service_s_a_m_l_config.rb | 295 ++ ...rovider_service_s_a_m_l_name_i_d_format.rb | 43 + .../models/o_i_d_c_service_auth_request.rb | 327 ++ .../o_i_d_c_service_authorization_error.rb | 272 ++ ...ze_or_deny_device_authorization_request.rb | 239 ++ ...o_i_d_c_service_create_callback_request.rb | 239 ++ ..._i_d_c_service_create_callback_response.rb | 240 ++ .../client/models/o_i_d_c_service_details.rb | 259 ++ ..._c_service_device_authorization_request.rb | 273 ++ .../models/o_i_d_c_service_error_reason.rb | 56 + ...i_d_c_service_get_auth_request_response.rb | 230 ++ ...t_device_authorization_request_response.rb | 230 ++ .../client/models/o_i_d_c_service_prompt.rb | 45 + .../models/o_i_d_c_service_protobuf_any.rb | 230 ++ .../models/o_i_d_c_service_rpc_status.rb | 250 ++ .../client/models/o_i_d_c_service_session.rb | 297 ++ ...nization_service_add_human_user_request.rb | 445 +++ ...zation_service_add_organization_request.rb | 276 ++ ..._service_add_organization_request_admin.rb | 250 ++ ...ation_service_add_organization_response.rb | 250 ++ ...add_organization_response_created_admin.rb | 248 ++ .../models/organization_service_details.rb | 259 ++ .../models/organization_service_gender.rb | 43 + .../organization_service_hashed_password.rb | 275 ++ .../models/organization_service_i_d_p_link.rb | 335 ++ .../organization_service_list_details.rb | 249 ++ ...tion_service_list_organizations_request.rb | 274 ++ ...ion_service_list_organizations_response.rb | 274 ++ .../models/organization_service_list_query.rb | 251 ++ ...ation_service_organization_domain_query.rb | 299 ++ ...ization_service_organization_field_name.rb | 41 + ...nization_service_organization_i_d_query.rb | 266 ++ ...ization_service_organization_name_query.rb | 299 ++ ...organization_service_organization_state.rb | 43 + ...zation_service_organization_state_query.rb | 254 ++ .../models/organization_service_password.rb | 274 ++ .../organization_service_protobuf_any.rb | 230 ++ .../models/organization_service_rpc_status.rb | 250 ++ .../organization_service_search_query.rb | 266 ++ ...on_service_send_email_verification_code.rb | 259 ++ .../organization_service_set_human_email.rb | 292 ++ .../organization_service_set_human_phone.rb | 276 ++ .../organization_service_set_human_profile.rb | 426 +++ ...organization_service_set_metadata_entry.rb | 310 ++ .../organization_service_text_query_method.rb | 47 + .../s_a_m_l_service_authorization_error.rb | 263 ++ ...s_a_m_l_service_create_response_request.rb | 239 ++ ..._a_m_l_service_create_response_response.rb | 258 ++ .../client/models/s_a_m_l_service_details.rb | 259 ++ .../models/s_a_m_l_service_error_reason.rb | 47 + ..._l_service_get_s_a_m_l_request_response.rb | 230 ++ .../models/s_a_m_l_service_post_response.rb | 239 ++ .../models/s_a_m_l_service_protobuf_any.rb | 230 ++ .../models/s_a_m_l_service_rpc_status.rb | 250 ++ .../models/s_a_m_l_service_s_a_m_l_request.rb | 281 ++ .../client/models/s_a_m_l_service_session.rb | 297 ++ .../models/session_service_challenges.rb | 248 ++ .../session_service_challenges_web_auth_n.rb | 231 ++ .../session_service_check_i_d_p_intent.rb | 297 ++ .../models/session_service_check_o_t_p.rb | 249 ++ .../models/session_service_check_password.rb | 258 ++ .../models/session_service_check_t_o_t_p.rb | 258 ++ .../models/session_service_check_user.rb | 295 ++ .../session_service_check_web_auth_n.rb | 248 ++ .../client/models/session_service_checks.rb | 284 ++ .../session_service_create_session_request.rb | 270 ++ ...session_service_create_session_response.rb | 259 ++ .../session_service_creation_date_query.rb | 263 ++ .../models/session_service_creator_query.rb | 250 ++ .../session_service_delete_session_request.rb | 231 ++ ...session_service_delete_session_response.rb | 230 ++ .../client/models/session_service_details.rb | 259 ++ .../client/models/session_service_factors.rb | 284 ++ .../session_service_get_session_response.rb | 230 ++ .../models/session_service_i_ds_query.rb | 232 ++ .../models/session_service_intent_factor.rb | 231 ++ .../models/session_service_list_details.rb | 249 ++ .../models/session_service_list_query.rb | 251 ++ .../session_service_list_sessions_request.rb | 274 ++ .../session_service_list_sessions_response.rb | 241 ++ .../session_service_o_t_p_email_send_code.rb | 259 ++ .../models/session_service_o_t_p_factor.rb | 231 ++ .../models/session_service_password_factor.rb | 231 ++ .../models/session_service_protobuf_any.rb | 230 ++ .../session_service_request_challenges.rb | 248 ++ ..._service_request_challenges_o_t_p_email.rb | 239 ++ ..._service_request_challenges_o_t_p_s_m_s.rb | 230 ++ ...n_service_request_challenges_web_auth_n.rb | 296 ++ .../models/session_service_rpc_status.rb | 250 ++ .../models/session_service_search_query.rb | 266 ++ .../client/models/session_service_session.rb | 301 ++ .../session_service_session_field_name.rb | 41 + .../session_service_set_session_request.rb | 299 ++ .../session_service_set_session_response.rb | 249 ++ .../models/session_service_t_o_t_p_factor.rb | 231 ++ .../session_service_timestamp_query_method.rb | 44 + .../models/session_service_user_agent.rb | 259 ++ ...ession_service_user_agent_header_values.rb | 233 ++ .../session_service_user_agent_query.rb | 250 ++ .../models/session_service_user_factor.rb | 271 ++ .../models/session_service_user_i_d_query.rb | 230 ++ ...n_service_user_verification_requirement.rb | 43 + .../session_service_web_auth_n_factor.rb | 240 ++ .../settings_service_auto_linking_option.rb | 42 + .../settings_service_branding_settings.rb | 313 ++ .../client/models/settings_service_details.rb | 259 ++ .../settings_service_domain_settings.rb | 284 ++ ...ttings_service_embedded_iframe_settings.rb | 243 ++ ..._get_active_identity_providers_response.rb | 241 ++ ..._service_get_branding_settings_response.rb | 239 ++ ...gs_service_get_domain_settings_response.rb | 239 ++ ...s_service_get_general_settings_response.rb | 252 ++ ...get_legal_and_support_settings_response.rb | 239 ++ ...s_service_get_lockout_settings_response.rb | 239 ++ ...ngs_service_get_login_settings_response.rb | 239 ++ ...t_password_complexity_settings_response.rb | 239 ++ ...e_get_password_expiry_settings_response.rb | 239 ++ ..._service_get_security_settings_response.rb | 239 ++ .../settings_service_identity_provider.rb | 281 ++ ...settings_service_identity_provider_type.rb | 52 + ...ings_service_legal_and_support_settings.rb | 321 ++ .../models/settings_service_list_details.rb | 249 ++ .../settings_service_lockout_settings.rb | 274 ++ .../models/settings_service_login_settings.rb | 447 +++ .../settings_service_multi_factor_type.rb | 41 + .../client/models/settings_service_options.rb | 294 ++ .../models/settings_service_passkeys_type.rb | 41 + ...gs_service_password_complexity_settings.rb | 304 ++ ...ttings_service_password_expiry_settings.rb | 274 ++ .../models/settings_service_protobuf_any.rb | 230 ++ .../settings_service_resource_owner_type.rb | 42 + .../models/settings_service_rpc_status.rb | 250 ++ .../settings_service_second_factor_type.rb | 44 + .../settings_service_security_settings.rb | 240 ++ ...s_service_set_security_settings_request.rb | 240 ++ ..._service_set_security_settings_response.rb | 230 ++ .../client/models/settings_service_theme.rb | 281 ++ .../models/settings_service_theme_mode.rb | 43 + .../models/user_service_access_token_type.rb | 41 + .../user_service_add_human_user_request.rb | 445 +++ .../user_service_add_human_user_response.rb | 257 ++ .../user_service_add_i_d_p_link_request.rb | 230 ++ .../user_service_add_i_d_p_link_response.rb | 230 ++ .../user_service_add_o_t_p_email_response.rb | 230 ++ .../user_service_add_o_t_p_s_m_s_response.rb | 230 ++ .../client/models/user_service_and_query.rb | 234 ++ .../client/models/user_service_auth_factor.rb | 268 ++ .../models/user_service_auth_factor_state.rb | 43 + .../models/user_service_auth_factor_u2_f.rb | 239 ++ ...user_service_authentication_method_type.rb | 47 + ...user_service_create_invite_code_request.rb | 239 ++ ...ser_service_create_invite_code_response.rb | 240 ++ ...reate_passkey_registration_link_request.rb | 239 ++ ...eate_passkey_registration_link_response.rb | 239 ++ .../user_service_deactivate_user_response.rb | 230 ++ .../user_service_delete_user_response.rb | 230 ++ .../client/models/user_service_details.rb | 259 ++ .../models/user_service_display_name_query.rb | 299 ++ .../client/models/user_service_email_query.rb | 291 ++ .../models/user_service_first_name_query.rb | 299 ++ .../client/models/user_service_gender.rb | 43 + .../user_service_get_user_by_i_d_response.rb | 239 ++ .../models/user_service_hashed_password.rb | 275 ++ .../client/models/user_service_human_email.rb | 267 ++ ...rvice_human_m_f_a_init_skipped_response.rb | 230 ++ .../client/models/user_service_human_phone.rb | 258 ++ .../models/user_service_human_profile.rb | 422 +++ .../client/models/user_service_human_user.rb | 353 ++ .../models/user_service_i_d_p_information.rb | 288 ++ .../models/user_service_i_d_p_intent.rb | 326 ++ ...ervice_i_d_p_l_d_a_p_access_information.rb | 230 ++ .../client/models/user_service_i_d_p_link.rb | 335 ++ ...service_i_d_p_o_auth_access_information.rb | 239 ++ ...ervice_i_d_p_s_a_m_l_access_information.rb | 230 ++ .../user_service_in_user_emails_query.rb | 234 ++ .../models/user_service_in_user_i_d_query.rb | 234 ++ .../user_service_l_d_a_p_credentials.rb | 297 ++ .../models/user_service_last_name_query.rb | 299 ++ ...ce_list_authentication_factors_response.rb | 232 ++ ...st_authentication_method_types_response.rb | 241 ++ .../models/user_service_list_details.rb | 249 ++ .../user_service_list_i_d_p_links_request.rb | 230 ++ .../user_service_list_i_d_p_links_response.rb | 241 ++ .../user_service_list_passkeys_response.rb | 241 ++ .../client/models/user_service_list_query.rb | 251 ++ .../models/user_service_list_users_request.rb | 274 ++ .../user_service_list_users_response.rb | 274 ++ .../models/user_service_lock_user_response.rb | 230 ++ .../models/user_service_login_name_query.rb | 299 ++ .../models/user_service_machine_user.rb | 281 ++ .../models/user_service_nick_name_query.rb | 299 ++ .../client/models/user_service_not_query.rb | 231 ++ .../models/user_service_notification_type.rb | 42 + .../client/models/user_service_or_query.rb | 234 ++ .../models/user_service_organization.rb | 239 ++ .../user_service_organization_id_query.rb | 266 ++ .../client/models/user_service_passkey.rb | 300 ++ .../user_service_passkey_authenticator.rb | 42 + .../user_service_passkey_registration_code.rb | 293 ++ .../client/models/user_service_password.rb | 274 ++ .../user_service_password_reset_request.rb | 239 ++ .../user_service_password_reset_response.rb | 239 ++ .../client/models/user_service_phone_query.rb | 300 ++ .../models/user_service_protobuf_any.rb | 230 ++ .../user_service_reactivate_user_response.rb | 230 ++ .../models/user_service_redirect_u_r_ls.rb | 297 ++ .../user_service_register_passkey_request.rb | 273 ++ .../user_service_register_passkey_response.rb | 249 ++ .../user_service_register_t_o_t_p_response.rb | 248 ++ .../user_service_register_u2_f_request.rb | 231 ++ .../user_service_register_u2_f_response.rb | 249 ++ ...user_service_remove_i_d_p_link_response.rb | 230 ++ ...ser_service_remove_o_t_p_email_response.rb | 230 ++ ...ser_service_remove_o_t_p_s_m_s_response.rb | 230 ++ .../user_service_remove_passkey_response.rb | 230 ++ .../user_service_remove_phone_response.rb | 230 ++ .../user_service_remove_t_o_t_p_response.rb | 230 ++ .../user_service_remove_u2_f_response.rb | 230 ++ .../user_service_resend_email_code_request.rb | 239 ++ ...user_service_resend_email_code_response.rb | 239 ++ ...ser_service_resend_invite_code_response.rb | 230 ++ .../user_service_resend_phone_code_request.rb | 239 ++ ...user_service_resend_phone_code_response.rb | 239 ++ ...trieve_identity_provider_intent_request.rb | 259 ++ ...rieve_identity_provider_intent_response.rb | 258 ++ .../client/models/user_service_rpc_status.rb | 250 ++ .../models/user_service_search_query.rb | 365 ++ .../user_service_send_email_code_request.rb | 239 ++ .../user_service_send_email_code_response.rb | 239 ++ ...er_service_send_email_verification_code.rb | 259 ++ .../models/user_service_send_invite_code.rb | 297 ++ ..._service_send_passkey_registration_link.rb | 259 ++ .../user_service_send_password_reset_link.rb | 292 ++ .../models/user_service_set_email_request.rb | 292 ++ .../models/user_service_set_email_response.rb | 239 ++ .../models/user_service_set_human_email.rb | 292 ++ .../models/user_service_set_human_phone.rb | 276 ++ .../models/user_service_set_human_profile.rb | 426 +++ .../models/user_service_set_metadata_entry.rb | 310 ++ .../models/user_service_set_password.rb | 328 ++ .../user_service_set_password_request.rb | 319 ++ .../user_service_set_password_response.rb | 230 ++ .../models/user_service_set_phone_request.rb | 292 ++ .../models/user_service_set_phone_response.rb | 239 ++ ..._start_identity_provider_intent_request.rb | 277 ++ ...start_identity_provider_intent_response.rb | 259 ++ .../client/models/user_service_state_query.rb | 270 ++ .../models/user_service_text_query_method.rb | 47 + .../client/models/user_service_type.rb | 42 + .../client/models/user_service_type_query.rb | 270 ++ .../user_service_unlock_user_response.rb | 230 ++ .../user_service_update_human_user_request.rb | 294 ++ ...user_service_update_human_user_response.rb | 248 ++ .../client/models/user_service_user.rb | 297 ++ .../models/user_service_user_field_name.rb | 49 + .../models/user_service_user_name_query.rb | 299 ++ .../client/models/user_service_user_state.rb | 45 + .../user_service_verify_email_request.rb | 266 ++ .../user_service_verify_email_response.rb | 230 ++ ...user_service_verify_invite_code_request.rb | 266 ++ ...ser_service_verify_invite_code_response.rb | 230 ++ ...ice_verify_passkey_registration_request.rb | 292 ++ ...ce_verify_passkey_registration_response.rb | 230 ++ .../user_service_verify_phone_request.rb | 266 ++ .../user_service_verify_phone_response.rb | 230 ++ ...ice_verify_t_o_t_p_registration_request.rb | 248 ++ ...ce_verify_t_o_t_p_registration_response.rb | 230 ++ ...ervice_verify_u2_f_registration_request.rb | 292 ++ ...rvice_verify_u2_f_registration_response.rb | 230 ++ ..._service_beta_activate_web_key_response.rb | 231 ++ ...ey_service_beta_create_web_key_response.rb | 241 ++ ...ey_service_beta_delete_web_key_response.rb | 231 ++ .../models/web_key_service_beta_e_c_d_s_a.rb | 254 ++ .../web_key_service_beta_e_c_d_s_a_curve.rb | 43 + ...key_service_beta_list_web_keys_response.rb | 232 ++ .../models/web_key_service_beta_r_s_a.rb | 265 ++ .../models/web_key_service_beta_r_s_a_bits.rb | 43 + .../web_key_service_beta_r_s_a_hasher.rb | 43 + .../models/web_key_service_beta_state.rb | 44 + .../models/web_key_service_beta_web_key.rb | 289 ++ .../web_key_service_create_web_key_request.rb | 248 ++ .../models/web_key_service_protobuf_any.rb | 230 ++ .../models/web_key_service_rpc_status.rb | 250 ++ .../models/zitadelobjectv2_organization.rb | 239 ++ .../models/zitadelorgv2_organization.rb | 293 ++ 377 files changed, 93885 insertions(+) create mode 100644 lib/zitadel/client/api/action_service_api.rb create mode 100644 lib/zitadel/client/api/feature_service_api.rb create mode 100644 lib/zitadel/client/api/identity_provider_service_api.rb create mode 100644 lib/zitadel/client/api/o_i_d_c_service_api.rb create mode 100644 lib/zitadel/client/api/organization_service_api.rb create mode 100644 lib/zitadel/client/api/s_a_m_l_service_api.rb create mode 100644 lib/zitadel/client/api/session_service_api.rb create mode 100644 lib/zitadel/client/api/settings_api.rb create mode 100644 lib/zitadel/client/api/settings_service_api.rb create mode 100644 lib/zitadel/client/api/user_service_api.rb create mode 100644 lib/zitadel/client/api/web_key_service_api.rb create mode 100644 lib/zitadel/client/models/action_service_beta_condition.rb create mode 100644 lib/zitadel/client/models/action_service_beta_create_target_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_delete_target_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_event_execution.rb create mode 100644 lib/zitadel/client/models/action_service_beta_execution.rb create mode 100644 lib/zitadel/client/models/action_service_beta_execution_target_type.rb create mode 100644 lib/zitadel/client/models/action_service_beta_function_execution.rb create mode 100644 lib/zitadel/client/models/action_service_beta_get_target_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_in_target_i_ds_filter.rb create mode 100644 lib/zitadel/client/models/action_service_beta_list_execution_functions_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_list_execution_methods_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_list_execution_services_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_list_executions_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_list_targets_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_pagination_request.rb create mode 100644 lib/zitadel/client/models/action_service_beta_pagination_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_r_e_s_t_call.rb create mode 100644 lib/zitadel/client/models/action_service_beta_r_e_s_t_webhook.rb create mode 100644 lib/zitadel/client/models/action_service_beta_request_execution.rb create mode 100644 lib/zitadel/client/models/action_service_beta_response_execution.rb create mode 100644 lib/zitadel/client/models/action_service_beta_set_execution_response.rb create mode 100644 lib/zitadel/client/models/action_service_beta_target.rb create mode 100644 lib/zitadel/client/models/action_service_beta_target_field_name.rb create mode 100644 lib/zitadel/client/models/action_service_beta_target_name_filter.rb create mode 100644 lib/zitadel/client/models/action_service_beta_target_search_filter.rb create mode 100644 lib/zitadel/client/models/action_service_beta_text_filter_method.rb create mode 100644 lib/zitadel/client/models/action_service_beta_update_target_response.rb create mode 100644 lib/zitadel/client/models/action_service_create_target_request.rb create mode 100644 lib/zitadel/client/models/action_service_list_targets_request.rb create mode 100644 lib/zitadel/client/models/action_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/action_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/action_service_set_execution_request.rb create mode 100644 lib/zitadel/client/models/action_service_update_target_request.rb create mode 100644 lib/zitadel/client/models/feature_service_details.rb create mode 100644 lib/zitadel/client/models/feature_service_feature_flag.rb create mode 100644 lib/zitadel/client/models/feature_service_get_instance_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_get_organization_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_get_system_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_get_user_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_improved_performance.rb create mode 100644 lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb create mode 100644 lib/zitadel/client/models/feature_service_login_v2.rb create mode 100644 lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb create mode 100644 lib/zitadel/client/models/feature_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/feature_service_reset_instance_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_reset_organization_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_reset_system_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_reset_user_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/feature_service_set_instance_features_request.rb create mode 100644 lib/zitadel/client/models/feature_service_set_instance_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_set_organization_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_set_system_features_request.rb create mode 100644 lib/zitadel/client/models/feature_service_set_system_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_set_user_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_source.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_apple_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_details.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_git_hub_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_git_lab_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_google_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_o_auth_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_options.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_auth_request.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_details.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_error_reason.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_prompt.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_session.rb create mode 100644 lib/zitadel/client/models/organization_service_add_human_user_request.rb create mode 100644 lib/zitadel/client/models/organization_service_add_organization_request.rb create mode 100644 lib/zitadel/client/models/organization_service_add_organization_request_admin.rb create mode 100644 lib/zitadel/client/models/organization_service_add_organization_response.rb create mode 100644 lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb create mode 100644 lib/zitadel/client/models/organization_service_details.rb create mode 100644 lib/zitadel/client/models/organization_service_gender.rb create mode 100644 lib/zitadel/client/models/organization_service_hashed_password.rb create mode 100644 lib/zitadel/client/models/organization_service_i_d_p_link.rb create mode 100644 lib/zitadel/client/models/organization_service_list_details.rb create mode 100644 lib/zitadel/client/models/organization_service_list_organizations_request.rb create mode 100644 lib/zitadel/client/models/organization_service_list_organizations_response.rb create mode 100644 lib/zitadel/client/models/organization_service_list_query.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_domain_query.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_field_name.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_i_d_query.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_name_query.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_state.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_state_query.rb create mode 100644 lib/zitadel/client/models/organization_service_password.rb create mode 100644 lib/zitadel/client/models/organization_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/organization_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/organization_service_search_query.rb create mode 100644 lib/zitadel/client/models/organization_service_send_email_verification_code.rb create mode 100644 lib/zitadel/client/models/organization_service_set_human_email.rb create mode 100644 lib/zitadel/client/models/organization_service_set_human_phone.rb create mode 100644 lib/zitadel/client/models/organization_service_set_human_profile.rb create mode 100644 lib/zitadel/client/models/organization_service_set_metadata_entry.rb create mode 100644 lib/zitadel/client/models/organization_service_text_query_method.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_details.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_error_reason.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_post_response.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_session.rb create mode 100644 lib/zitadel/client/models/session_service_challenges.rb create mode 100644 lib/zitadel/client/models/session_service_challenges_web_auth_n.rb create mode 100644 lib/zitadel/client/models/session_service_check_i_d_p_intent.rb create mode 100644 lib/zitadel/client/models/session_service_check_o_t_p.rb create mode 100644 lib/zitadel/client/models/session_service_check_password.rb create mode 100644 lib/zitadel/client/models/session_service_check_t_o_t_p.rb create mode 100644 lib/zitadel/client/models/session_service_check_user.rb create mode 100644 lib/zitadel/client/models/session_service_check_web_auth_n.rb create mode 100644 lib/zitadel/client/models/session_service_checks.rb create mode 100644 lib/zitadel/client/models/session_service_create_session_request.rb create mode 100644 lib/zitadel/client/models/session_service_create_session_response.rb create mode 100644 lib/zitadel/client/models/session_service_creation_date_query.rb create mode 100644 lib/zitadel/client/models/session_service_creator_query.rb create mode 100644 lib/zitadel/client/models/session_service_delete_session_request.rb create mode 100644 lib/zitadel/client/models/session_service_delete_session_response.rb create mode 100644 lib/zitadel/client/models/session_service_details.rb create mode 100644 lib/zitadel/client/models/session_service_factors.rb create mode 100644 lib/zitadel/client/models/session_service_get_session_response.rb create mode 100644 lib/zitadel/client/models/session_service_i_ds_query.rb create mode 100644 lib/zitadel/client/models/session_service_intent_factor.rb create mode 100644 lib/zitadel/client/models/session_service_list_details.rb create mode 100644 lib/zitadel/client/models/session_service_list_query.rb create mode 100644 lib/zitadel/client/models/session_service_list_sessions_request.rb create mode 100644 lib/zitadel/client/models/session_service_list_sessions_response.rb create mode 100644 lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb create mode 100644 lib/zitadel/client/models/session_service_o_t_p_factor.rb create mode 100644 lib/zitadel/client/models/session_service_password_factor.rb create mode 100644 lib/zitadel/client/models/session_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/session_service_request_challenges.rb create mode 100644 lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb create mode 100644 lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb create mode 100644 lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb create mode 100644 lib/zitadel/client/models/session_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/session_service_search_query.rb create mode 100644 lib/zitadel/client/models/session_service_session.rb create mode 100644 lib/zitadel/client/models/session_service_session_field_name.rb create mode 100644 lib/zitadel/client/models/session_service_set_session_request.rb create mode 100644 lib/zitadel/client/models/session_service_set_session_response.rb create mode 100644 lib/zitadel/client/models/session_service_t_o_t_p_factor.rb create mode 100644 lib/zitadel/client/models/session_service_timestamp_query_method.rb create mode 100644 lib/zitadel/client/models/session_service_user_agent.rb create mode 100644 lib/zitadel/client/models/session_service_user_agent_header_values.rb create mode 100644 lib/zitadel/client/models/session_service_user_agent_query.rb create mode 100644 lib/zitadel/client/models/session_service_user_factor.rb create mode 100644 lib/zitadel/client/models/session_service_user_i_d_query.rb create mode 100644 lib/zitadel/client/models/session_service_user_verification_requirement.rb create mode 100644 lib/zitadel/client/models/session_service_web_auth_n_factor.rb create mode 100644 lib/zitadel/client/models/settings_service_auto_linking_option.rb create mode 100644 lib/zitadel/client/models/settings_service_branding_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_details.rb create mode 100644 lib/zitadel/client/models/settings_service_domain_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_branding_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_domain_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_general_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_login_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_get_security_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_identity_provider.rb create mode 100644 lib/zitadel/client/models/settings_service_identity_provider_type.rb create mode 100644 lib/zitadel/client/models/settings_service_legal_and_support_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_list_details.rb create mode 100644 lib/zitadel/client/models/settings_service_lockout_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_login_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_multi_factor_type.rb create mode 100644 lib/zitadel/client/models/settings_service_options.rb create mode 100644 lib/zitadel/client/models/settings_service_passkeys_type.rb create mode 100644 lib/zitadel/client/models/settings_service_password_complexity_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_password_expiry_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/settings_service_resource_owner_type.rb create mode 100644 lib/zitadel/client/models/settings_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/settings_service_second_factor_type.rb create mode 100644 lib/zitadel/client/models/settings_service_security_settings.rb create mode 100644 lib/zitadel/client/models/settings_service_set_security_settings_request.rb create mode 100644 lib/zitadel/client/models/settings_service_set_security_settings_response.rb create mode 100644 lib/zitadel/client/models/settings_service_theme.rb create mode 100644 lib/zitadel/client/models/settings_service_theme_mode.rb create mode 100644 lib/zitadel/client/models/user_service_access_token_type.rb create mode 100644 lib/zitadel/client/models/user_service_add_human_user_request.rb create mode 100644 lib/zitadel/client/models/user_service_add_human_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb create mode 100644 lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb create mode 100644 lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb create mode 100644 lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb create mode 100644 lib/zitadel/client/models/user_service_and_query.rb create mode 100644 lib/zitadel/client/models/user_service_auth_factor.rb create mode 100644 lib/zitadel/client/models/user_service_auth_factor_state.rb create mode 100644 lib/zitadel/client/models/user_service_auth_factor_u2_f.rb create mode 100644 lib/zitadel/client/models/user_service_authentication_method_type.rb create mode 100644 lib/zitadel/client/models/user_service_create_invite_code_request.rb create mode 100644 lib/zitadel/client/models/user_service_create_invite_code_response.rb create mode 100644 lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb create mode 100644 lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb create mode 100644 lib/zitadel/client/models/user_service_deactivate_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_delete_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_details.rb create mode 100644 lib/zitadel/client/models/user_service_display_name_query.rb create mode 100644 lib/zitadel/client/models/user_service_email_query.rb create mode 100644 lib/zitadel/client/models/user_service_first_name_query.rb create mode 100644 lib/zitadel/client/models/user_service_gender.rb create mode 100644 lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb create mode 100644 lib/zitadel/client/models/user_service_hashed_password.rb create mode 100644 lib/zitadel/client/models/user_service_human_email.rb create mode 100644 lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb create mode 100644 lib/zitadel/client/models/user_service_human_phone.rb create mode 100644 lib/zitadel/client/models/user_service_human_profile.rb create mode 100644 lib/zitadel/client/models/user_service_human_user.rb create mode 100644 lib/zitadel/client/models/user_service_i_d_p_information.rb create mode 100644 lib/zitadel/client/models/user_service_i_d_p_intent.rb create mode 100644 lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb create mode 100644 lib/zitadel/client/models/user_service_i_d_p_link.rb create mode 100644 lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb create mode 100644 lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb create mode 100644 lib/zitadel/client/models/user_service_in_user_emails_query.rb create mode 100644 lib/zitadel/client/models/user_service_in_user_i_d_query.rb create mode 100644 lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb create mode 100644 lib/zitadel/client/models/user_service_last_name_query.rb create mode 100644 lib/zitadel/client/models/user_service_list_authentication_factors_response.rb create mode 100644 lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb create mode 100644 lib/zitadel/client/models/user_service_list_details.rb create mode 100644 lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb create mode 100644 lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb create mode 100644 lib/zitadel/client/models/user_service_list_passkeys_response.rb create mode 100644 lib/zitadel/client/models/user_service_list_query.rb create mode 100644 lib/zitadel/client/models/user_service_list_users_request.rb create mode 100644 lib/zitadel/client/models/user_service_list_users_response.rb create mode 100644 lib/zitadel/client/models/user_service_lock_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_login_name_query.rb create mode 100644 lib/zitadel/client/models/user_service_machine_user.rb create mode 100644 lib/zitadel/client/models/user_service_nick_name_query.rb create mode 100644 lib/zitadel/client/models/user_service_not_query.rb create mode 100644 lib/zitadel/client/models/user_service_notification_type.rb create mode 100644 lib/zitadel/client/models/user_service_or_query.rb create mode 100644 lib/zitadel/client/models/user_service_organization.rb create mode 100644 lib/zitadel/client/models/user_service_organization_id_query.rb create mode 100644 lib/zitadel/client/models/user_service_passkey.rb create mode 100644 lib/zitadel/client/models/user_service_passkey_authenticator.rb create mode 100644 lib/zitadel/client/models/user_service_passkey_registration_code.rb create mode 100644 lib/zitadel/client/models/user_service_password.rb create mode 100644 lib/zitadel/client/models/user_service_password_reset_request.rb create mode 100644 lib/zitadel/client/models/user_service_password_reset_response.rb create mode 100644 lib/zitadel/client/models/user_service_phone_query.rb create mode 100644 lib/zitadel/client/models/user_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/user_service_reactivate_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_redirect_u_r_ls.rb create mode 100644 lib/zitadel/client/models/user_service_register_passkey_request.rb create mode 100644 lib/zitadel/client/models/user_service_register_passkey_response.rb create mode 100644 lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb create mode 100644 lib/zitadel/client/models/user_service_register_u2_f_request.rb create mode 100644 lib/zitadel/client/models/user_service_register_u2_f_response.rb create mode 100644 lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb create mode 100644 lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb create mode 100644 lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb create mode 100644 lib/zitadel/client/models/user_service_remove_passkey_response.rb create mode 100644 lib/zitadel/client/models/user_service_remove_phone_response.rb create mode 100644 lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb create mode 100644 lib/zitadel/client/models/user_service_remove_u2_f_response.rb create mode 100644 lib/zitadel/client/models/user_service_resend_email_code_request.rb create mode 100644 lib/zitadel/client/models/user_service_resend_email_code_response.rb create mode 100644 lib/zitadel/client/models/user_service_resend_invite_code_response.rb create mode 100644 lib/zitadel/client/models/user_service_resend_phone_code_request.rb create mode 100644 lib/zitadel/client/models/user_service_resend_phone_code_response.rb create mode 100644 lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb create mode 100644 lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb create mode 100644 lib/zitadel/client/models/user_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/user_service_search_query.rb create mode 100644 lib/zitadel/client/models/user_service_send_email_code_request.rb create mode 100644 lib/zitadel/client/models/user_service_send_email_code_response.rb create mode 100644 lib/zitadel/client/models/user_service_send_email_verification_code.rb create mode 100644 lib/zitadel/client/models/user_service_send_invite_code.rb create mode 100644 lib/zitadel/client/models/user_service_send_passkey_registration_link.rb create mode 100644 lib/zitadel/client/models/user_service_send_password_reset_link.rb create mode 100644 lib/zitadel/client/models/user_service_set_email_request.rb create mode 100644 lib/zitadel/client/models/user_service_set_email_response.rb create mode 100644 lib/zitadel/client/models/user_service_set_human_email.rb create mode 100644 lib/zitadel/client/models/user_service_set_human_phone.rb create mode 100644 lib/zitadel/client/models/user_service_set_human_profile.rb create mode 100644 lib/zitadel/client/models/user_service_set_metadata_entry.rb create mode 100644 lib/zitadel/client/models/user_service_set_password.rb create mode 100644 lib/zitadel/client/models/user_service_set_password_request.rb create mode 100644 lib/zitadel/client/models/user_service_set_password_response.rb create mode 100644 lib/zitadel/client/models/user_service_set_phone_request.rb create mode 100644 lib/zitadel/client/models/user_service_set_phone_response.rb create mode 100644 lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb create mode 100644 lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb create mode 100644 lib/zitadel/client/models/user_service_state_query.rb create mode 100644 lib/zitadel/client/models/user_service_text_query_method.rb create mode 100644 lib/zitadel/client/models/user_service_type.rb create mode 100644 lib/zitadel/client/models/user_service_type_query.rb create mode 100644 lib/zitadel/client/models/user_service_unlock_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_update_human_user_request.rb create mode 100644 lib/zitadel/client/models/user_service_update_human_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_user.rb create mode 100644 lib/zitadel/client/models/user_service_user_field_name.rb create mode 100644 lib/zitadel/client/models/user_service_user_name_query.rb create mode 100644 lib/zitadel/client/models/user_service_user_state.rb create mode 100644 lib/zitadel/client/models/user_service_verify_email_request.rb create mode 100644 lib/zitadel/client/models/user_service_verify_email_response.rb create mode 100644 lib/zitadel/client/models/user_service_verify_invite_code_request.rb create mode 100644 lib/zitadel/client/models/user_service_verify_invite_code_response.rb create mode 100644 lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb create mode 100644 lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb create mode 100644 lib/zitadel/client/models/user_service_verify_phone_request.rb create mode 100644 lib/zitadel/client/models/user_service_verify_phone_response.rb create mode 100644 lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb create mode 100644 lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb create mode 100644 lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb create mode 100644 lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_activate_web_key_response.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_create_web_key_response.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_delete_web_key_response.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a_curve.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_list_web_keys_response.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_r_s_a.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_r_s_a_bits.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_r_s_a_hasher.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_state.rb create mode 100644 lib/zitadel/client/models/web_key_service_beta_web_key.rb create mode 100644 lib/zitadel/client/models/web_key_service_create_web_key_request.rb create mode 100644 lib/zitadel/client/models/web_key_service_protobuf_any.rb create mode 100644 lib/zitadel/client/models/web_key_service_rpc_status.rb create mode 100644 lib/zitadel/client/models/zitadelobjectv2_organization.rb create mode 100644 lib/zitadel/client/models/zitadelorgv2_organization.rb diff --git a/lib/zitadel/client/api/action_service_api.rb b/lib/zitadel/client/api/action_service_api.rb new file mode 100644 index 00000000..87aaa3a1 --- /dev/null +++ b/lib/zitadel/client/api/action_service_api.rb @@ -0,0 +1,670 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class ActionServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [ActionServiceCreateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaCreateTargetResponse] + def action_service_create_target(action_service_create_target_request, opts = {}) + data, _status_code, _headers = action_service_create_target_with_http_info(action_service_create_target_request, opts) + data + end + + # 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 [ActionServiceCreateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaCreateTargetResponse, Integer, Hash)>] ActionServiceBetaCreateTargetResponse data, response status code and response headers + def action_service_create_target_with_http_info(action_service_create_target_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_create_target ...' # MODIFIED + end + # verify the required parameter 'action_service_create_target_request' is set + if @api_client.config.client_side_validation && action_service_create_target_request.nil? + fail ArgumentError, "Missing the required parameter 'action_service_create_target_request' when calling Api::ActionServiceApi.action_service_create_target" # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/targets' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(action_service_create_target_request) + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaCreateTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_create_target", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_create_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaDeleteTargetResponse] + def action_service_delete_target(id, opts = {}) + data, _status_code, _headers = action_service_delete_target_with_http_info(id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaDeleteTargetResponse, Integer, Hash)>] ActionServiceBetaDeleteTargetResponse data, response status code and response headers + def action_service_delete_target_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_delete_target ...' # MODIFIED + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling Api::ActionServiceApi.action_service_delete_target" # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/targets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaDeleteTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_delete_target", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_delete_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get Target + # Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaGetTargetResponse] + def action_service_get_target(id, opts = {}) + data, _status_code, _headers = action_service_get_target_with_http_info(id, opts) + data + end + + # Get Target + # Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaGetTargetResponse, Integer, Hash)>] ActionServiceBetaGetTargetResponse data, response status code and response headers + def action_service_get_target_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_get_target ...' # MODIFIED + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling Api::ActionServiceApi.action_service_get_target" # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/targets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaGetTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_get_target", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_get_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # List Execution Functions + # List all available functions which can be used as condition for executions. + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaListExecutionFunctionsResponse] + def action_service_list_execution_functions(opts = {}) + data, _status_code, _headers = action_service_list_execution_functions_with_http_info(opts) + data + end + + # List Execution Functions + # List all available functions which can be used as condition for executions. + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaListExecutionFunctionsResponse, Integer, Hash)>] ActionServiceBetaListExecutionFunctionsResponse data, response status code and response headers + def action_service_list_execution_functions_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_list_execution_functions ...' # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/executions/functions' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaListExecutionFunctionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_list_execution_functions", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_list_execution_functions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # List Execution Methods + # List all available methods which can be used as condition for executions. + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaListExecutionMethodsResponse] + def action_service_list_execution_methods(opts = {}) + data, _status_code, _headers = action_service_list_execution_methods_with_http_info(opts) + data + end + + # List Execution Methods + # List all available methods which can be used as condition for executions. + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaListExecutionMethodsResponse, Integer, Hash)>] ActionServiceBetaListExecutionMethodsResponse data, response status code and response headers + def action_service_list_execution_methods_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_list_execution_methods ...' # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/executions/methods' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaListExecutionMethodsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_list_execution_methods", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_list_execution_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # List Execution Services + # List all available services which can be used as condition for executions. + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaListExecutionServicesResponse] + def action_service_list_execution_services(opts = {}) + data, _status_code, _headers = action_service_list_execution_services_with_http_info(opts) + data + end + + # List Execution Services + # List all available services which can be used as condition for executions. + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaListExecutionServicesResponse, Integer, Hash)>] ActionServiceBetaListExecutionServicesResponse data, response status code and response headers + def action_service_list_execution_services_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_list_execution_services ...' # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/executions/services' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaListExecutionServicesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_list_execution_services", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_list_execution_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters + # @option opts [String] :pagination_offset Starting point for retrieval, in combination of offset used to query a set list of objects. + # @option opts [Integer] :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. + # @option opts [Boolean] :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. + # @option opts [String] :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. (default to 'EXECUTION_FIELD_NAME_UNSPECIFIED') + # @return [ActionServiceBetaListExecutionsResponse] + def action_service_list_executions(opts = {}) + data, _status_code, _headers = action_service_list_executions_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @option opts [String] :pagination_offset Starting point for retrieval, in combination of offset used to query a set list of objects. + # @option opts [Integer] :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. + # @option opts [Boolean] :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. + # @option opts [String] :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. (default to 'EXECUTION_FIELD_NAME_UNSPECIFIED') + # @return [Array<(ActionServiceBetaListExecutionsResponse, Integer, Hash)>] ActionServiceBetaListExecutionsResponse data, response status code and response headers + def action_service_list_executions_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_list_executions ...' # MODIFIED + end + allowable_values = ["EXECUTION_FIELD_NAME_UNSPECIFIED", "EXECUTION_FIELD_NAME_ID", "EXECUTION_FIELD_NAME_CREATED_DATE", "EXECUTION_FIELD_NAME_CHANGED_DATE"] + if @api_client.config.client_side_validation && opts[:'sorting_column'] && !allowable_values.include?(opts[:'sorting_column']) + fail ArgumentError, "invalid value for \"sorting_column\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/v2beta/actions/executions/_search' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'pagination.offset'] = opts[:'pagination_offset'] if !opts[:'pagination_offset'].nil? + query_params[:'pagination.limit'] = opts[:'pagination_limit'] if !opts[:'pagination_limit'].nil? + query_params[:'pagination.asc'] = opts[:'pagination_asc'] if !opts[:'pagination_asc'].nil? + query_params[:'sortingColumn'] = opts[:'sorting_column'] if !opts[:'sorting_column'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaListExecutionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_list_executions", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_list_executions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [ActionServiceListTargetsRequest] + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaListTargetsResponse] + def action_service_list_targets(action_service_list_targets_request, opts = {}) + data, _status_code, _headers = action_service_list_targets_with_http_info(action_service_list_targets_request, opts) + data + end + + # 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 [ActionServiceListTargetsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaListTargetsResponse, Integer, Hash)>] ActionServiceBetaListTargetsResponse data, response status code and response headers + def action_service_list_targets_with_http_info(action_service_list_targets_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_list_targets ...' # MODIFIED + end + # verify the required parameter 'action_service_list_targets_request' is set + if @api_client.config.client_side_validation && action_service_list_targets_request.nil? + fail ArgumentError, "Missing the required parameter 'action_service_list_targets_request' when calling Api::ActionServiceApi.action_service_list_targets" # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/targets/_search' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(action_service_list_targets_request) + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaListTargetsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_list_targets", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_list_targets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [ActionServiceSetExecutionRequest] + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaSetExecutionResponse] + def action_service_set_execution(action_service_set_execution_request, opts = {}) + data, _status_code, _headers = action_service_set_execution_with_http_info(action_service_set_execution_request, opts) + data + end + + # 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 [ActionServiceSetExecutionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaSetExecutionResponse, Integer, Hash)>] ActionServiceBetaSetExecutionResponse data, response status code and response headers + def action_service_set_execution_with_http_info(action_service_set_execution_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_set_execution ...' # MODIFIED + end + # verify the required parameter 'action_service_set_execution_request' is set + if @api_client.config.client_side_validation && action_service_set_execution_request.nil? + fail ArgumentError, "Missing the required parameter 'action_service_set_execution_request' when calling Api::ActionServiceApi.action_service_set_execution" # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/executions' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(action_service_set_execution_request) + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaSetExecutionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_set_execution", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_set_execution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param action_service_update_target_request [ActionServiceUpdateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [ActionServiceBetaUpdateTargetResponse] + def action_service_update_target(id, action_service_update_target_request, opts = {}) + data, _status_code, _headers = action_service_update_target_with_http_info(id, action_service_update_target_request, opts) + data + end + + # 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 [String] + # @param action_service_update_target_request [ActionServiceUpdateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ActionServiceBetaUpdateTargetResponse, Integer, Hash)>] ActionServiceBetaUpdateTargetResponse data, response status code and response headers + def action_service_update_target_with_http_info(id, action_service_update_target_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::ActionServiceApi.action_service_update_target ...' # MODIFIED + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling Api::ActionServiceApi.action_service_update_target" # MODIFIED + end + # verify the required parameter 'action_service_update_target_request' is set + if @api_client.config.client_side_validation && action_service_update_target_request.nil? + fail ArgumentError, "Missing the required parameter 'action_service_update_target_request' when calling Api::ActionServiceApi.action_service_update_target" # MODIFIED + end + # resource path + local_var_path = '/v2beta/actions/targets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(action_service_update_target_request) + + # return_type + return_type = opts[:debug_return_type] || 'ActionServiceBetaUpdateTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::ActionServiceApi.action_service_update_target", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::ActionServiceApi#action_service_update_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/feature_service_api.rb b/lib/zitadel/client/api/feature_service_api.rb new file mode 100644 index 00000000..196dc15e --- /dev/null +++ b/lib/zitadel/client/api/feature_service_api.rb @@ -0,0 +1,783 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class FeatureServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get Instance Features + # Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :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. + # @return [FeatureServiceGetInstanceFeaturesResponse] + def feature_service_get_instance_features(opts = {}) + data, _status_code, _headers = feature_service_get_instance_features_with_http_info(opts) + data + end + + # Get Instance Features + # Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :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. + # @return [Array<(FeatureServiceGetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceGetInstanceFeaturesResponse data, response status code and response headers + def feature_service_get_instance_features_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_instance_features ...' # MODIFIED + end + # resource path + local_var_path = '/v2/features/instance' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'inheritance'] = opts[:'inheritance'] if !opts[:'inheritance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceGetInstanceFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_get_instance_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :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. + # @return [FeatureServiceGetOrganizationFeaturesResponse] + def feature_service_get_organization_features(organization_id, opts = {}) + data, _status_code, _headers = feature_service_get_organization_features_with_http_info(organization_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :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. + # @return [Array<(FeatureServiceGetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceGetOrganizationFeaturesResponse data, response status code and response headers + def feature_service_get_organization_features_with_http_info(organization_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_organization_features ...' # MODIFIED + end + # verify the required parameter 'organization_id' is set + if @api_client.config.client_side_validation && organization_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_id' when calling Api::FeatureServiceApi.feature_service_get_organization_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/organization/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'inheritance'] = opts[:'inheritance'] if !opts[:'inheritance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceGetOrganizationFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_get_organization_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get System Features + # Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + # @param [Hash] opts the optional parameters + # @return [FeatureServiceGetSystemFeaturesResponse] + def feature_service_get_system_features(opts = {}) + data, _status_code, _headers = feature_service_get_system_features_with_http_info(opts) + data + end + + # Get System Features + # Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceGetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceGetSystemFeaturesResponse data, response status code and response headers + def feature_service_get_system_features_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_system_features ...' # MODIFIED + end + # resource path + local_var_path = '/v2/features/system' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceGetSystemFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_get_system_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :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. + # @return [FeatureServiceGetUserFeaturesResponse] + def feature_service_get_user_features(user_id, opts = {}) + data, _status_code, _headers = feature_service_get_user_features_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :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. + # @return [Array<(FeatureServiceGetUserFeaturesResponse, Integer, Hash)>] FeatureServiceGetUserFeaturesResponse data, response status code and response headers + def feature_service_get_user_features_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_get_user_features ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::FeatureServiceApi.feature_service_get_user_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/user/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'inheritance'] = opts[:'inheritance'] if !opts[:'inheritance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceGetUserFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_get_user_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_get_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Reset Instance Features + # Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetInstanceFeaturesResponse] + def feature_service_reset_instance_features(opts = {}) + data, _status_code, _headers = feature_service_reset_instance_features_with_http_info(opts) + data + end + + # Reset Instance Features + # Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceResetInstanceFeaturesResponse data, response status code and response headers + def feature_service_reset_instance_features_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_instance_features ...' # MODIFIED + end + # resource path + local_var_path = '/v2/features/instance' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceResetInstanceFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_reset_instance_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Reset Organization Features + # Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + # @param organization_id [String] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetOrganizationFeaturesResponse] + def feature_service_reset_organization_features(organization_id, opts = {}) + data, _status_code, _headers = feature_service_reset_organization_features_with_http_info(organization_id, opts) + data + end + + # Reset Organization Features + # Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + # @param organization_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceResetOrganizationFeaturesResponse data, response status code and response headers + def feature_service_reset_organization_features_with_http_info(organization_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_organization_features ...' # MODIFIED + end + # verify the required parameter 'organization_id' is set + if @api_client.config.client_side_validation && organization_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_id' when calling Api::FeatureServiceApi.feature_service_reset_organization_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/organization/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceResetOrganizationFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_reset_organization_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Reset System Features + # Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetSystemFeaturesResponse] + def feature_service_reset_system_features(opts = {}) + data, _status_code, _headers = feature_service_reset_system_features_with_http_info(opts) + data + end + + # Reset System Features + # Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceResetSystemFeaturesResponse data, response status code and response headers + def feature_service_reset_system_features_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_system_features ...' # MODIFIED + end + # resource path + local_var_path = '/v2/features/system' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceResetSystemFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_reset_system_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Reset User Features + # Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetUserFeaturesResponse] + def feature_service_reset_user_features(user_id, opts = {}) + data, _status_code, _headers = feature_service_reset_user_features_with_http_info(user_id, opts) + data + end + + # Reset User Features + # Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetUserFeaturesResponse, Integer, Hash)>] FeatureServiceResetUserFeaturesResponse data, response status code and response headers + def feature_service_reset_user_features_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_reset_user_features ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::FeatureServiceApi.feature_service_reset_user_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/user/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceResetUserFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_reset_user_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_reset_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [FeatureServiceSetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceSetInstanceFeaturesResponse] + def feature_service_set_instance_features(feature_service_set_instance_features_request, opts = {}) + data, _status_code, _headers = feature_service_set_instance_features_with_http_info(feature_service_set_instance_features_request, opts) + data + end + + # 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 [FeatureServiceSetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceSetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceSetInstanceFeaturesResponse data, response status code and response headers + def feature_service_set_instance_features_with_http_info(feature_service_set_instance_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_instance_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_set_instance_features_request' is set + if @api_client.config.client_side_validation && feature_service_set_instance_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_set_instance_features_request' when calling Api::FeatureServiceApi.feature_service_set_instance_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/instance' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(feature_service_set_instance_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceSetInstanceFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_set_instance_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceSetOrganizationFeaturesResponse] + def feature_service_set_organization_features(organization_id, opts = {}) + data, _status_code, _headers = feature_service_set_organization_features_with_http_info(organization_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceSetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceSetOrganizationFeaturesResponse data, response status code and response headers + def feature_service_set_organization_features_with_http_info(organization_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_organization_features ...' # MODIFIED + end + # verify the required parameter 'organization_id' is set + if @api_client.config.client_side_validation && organization_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_id' when calling Api::FeatureServiceApi.feature_service_set_organization_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/organization/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceSetOrganizationFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_set_organization_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [FeatureServiceSetSystemFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceSetSystemFeaturesResponse] + def feature_service_set_system_features(feature_service_set_system_features_request, opts = {}) + data, _status_code, _headers = feature_service_set_system_features_with_http_info(feature_service_set_system_features_request, opts) + data + end + + # 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 [FeatureServiceSetSystemFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceSetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceSetSystemFeaturesResponse data, response status code and response headers + def feature_service_set_system_features_with_http_info(feature_service_set_system_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_system_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_set_system_features_request' is set + if @api_client.config.client_side_validation && feature_service_set_system_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_set_system_features_request' when calling Api::FeatureServiceApi.feature_service_set_system_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/system' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(feature_service_set_system_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceSetSystemFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_set_system_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceSetUserFeaturesResponse] + def feature_service_set_user_features(user_id, opts = {}) + data, _status_code, _headers = feature_service_set_user_features_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceSetUserFeaturesResponse, Integer, Hash)>] FeatureServiceSetUserFeaturesResponse data, response status code and response headers + def feature_service_set_user_features_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.feature_service_set_user_features ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::FeatureServiceApi.feature_service_set_user_features" # MODIFIED + end + # resource path + local_var_path = '/v2/features/user/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FeatureServiceSetUserFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::FeatureServiceApi.feature_service_set_user_features", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#feature_service_set_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/identity_provider_service_api.rb b/lib/zitadel/client/api/identity_provider_service_api.rb new file mode 100644 index 00000000..422883f6 --- /dev/null +++ b/lib/zitadel/client/api/identity_provider_service_api.rb @@ -0,0 +1,85 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class IdentityProviderServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [IdentityProviderServiceGetIDPByIDResponse] + def identity_provider_service_get_idpby_id(id, opts = {}) + data, _status_code, _headers = identity_provider_service_get_idpby_id_with_http_info(id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(IdentityProviderServiceGetIDPByIDResponse, Integer, Hash)>] IdentityProviderServiceGetIDPByIDResponse data, response status code and response headers + def identity_provider_service_get_idpby_id_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::IdentityProviderServiceApi.identity_provider_service_get_idpby_id ...' # MODIFIED + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling Api::IdentityProviderServiceApi.identity_provider_service_get_idpby_id" # MODIFIED + end + # resource path + local_var_path = '/v2/idps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'IdentityProviderServiceGetIDPByIDResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::IdentityProviderServiceApi.identity_provider_service_get_idpby_id", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::IdentityProviderServiceApi#identity_provider_service_get_idpby_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/o_i_d_c_service_api.rb b/lib/zitadel/client/api/o_i_d_c_service_api.rb new file mode 100644 index 00000000..419e1e01 --- /dev/null +++ b/lib/zitadel/client/api/o_i_d_c_service_api.rb @@ -0,0 +1,296 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class OIDCServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Authorize or deny device authorization + # Authorize or deny the device authorization request based on the provided device authorization id. + # @param device_authorization_id [String] The device authorization id returned when submitting the user code. + # @param oidc_service_authorize_or_deny_device_authorization_request [OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest] + # @param [Hash] opts the optional parameters + # @return [Object] + def o_idc_service_authorize_or_deny_device_authorization(device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, opts = {}) + data, _status_code, _headers = o_idc_service_authorize_or_deny_device_authorization_with_http_info(device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, opts) + data + end + + # Authorize or deny device authorization + # Authorize or deny the device authorization request based on the provided device authorization id. + # @param device_authorization_id [String] The device authorization id returned when submitting the user code. + # @param oidc_service_authorize_or_deny_device_authorization_request [OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers + def o_idc_service_authorize_or_deny_device_authorization_with_http_info(device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization ...' # MODIFIED + end + # verify the required parameter 'device_authorization_id' is set + if @api_client.config.client_side_validation && device_authorization_id.nil? + fail ArgumentError, "Missing the required parameter 'device_authorization_id' when calling Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization" # MODIFIED + end + # verify the required parameter 'oidc_service_authorize_or_deny_device_authorization_request' is set + if @api_client.config.client_side_validation && oidc_service_authorize_or_deny_device_authorization_request.nil? + fail ArgumentError, "Missing the required parameter 'oidc_service_authorize_or_deny_device_authorization_request' when calling Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization" # MODIFIED + end + # resource path + local_var_path = '/v2/oidc/device_authorization/{deviceAuthorizationId}'.sub('{' + 'deviceAuthorizationId' + '}', CGI.escape(device_authorization_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(oidc_service_authorize_or_deny_device_authorization_request) + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::OIDCServiceApi.o_idc_service_authorize_or_deny_device_authorization", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_authorize_or_deny_device_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Finalize an Auth Request and get the callback URL. + # Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. + # @param auth_request_id [String] ID of the Auth Request. + # @param oidc_service_create_callback_request [OIDCServiceCreateCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [OIDCServiceCreateCallbackResponse] + def o_idc_service_create_callback(auth_request_id, oidc_service_create_callback_request, opts = {}) + data, _status_code, _headers = o_idc_service_create_callback_with_http_info(auth_request_id, oidc_service_create_callback_request, opts) + data + end + + # Finalize an Auth Request and get the callback URL. + # Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. + # @param auth_request_id [String] ID of the Auth Request. + # @param oidc_service_create_callback_request [OIDCServiceCreateCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(OIDCServiceCreateCallbackResponse, Integer, Hash)>] OIDCServiceCreateCallbackResponse data, response status code and response headers + def o_idc_service_create_callback_with_http_info(auth_request_id, oidc_service_create_callback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_create_callback ...' # MODIFIED + end + # verify the required parameter 'auth_request_id' is set + if @api_client.config.client_side_validation && auth_request_id.nil? + fail ArgumentError, "Missing the required parameter 'auth_request_id' when calling Api::OIDCServiceApi.o_idc_service_create_callback" # MODIFIED + end + # verify the required parameter 'oidc_service_create_callback_request' is set + if @api_client.config.client_side_validation && oidc_service_create_callback_request.nil? + fail ArgumentError, "Missing the required parameter 'oidc_service_create_callback_request' when calling Api::OIDCServiceApi.o_idc_service_create_callback" # MODIFIED + end + # resource path + local_var_path = '/v2/oidc/auth_requests/{authRequestId}'.sub('{' + 'authRequestId' + '}', CGI.escape(auth_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(oidc_service_create_callback_request) + + # return_type + return_type = opts[:debug_return_type] || 'OIDCServiceCreateCallbackResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::OIDCServiceApi.o_idc_service_create_callback", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_create_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get OIDC Auth Request details + # Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. + # @param auth_request_id [String] ID of the Auth Request, as obtained from the redirect URL. + # @param [Hash] opts the optional parameters + # @return [OIDCServiceGetAuthRequestResponse] + def o_idc_service_get_auth_request(auth_request_id, opts = {}) + data, _status_code, _headers = o_idc_service_get_auth_request_with_http_info(auth_request_id, opts) + data + end + + # Get OIDC Auth Request details + # Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. + # @param auth_request_id [String] ID of the Auth Request, as obtained from the redirect URL. + # @param [Hash] opts the optional parameters + # @return [Array<(OIDCServiceGetAuthRequestResponse, Integer, Hash)>] OIDCServiceGetAuthRequestResponse data, response status code and response headers + def o_idc_service_get_auth_request_with_http_info(auth_request_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_get_auth_request ...' # MODIFIED + end + # verify the required parameter 'auth_request_id' is set + if @api_client.config.client_side_validation && auth_request_id.nil? + fail ArgumentError, "Missing the required parameter 'auth_request_id' when calling Api::OIDCServiceApi.o_idc_service_get_auth_request" # MODIFIED + end + # resource path + local_var_path = '/v2/oidc/auth_requests/{authRequestId}'.sub('{' + 'authRequestId' + '}', CGI.escape(auth_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OIDCServiceGetAuthRequestResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::OIDCServiceApi.o_idc_service_get_auth_request", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_get_auth_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] The user_code returned by the device authorization request and provided to the user by the device. + # @param [Hash] opts the optional parameters + # @return [OIDCServiceGetDeviceAuthorizationRequestResponse] + def o_idc_service_get_device_authorization_request(user_code, opts = {}) + data, _status_code, _headers = o_idc_service_get_device_authorization_request_with_http_info(user_code, opts) + data + end + + # 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 [String] The user_code returned by the device authorization request and provided to the user by the device. + # @param [Hash] opts the optional parameters + # @return [Array<(OIDCServiceGetDeviceAuthorizationRequestResponse, Integer, Hash)>] OIDCServiceGetDeviceAuthorizationRequestResponse data, response status code and response headers + def o_idc_service_get_device_authorization_request_with_http_info(user_code, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.o_idc_service_get_device_authorization_request ...' # MODIFIED + end + # verify the required parameter 'user_code' is set + if @api_client.config.client_side_validation && user_code.nil? + fail ArgumentError, "Missing the required parameter 'user_code' when calling Api::OIDCServiceApi.o_idc_service_get_device_authorization_request" # MODIFIED + end + # resource path + local_var_path = '/v2/oidc/device_authorization/{userCode}'.sub('{' + 'userCode' + '}', CGI.escape(user_code.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OIDCServiceGetDeviceAuthorizationRequestResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::OIDCServiceApi.o_idc_service_get_device_authorization_request", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OIDCServiceApi#o_idc_service_get_device_authorization_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/organization_service_api.rb b/lib/zitadel/client/api/organization_service_api.rb new file mode 100644 index 00000000..4eac7354 --- /dev/null +++ b/lib/zitadel/client/api/organization_service_api.rb @@ -0,0 +1,158 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class OrganizationServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [OrganizationServiceAddOrganizationRequest] + # @param [Hash] opts the optional parameters + # @return [OrganizationServiceAddOrganizationResponse] + def organization_service_add_organization(organization_service_add_organization_request, opts = {}) + data, _status_code, _headers = organization_service_add_organization_with_http_info(organization_service_add_organization_request, opts) + data + end + + # 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 [OrganizationServiceAddOrganizationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(OrganizationServiceAddOrganizationResponse, Integer, Hash)>] OrganizationServiceAddOrganizationResponse data, response status code and response headers + def organization_service_add_organization_with_http_info(organization_service_add_organization_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OrganizationServiceApi.organization_service_add_organization ...' # MODIFIED + end + # verify the required parameter 'organization_service_add_organization_request' is set + if @api_client.config.client_side_validation && organization_service_add_organization_request.nil? + fail ArgumentError, "Missing the required parameter 'organization_service_add_organization_request' when calling Api::OrganizationServiceApi.organization_service_add_organization" # MODIFIED + end + # resource path + local_var_path = '/v2/organizations' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_service_add_organization_request) + + # return_type + return_type = opts[:debug_return_type] || 'OrganizationServiceAddOrganizationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::OrganizationServiceApi.organization_service_add_organization", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OrganizationServiceApi#organization_service_add_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [OrganizationServiceListOrganizationsRequest] + # @param [Hash] opts the optional parameters + # @return [OrganizationServiceListOrganizationsResponse] + def organization_service_list_organizations(organization_service_list_organizations_request, opts = {}) + data, _status_code, _headers = organization_service_list_organizations_with_http_info(organization_service_list_organizations_request, opts) + data + end + + # 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 [OrganizationServiceListOrganizationsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(OrganizationServiceListOrganizationsResponse, Integer, Hash)>] OrganizationServiceListOrganizationsResponse data, response status code and response headers + def organization_service_list_organizations_with_http_info(organization_service_list_organizations_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OrganizationServiceApi.organization_service_list_organizations ...' # MODIFIED + end + # verify the required parameter 'organization_service_list_organizations_request' is set + if @api_client.config.client_side_validation && organization_service_list_organizations_request.nil? + fail ArgumentError, "Missing the required parameter 'organization_service_list_organizations_request' when calling Api::OrganizationServiceApi.organization_service_list_organizations" # MODIFIED + end + # resource path + local_var_path = '/v2/organizations/_search' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_service_list_organizations_request) + + # return_type + return_type = opts[:debug_return_type] || 'OrganizationServiceListOrganizationsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::OrganizationServiceApi.organization_service_list_organizations", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OrganizationServiceApi#organization_service_list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/s_a_m_l_service_api.rb b/lib/zitadel/client/api/s_a_m_l_service_api.rb new file mode 100644 index 00000000..2b745b9e --- /dev/null +++ b/lib/zitadel/client/api/s_a_m_l_service_api.rb @@ -0,0 +1,159 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class SAMLServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Finalize a SAML Request and get the response. + # Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request. + # @param saml_request_id [String] ID of the SAML Request. + # @param saml_service_create_response_request [SAMLServiceCreateResponseRequest] + # @param [Hash] opts the optional parameters + # @return [SAMLServiceCreateResponseResponse] + def s_aml_service_create_response(saml_request_id, saml_service_create_response_request, opts = {}) + data, _status_code, _headers = s_aml_service_create_response_with_http_info(saml_request_id, saml_service_create_response_request, opts) + data + end + + # Finalize a SAML Request and get the response. + # Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request. + # @param saml_request_id [String] ID of the SAML Request. + # @param saml_service_create_response_request [SAMLServiceCreateResponseRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SAMLServiceCreateResponseResponse, Integer, Hash)>] SAMLServiceCreateResponseResponse data, response status code and response headers + def s_aml_service_create_response_with_http_info(saml_request_id, saml_service_create_response_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SAMLServiceApi.s_aml_service_create_response ...' # MODIFIED + end + # verify the required parameter 'saml_request_id' is set + if @api_client.config.client_side_validation && saml_request_id.nil? + fail ArgumentError, "Missing the required parameter 'saml_request_id' when calling Api::SAMLServiceApi.s_aml_service_create_response" # MODIFIED + end + # verify the required parameter 'saml_service_create_response_request' is set + if @api_client.config.client_side_validation && saml_service_create_response_request.nil? + fail ArgumentError, "Missing the required parameter 'saml_service_create_response_request' when calling Api::SAMLServiceApi.s_aml_service_create_response" # MODIFIED + end + # resource path + local_var_path = '/v2/saml/saml_requests/{samlRequestId}'.sub('{' + 'samlRequestId' + '}', CGI.escape(saml_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(saml_service_create_response_request) + + # return_type + return_type = opts[:debug_return_type] || 'SAMLServiceCreateResponseResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SAMLServiceApi.s_aml_service_create_response", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SAMLServiceApi#s_aml_service_create_response\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get SAML Request details + # Get SAML Request details by ID. Returns details that are parsed from the application's SAML Request. + # @param saml_request_id [String] ID of the SAML Request, as obtained from the redirect URL. + # @param [Hash] opts the optional parameters + # @return [SAMLServiceGetSAMLRequestResponse] + def s_aml_service_get_saml_request(saml_request_id, opts = {}) + data, _status_code, _headers = s_aml_service_get_saml_request_with_http_info(saml_request_id, opts) + data + end + + # Get SAML Request details + # Get SAML Request details by ID. Returns details that are parsed from the application's SAML Request. + # @param saml_request_id [String] ID of the SAML Request, as obtained from the redirect URL. + # @param [Hash] opts the optional parameters + # @return [Array<(SAMLServiceGetSAMLRequestResponse, Integer, Hash)>] SAMLServiceGetSAMLRequestResponse data, response status code and response headers + def s_aml_service_get_saml_request_with_http_info(saml_request_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SAMLServiceApi.s_aml_service_get_saml_request ...' # MODIFIED + end + # verify the required parameter 'saml_request_id' is set + if @api_client.config.client_side_validation && saml_request_id.nil? + fail ArgumentError, "Missing the required parameter 'saml_request_id' when calling Api::SAMLServiceApi.s_aml_service_get_saml_request" # MODIFIED + end + # resource path + local_var_path = '/v2/saml/saml_requests/{samlRequestId}'.sub('{' + 'samlRequestId' + '}', CGI.escape(saml_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SAMLServiceGetSAMLRequestResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SAMLServiceApi.s_aml_service_get_saml_request", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SAMLServiceApi#s_aml_service_get_saml_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/session_service_api.rb b/lib/zitadel/client/api/session_service_api.rb new file mode 100644 index 00000000..0e285a41 --- /dev/null +++ b/lib/zitadel/client/api/session_service_api.rb @@ -0,0 +1,372 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class SessionServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create a new session + # Create a new session. A token will be returned, which is required for further updates of the session. + # @param session_service_create_session_request [SessionServiceCreateSessionRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceCreateSessionResponse] + def session_service_create_session(session_service_create_session_request, opts = {}) + data, _status_code, _headers = session_service_create_session_with_http_info(session_service_create_session_request, opts) + data + end + + # Create a new session + # Create a new session. A token will be returned, which is required for further updates of the session. + # @param session_service_create_session_request [SessionServiceCreateSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SessionServiceCreateSessionResponse, Integer, Hash)>] SessionServiceCreateSessionResponse data, response status code and response headers + def session_service_create_session_with_http_info(session_service_create_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_create_session ...' # MODIFIED + end + # verify the required parameter 'session_service_create_session_request' is set + if @api_client.config.client_side_validation && session_service_create_session_request.nil? + fail ArgumentError, "Missing the required parameter 'session_service_create_session_request' when calling Api::SessionServiceApi.session_service_create_session" # MODIFIED + end + # resource path + local_var_path = '/v2/sessions' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_create_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'SessionServiceCreateSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SessionServiceApi.session_service_create_session", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Terminate an existing session + # Terminate your own session or if granted any other session. + # @param session_id [String] \"id of the session to terminate\" + # @param session_service_delete_session_request [SessionServiceDeleteSessionRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceDeleteSessionResponse] + def session_service_delete_session(session_id, session_service_delete_session_request, opts = {}) + data, _status_code, _headers = session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts) + data + end + + # Terminate an existing session + # Terminate your own session or if granted any other session. + # @param session_id [String] \"id of the session to terminate\" + # @param session_service_delete_session_request [SessionServiceDeleteSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SessionServiceDeleteSessionResponse, Integer, Hash)>] SessionServiceDeleteSessionResponse data, response status code and response headers + def session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_delete_session ...' # MODIFIED + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling Api::SessionServiceApi.session_service_delete_session" # MODIFIED + end + # verify the required parameter 'session_service_delete_session_request' is set + if @api_client.config.client_side_validation && session_service_delete_session_request.nil? + fail ArgumentError, "Missing the required parameter 'session_service_delete_session_request' when calling Api::SessionServiceApi.session_service_delete_session" # MODIFIED + end + # resource path + local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_delete_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'SessionServiceDeleteSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SessionServiceApi.session_service_delete_session", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_delete_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get a session + # Get a session and all its information like the time of the user or password verification + # @param session_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :session_token + # @return [SessionServiceGetSessionResponse] + def session_service_get_session(session_id, opts = {}) + data, _status_code, _headers = session_service_get_session_with_http_info(session_id, opts) + data + end + + # Get a session + # Get a session and all its information like the time of the user or password verification + # @param session_id [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :session_token + # @return [Array<(SessionServiceGetSessionResponse, Integer, Hash)>] SessionServiceGetSessionResponse data, response status code and response headers + def session_service_get_session_with_http_info(session_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_get_session ...' # MODIFIED + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling Api::SessionServiceApi.session_service_get_session" # MODIFIED + end + # resource path + local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sessionToken'] = opts[:'session_token'] if !opts[:'session_token'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SessionServiceGetSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SessionServiceApi.session_service_get_session", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Search sessions + # Search for sessions + # @param session_service_list_sessions_request [SessionServiceListSessionsRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceListSessionsResponse] + def session_service_list_sessions(session_service_list_sessions_request, opts = {}) + data, _status_code, _headers = session_service_list_sessions_with_http_info(session_service_list_sessions_request, opts) + data + end + + # Search sessions + # Search for sessions + # @param session_service_list_sessions_request [SessionServiceListSessionsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SessionServiceListSessionsResponse, Integer, Hash)>] SessionServiceListSessionsResponse data, response status code and response headers + def session_service_list_sessions_with_http_info(session_service_list_sessions_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_list_sessions ...' # MODIFIED + end + # verify the required parameter 'session_service_list_sessions_request' is set + if @api_client.config.client_side_validation && session_service_list_sessions_request.nil? + fail ArgumentError, "Missing the required parameter 'session_service_list_sessions_request' when calling Api::SessionServiceApi.session_service_list_sessions" # MODIFIED + end + # resource path + local_var_path = '/v2/sessions/search' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_list_sessions_request) + + # return_type + return_type = opts[:debug_return_type] || 'SessionServiceListSessionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SessionServiceApi.session_service_list_sessions", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Update an existing session + # Update an existing session with new information. + # @param session_id [String] \"id of the session to update\" + # @param session_service_set_session_request [SessionServiceSetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceSetSessionResponse] + def session_service_set_session(session_id, session_service_set_session_request, opts = {}) + data, _status_code, _headers = session_service_set_session_with_http_info(session_id, session_service_set_session_request, opts) + data + end + + # Update an existing session + # Update an existing session with new information. + # @param session_id [String] \"id of the session to update\" + # @param session_service_set_session_request [SessionServiceSetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SessionServiceSetSessionResponse, Integer, Hash)>] SessionServiceSetSessionResponse data, response status code and response headers + def session_service_set_session_with_http_info(session_id, session_service_set_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.session_service_set_session ...' # MODIFIED + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling Api::SessionServiceApi.session_service_set_session" # MODIFIED + end + # verify the required parameter 'session_service_set_session_request' is set + if @api_client.config.client_side_validation && session_service_set_session_request.nil? + fail ArgumentError, "Missing the required parameter 'session_service_set_session_request' when calling Api::SessionServiceApi.session_service_set_session" # MODIFIED + end + # resource path + local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_set_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'SessionServiceSetSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SessionServiceApi.session_service_set_session", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#session_service_set_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/settings_api.rb b/lib/zitadel/client/api/settings_api.rb new file mode 100644 index 00000000..68086a96 --- /dev/null +++ b/lib/zitadel/client/api/settings_api.rb @@ -0,0 +1,147 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class SettingsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get Security Settings + # Returns the security settings of the ZITADEL instance. + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetSecuritySettingsResponse] + def settings_service_get_security_settings(opts = {}) + data, _status_code, _headers = settings_service_get_security_settings_with_http_info(opts) + data + end + + # Get Security Settings + # Returns the security settings of the ZITADEL instance. + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetSecuritySettingsResponse, Integer, Hash)>] SettingsServiceGetSecuritySettingsResponse data, response status code and response headers + def settings_service_get_security_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsApi.settings_service_get_security_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/security' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetSecuritySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsApi.settings_service_get_security_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsApi#settings_service_get_security_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Set Security Settings + # Set the security settings of the ZITADEL instance. + # @param settings_service_set_security_settings_request [SettingsServiceSetSecuritySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceSetSecuritySettingsResponse] + def settings_service_set_security_settings(settings_service_set_security_settings_request, opts = {}) + data, _status_code, _headers = settings_service_set_security_settings_with_http_info(settings_service_set_security_settings_request, opts) + data + end + + # Set Security Settings + # Set the security settings of the ZITADEL instance. + # @param settings_service_set_security_settings_request [SettingsServiceSetSecuritySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceSetSecuritySettingsResponse, Integer, Hash)>] SettingsServiceSetSecuritySettingsResponse data, response status code and response headers + def settings_service_set_security_settings_with_http_info(settings_service_set_security_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsApi.settings_service_set_security_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_set_security_settings_request' is set + if @api_client.config.client_side_validation && settings_service_set_security_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_set_security_settings_request' when calling Api::SettingsApi.settings_service_set_security_settings" # MODIFIED + end + # resource path + local_var_path = '/v2/policies/security' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(settings_service_set_security_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceSetSecuritySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsApi.settings_service_set_security_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsApi#settings_service_set_security_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/settings_service_api.rb b/lib/zitadel/client/api/settings_service_api.rb new file mode 100644 index 00000000..09b902bd --- /dev/null +++ b/lib/zitadel/client/api/settings_service_api.rb @@ -0,0 +1,595 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class SettingsServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get the current active identity providers + # Return the current active identity providers for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @option opts [Boolean] :creation_allowed + # @option opts [Boolean] :linking_allowed + # @option opts [Boolean] :auto_creation + # @option opts [Boolean] :auto_linking + # @return [SettingsServiceGetActiveIdentityProvidersResponse] + def settings_service_get_active_identity_providers(opts = {}) + data, _status_code, _headers = settings_service_get_active_identity_providers_with_http_info(opts) + data + end + + # Get the current active identity providers + # Return the current active identity providers for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @option opts [Boolean] :creation_allowed + # @option opts [Boolean] :linking_allowed + # @option opts [Boolean] :auto_creation + # @option opts [Boolean] :auto_linking + # @return [Array<(SettingsServiceGetActiveIdentityProvidersResponse, Integer, Hash)>] SettingsServiceGetActiveIdentityProvidersResponse data, response status code and response headers + def settings_service_get_active_identity_providers_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_active_identity_providers ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/login/idps' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + query_params[:'creationAllowed'] = opts[:'creation_allowed'] if !opts[:'creation_allowed'].nil? + query_params[:'linkingAllowed'] = opts[:'linking_allowed'] if !opts[:'linking_allowed'].nil? + query_params[:'autoCreation'] = opts[:'auto_creation'] if !opts[:'auto_creation'].nil? + query_params[:'autoLinking'] = opts[:'auto_linking'] if !opts[:'auto_linking'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetActiveIdentityProvidersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_active_identity_providers", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_active_identity_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get the current active branding settings + # Return the current active branding settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [SettingsServiceGetBrandingSettingsResponse] + def settings_service_get_branding_settings(opts = {}) + data, _status_code, _headers = settings_service_get_branding_settings_with_http_info(opts) + data + end + + # Get the current active branding settings + # Return the current active branding settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [Array<(SettingsServiceGetBrandingSettingsResponse, Integer, Hash)>] SettingsServiceGetBrandingSettingsResponse data, response status code and response headers + def settings_service_get_branding_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_branding_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/branding' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetBrandingSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_branding_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_branding_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get the domain settings + # Return the domain settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [SettingsServiceGetDomainSettingsResponse] + def settings_service_get_domain_settings(opts = {}) + data, _status_code, _headers = settings_service_get_domain_settings_with_http_info(opts) + data + end + + # Get the domain settings + # Return the domain settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [Array<(SettingsServiceGetDomainSettingsResponse, Integer, Hash)>] SettingsServiceGetDomainSettingsResponse data, response status code and response headers + def settings_service_get_domain_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_domain_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/domain' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetDomainSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_domain_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_domain_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get basic information over the instance + # Return the basic information of the instance for the requested context + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetGeneralSettingsResponse] + def settings_service_get_general_settings(opts = {}) + data, _status_code, _headers = settings_service_get_general_settings_with_http_info(opts) + data + end + + # Get basic information over the instance + # Return the basic information of the instance for the requested context + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetGeneralSettingsResponse, Integer, Hash)>] SettingsServiceGetGeneralSettingsResponse data, response status code and response headers + def settings_service_get_general_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_general_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetGeneralSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_general_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_general_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get the legal and support settings + # Return the legal settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [SettingsServiceGetLegalAndSupportSettingsResponse] + def settings_service_get_legal_and_support_settings(opts = {}) + data, _status_code, _headers = settings_service_get_legal_and_support_settings_with_http_info(opts) + data + end + + # Get the legal and support settings + # Return the legal settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [Array<(SettingsServiceGetLegalAndSupportSettingsResponse, Integer, Hash)>] SettingsServiceGetLegalAndSupportSettingsResponse data, response status code and response headers + def settings_service_get_legal_and_support_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_legal_and_support_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/legal_support' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetLegalAndSupportSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_legal_and_support_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_legal_and_support_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get the lockout settings + # Return the lockout settings for the requested context, which define when a user will be locked + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [SettingsServiceGetLockoutSettingsResponse] + def settings_service_get_lockout_settings(opts = {}) + data, _status_code, _headers = settings_service_get_lockout_settings_with_http_info(opts) + data + end + + # Get the lockout settings + # Return the lockout settings for the requested context, which define when a user will be locked + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [Array<(SettingsServiceGetLockoutSettingsResponse, Integer, Hash)>] SettingsServiceGetLockoutSettingsResponse data, response status code and response headers + def settings_service_get_lockout_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_lockout_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/lockout' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetLockoutSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_lockout_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_lockout_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get the login settings + # Return the settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [SettingsServiceGetLoginSettingsResponse] + def settings_service_get_login_settings(opts = {}) + data, _status_code, _headers = settings_service_get_login_settings_with_http_info(opts) + data + end + + # Get the login settings + # Return the settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [Array<(SettingsServiceGetLoginSettingsResponse, Integer, Hash)>] SettingsServiceGetLoginSettingsResponse data, response status code and response headers + def settings_service_get_login_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_login_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/login' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetLoginSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_login_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_login_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get the password complexity settings + # Return the password complexity settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [SettingsServiceGetPasswordComplexitySettingsResponse] + def settings_service_get_password_complexity_settings(opts = {}) + data, _status_code, _headers = settings_service_get_password_complexity_settings_with_http_info(opts) + data + end + + # Get the password complexity settings + # Return the password complexity settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [Array<(SettingsServiceGetPasswordComplexitySettingsResponse, Integer, Hash)>] SettingsServiceGetPasswordComplexitySettingsResponse data, response status code and response headers + def settings_service_get_password_complexity_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_password_complexity_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/password/complexity' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetPasswordComplexitySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_password_complexity_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_password_complexity_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Get the password expiry settings + # Return the password expiry settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [SettingsServiceGetPasswordExpirySettingsResponse] + def settings_service_get_password_expiry_settings(opts = {}) + data, _status_code, _headers = settings_service_get_password_expiry_settings_with_http_info(opts) + data + end + + # Get the password expiry settings + # Return the password expiry settings for the requested context + # @param [Hash] opts the optional parameters + # @option opts [String] :ctx_org_id + # @option opts [Boolean] :ctx_instance + # @return [Array<(SettingsServiceGetPasswordExpirySettingsResponse, Integer, Hash)>] SettingsServiceGetPasswordExpirySettingsResponse data, response status code and response headers + def settings_service_get_password_expiry_settings_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.settings_service_get_password_expiry_settings ...' # MODIFIED + end + # resource path + local_var_path = '/v2/settings/password/expiry' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ctx.orgId'] = opts[:'ctx_org_id'] if !opts[:'ctx_org_id'].nil? + query_params[:'ctx.instance'] = opts[:'ctx_instance'] if !opts[:'ctx_instance'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SettingsServiceGetPasswordExpirySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::SettingsServiceApi.settings_service_get_password_expiry_settings", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#settings_service_get_password_expiry_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/user_service_api.rb b/lib/zitadel/client/api/user_service_api.rb new file mode 100644 index 00000000..9b0b94fe --- /dev/null +++ b/lib/zitadel/client/api/user_service_api.rb @@ -0,0 +1,3210 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class UserServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [UserServiceAddHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddHumanUserResponse] + def user_service_add_human_user(user_service_add_human_user_request, opts = {}) + data, _status_code, _headers = user_service_add_human_user_with_http_info(user_service_add_human_user_request, opts) + data + end + + # 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 [UserServiceAddHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceAddHumanUserResponse, Integer, Hash)>] UserServiceAddHumanUserResponse data, response status code and response headers + def user_service_add_human_user_with_http_info(user_service_add_human_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_human_user ...' # MODIFIED + end + # verify the required parameter 'user_service_add_human_user_request' is set + if @api_client.config.client_side_validation && user_service_add_human_user_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_add_human_user_request' when calling Api::UserServiceApi.user_service_add_human_user" # MODIFIED + end + # resource path + local_var_path = '/v2/users/human' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_add_human_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceAddHumanUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_add_human_user", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Add link to an identity provider to an user + # Add link to an identity provider to an user.. + # @param user_id [String] + # @param user_service_add_idp_link_request [UserServiceAddIDPLinkRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddIDPLinkResponse] + def user_service_add_idp_link(user_id, user_service_add_idp_link_request, opts = {}) + data, _status_code, _headers = user_service_add_idp_link_with_http_info(user_id, user_service_add_idp_link_request, opts) + data + end + + # Add link to an identity provider to an user + # Add link to an identity provider to an user.. + # @param user_id [String] + # @param user_service_add_idp_link_request [UserServiceAddIDPLinkRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceAddIDPLinkResponse, Integer, Hash)>] UserServiceAddIDPLinkResponse data, response status code and response headers + def user_service_add_idp_link_with_http_info(user_id, user_service_add_idp_link_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_idp_link ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_add_idp_link" # MODIFIED + end + # verify the required parameter 'user_service_add_idp_link_request' is set + if @api_client.config.client_side_validation && user_service_add_idp_link_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_add_idp_link_request' when calling Api::UserServiceApi.user_service_add_idp_link" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/links'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_add_idp_link_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceAddIDPLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_add_idp_link", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_idp_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddOTPEmailResponse] + def user_service_add_otp_email(user_id, opts = {}) + data, _status_code, _headers = user_service_add_otp_email_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceAddOTPEmailResponse, Integer, Hash)>] UserServiceAddOTPEmailResponse data, response status code and response headers + def user_service_add_otp_email_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_otp_email ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_add_otp_email" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/otp_email'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceAddOTPEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_add_otp_email", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddOTPSMSResponse] + def user_service_add_otpsms(user_id, opts = {}) + data, _status_code, _headers = user_service_add_otpsms_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceAddOTPSMSResponse, Integer, Hash)>] UserServiceAddOTPSMSResponse data, response status code and response headers + def user_service_add_otpsms_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_add_otpsms ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_add_otpsms" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/otp_sms'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceAddOTPSMSResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_add_otpsms", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_add_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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. + # @param user_id [String] + # @param user_service_create_invite_code_request [UserServiceCreateInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceCreateInviteCodeResponse] + def user_service_create_invite_code(user_id, user_service_create_invite_code_request, opts = {}) + data, _status_code, _headers = user_service_create_invite_code_with_http_info(user_id, user_service_create_invite_code_request, opts) + data + end + + # 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. + # @param user_id [String] + # @param user_service_create_invite_code_request [UserServiceCreateInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceCreateInviteCodeResponse, Integer, Hash)>] UserServiceCreateInviteCodeResponse data, response status code and response headers + def user_service_create_invite_code_with_http_info(user_id, user_service_create_invite_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_create_invite_code ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_create_invite_code" # MODIFIED + end + # verify the required parameter 'user_service_create_invite_code_request' is set + if @api_client.config.client_side_validation && user_service_create_invite_code_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_create_invite_code_request' when calling Api::UserServiceApi.user_service_create_invite_code" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/invite_code'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_create_invite_code_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceCreateInviteCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_create_invite_code", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_create_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param user_service_create_passkey_registration_link_request [UserServiceCreatePasskeyRegistrationLinkRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceCreatePasskeyRegistrationLinkResponse] + def user_service_create_passkey_registration_link(user_id, user_service_create_passkey_registration_link_request, opts = {}) + data, _status_code, _headers = user_service_create_passkey_registration_link_with_http_info(user_id, user_service_create_passkey_registration_link_request, opts) + data + end + + # 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 [String] + # @param user_service_create_passkey_registration_link_request [UserServiceCreatePasskeyRegistrationLinkRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceCreatePasskeyRegistrationLinkResponse, Integer, Hash)>] UserServiceCreatePasskeyRegistrationLinkResponse data, response status code and response headers + def user_service_create_passkey_registration_link_with_http_info(user_id, user_service_create_passkey_registration_link_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_create_passkey_registration_link ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_create_passkey_registration_link" # MODIFIED + end + # verify the required parameter 'user_service_create_passkey_registration_link_request' is set + if @api_client.config.client_side_validation && user_service_create_passkey_registration_link_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_create_passkey_registration_link_request' when calling Api::UserServiceApi.user_service_create_passkey_registration_link" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/passkeys/registration_link'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_create_passkey_registration_link_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceCreatePasskeyRegistrationLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_create_passkey_registration_link", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_create_passkey_registration_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceDeactivateUserResponse] + def user_service_deactivate_user(user_id, opts = {}) + data, _status_code, _headers = user_service_deactivate_user_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceDeactivateUserResponse, Integer, Hash)>] UserServiceDeactivateUserResponse data, response status code and response headers + def user_service_deactivate_user_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_deactivate_user ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_deactivate_user" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/deactivate'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceDeactivateUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_deactivate_user", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_deactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceDeleteUserResponse] + def user_service_delete_user(user_id, opts = {}) + data, _status_code, _headers = user_service_delete_user_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceDeleteUserResponse, Integer, Hash)>] UserServiceDeleteUserResponse data, response status code and response headers + def user_service_delete_user_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_delete_user ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_delete_user" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceDeleteUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_delete_user", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # User by ID + # Returns the full user object (human or machine) including the profile, email, etc.. + # @param user_id [String] User ID of the user you like to get. + # @param [Hash] opts the optional parameters + # @return [UserServiceGetUserByIDResponse] + def user_service_get_user_by_id(user_id, opts = {}) + data, _status_code, _headers = user_service_get_user_by_id_with_http_info(user_id, opts) + data + end + + # User by ID + # Returns the full user object (human or machine) including the profile, email, etc.. + # @param user_id [String] User ID of the user you like to get. + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceGetUserByIDResponse, Integer, Hash)>] UserServiceGetUserByIDResponse data, response status code and response headers + def user_service_get_user_by_id_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_get_user_by_id ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_get_user_by_id" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceGetUserByIDResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_get_user_by_id", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_get_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # MFA Init Skipped + # Update the last time the user has skipped MFA initialization. The server timestamp is used. + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceHumanMFAInitSkippedResponse] + def user_service_human_mfa_init_skipped(user_id, opts = {}) + data, _status_code, _headers = user_service_human_mfa_init_skipped_with_http_info(user_id, opts) + data + end + + # MFA Init Skipped + # Update the last time the user has skipped MFA initialization. The server timestamp is used. + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceHumanMFAInitSkippedResponse, Integer, Hash)>] UserServiceHumanMFAInitSkippedResponse data, response status code and response headers + def user_service_human_mfa_init_skipped_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_human_mfa_init_skipped ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_human_mfa_init_skipped" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/mfa_init_skipped'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceHumanMFAInitSkippedResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_human_mfa_init_skipped", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_human_mfa_init_skipped\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Array] :auth_factors Specify the Auth Factors you are interested in + # @option opts [Array] :states Specify the state of the Auth Factors + # @return [UserServiceListAuthenticationFactorsResponse] + def user_service_list_authentication_factors(user_id, opts = {}) + data, _status_code, _headers = user_service_list_authentication_factors_with_http_info(user_id, opts) + data + end + + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @option opts [Array] :auth_factors Specify the Auth Factors you are interested in + # @option opts [Array] :states Specify the state of the Auth Factors + # @return [Array<(UserServiceListAuthenticationFactorsResponse, Integer, Hash)>] UserServiceListAuthenticationFactorsResponse data, response status code and response headers + def user_service_list_authentication_factors_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_authentication_factors ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_authentication_factors" # MODIFIED + end + allowable_values = ["OTP", "OTP_SMS", "OTP_EMAIL", "U2F"] + if @api_client.config.client_side_validation && opts[:'auth_factors'] && !opts[:'auth_factors'].all? { |item| allowable_values.include?(item) } + fail ArgumentError, "invalid value for \"auth_factors\", must include one of #{allowable_values}" + end + allowable_values = ["AUTH_FACTOR_STATE_UNSPECIFIED", "AUTH_FACTOR_STATE_NOT_READY", "AUTH_FACTOR_STATE_READY", "AUTH_FACTOR_STATE_REMOVED"] + if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) } + fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}" + end + # resource path + local_var_path = '/v2/users/{userId}/authentication_factors/_search'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'authFactors'] = @api_client.build_collection_param(opts[:'auth_factors'], :csv) if !opts[:'auth_factors'].nil? + query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :csv) if !opts[:'states'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceListAuthenticationFactorsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_list_authentication_factors", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_authentication_factors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :domain_query_include_without_domain List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. + # @option opts [String] :domain_query_domain List only auth methods with specific domain. + # @return [UserServiceListAuthenticationMethodTypesResponse] + def user_service_list_authentication_method_types(user_id, opts = {}) + data, _status_code, _headers = user_service_list_authentication_method_types_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :domain_query_include_without_domain List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. + # @option opts [String] :domain_query_domain List only auth methods with specific domain. + # @return [Array<(UserServiceListAuthenticationMethodTypesResponse, Integer, Hash)>] UserServiceListAuthenticationMethodTypesResponse data, response status code and response headers + def user_service_list_authentication_method_types_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_authentication_method_types ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_authentication_method_types" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/authentication_methods'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'domainQuery.includeWithoutDomain'] = opts[:'domain_query_include_without_domain'] if !opts[:'domain_query_include_without_domain'].nil? + query_params[:'domainQuery.domain'] = opts[:'domain_query_domain'] if !opts[:'domain_query_domain'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceListAuthenticationMethodTypesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_list_authentication_method_types", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_authentication_method_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # List links to an identity provider of an user + # List links to an identity provider of an user. + # @param user_id [String] + # @param user_service_list_idp_links_request [UserServiceListIDPLinksRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceListIDPLinksResponse] + def user_service_list_idp_links(user_id, user_service_list_idp_links_request, opts = {}) + data, _status_code, _headers = user_service_list_idp_links_with_http_info(user_id, user_service_list_idp_links_request, opts) + data + end + + # List links to an identity provider of an user + # List links to an identity provider of an user. + # @param user_id [String] + # @param user_service_list_idp_links_request [UserServiceListIDPLinksRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceListIDPLinksResponse, Integer, Hash)>] UserServiceListIDPLinksResponse data, response status code and response headers + def user_service_list_idp_links_with_http_info(user_id, user_service_list_idp_links_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_idp_links ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_idp_links" # MODIFIED + end + # verify the required parameter 'user_service_list_idp_links_request' is set + if @api_client.config.client_side_validation && user_service_list_idp_links_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_list_idp_links_request' when calling Api::UserServiceApi.user_service_list_idp_links" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/links/_search'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_list_idp_links_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceListIDPLinksResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_list_idp_links", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_idp_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # List passkeys of an user + # List passkeys of an user + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceListPasskeysResponse] + def user_service_list_passkeys(user_id, opts = {}) + data, _status_code, _headers = user_service_list_passkeys_with_http_info(user_id, opts) + data + end + + # List passkeys of an user + # List passkeys of an user + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceListPasskeysResponse, Integer, Hash)>] UserServiceListPasskeysResponse data, response status code and response headers + def user_service_list_passkeys_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_passkeys ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_list_passkeys" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/passkeys/_search'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceListPasskeysResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_list_passkeys", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_passkeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [UserServiceListUsersRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceListUsersResponse] + def user_service_list_users(user_service_list_users_request, opts = {}) + data, _status_code, _headers = user_service_list_users_with_http_info(user_service_list_users_request, opts) + data + end + + # 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 [UserServiceListUsersRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceListUsersResponse, Integer, Hash)>] UserServiceListUsersResponse data, response status code and response headers + def user_service_list_users_with_http_info(user_service_list_users_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_list_users ...' # MODIFIED + end + # verify the required parameter 'user_service_list_users_request' is set + if @api_client.config.client_side_validation && user_service_list_users_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_list_users_request' when calling Api::UserServiceApi.user_service_list_users" # MODIFIED + end + # resource path + local_var_path = '/v2/users' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_list_users_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceListUsersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_list_users", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceLockUserResponse] + def user_service_lock_user(user_id, opts = {}) + data, _status_code, _headers = user_service_lock_user_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceLockUserResponse, Integer, Hash)>] UserServiceLockUserResponse data, response status code and response headers + def user_service_lock_user_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_lock_user ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_lock_user" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/lock'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceLockUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_lock_user", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_lock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Request a code to reset a password + # Request a code to reset a password.. + # @param user_id [String] + # @param user_service_password_reset_request [UserServicePasswordResetRequest] + # @param [Hash] opts the optional parameters + # @return [UserServicePasswordResetResponse] + def user_service_password_reset(user_id, user_service_password_reset_request, opts = {}) + data, _status_code, _headers = user_service_password_reset_with_http_info(user_id, user_service_password_reset_request, opts) + data + end + + # Request a code to reset a password + # Request a code to reset a password.. + # @param user_id [String] + # @param user_service_password_reset_request [UserServicePasswordResetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServicePasswordResetResponse, Integer, Hash)>] UserServicePasswordResetResponse data, response status code and response headers + def user_service_password_reset_with_http_info(user_id, user_service_password_reset_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_password_reset ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_password_reset" # MODIFIED + end + # verify the required parameter 'user_service_password_reset_request' is set + if @api_client.config.client_side_validation && user_service_password_reset_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_password_reset_request' when calling Api::UserServiceApi.user_service_password_reset" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/password_reset'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_password_reset_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServicePasswordResetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_password_reset", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceReactivateUserResponse] + def user_service_reactivate_user(user_id, opts = {}) + data, _status_code, _headers = user_service_reactivate_user_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceReactivateUserResponse, Integer, Hash)>] UserServiceReactivateUserResponse data, response status code and response headers + def user_service_reactivate_user_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_reactivate_user ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_reactivate_user" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/reactivate'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceReactivateUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_reactivate_user", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_reactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param user_service_register_passkey_request [UserServiceRegisterPasskeyRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRegisterPasskeyResponse] + def user_service_register_passkey(user_id, user_service_register_passkey_request, opts = {}) + data, _status_code, _headers = user_service_register_passkey_with_http_info(user_id, user_service_register_passkey_request, opts) + data + end + + # 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 [String] + # @param user_service_register_passkey_request [UserServiceRegisterPasskeyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRegisterPasskeyResponse, Integer, Hash)>] UserServiceRegisterPasskeyResponse data, response status code and response headers + def user_service_register_passkey_with_http_info(user_id, user_service_register_passkey_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_register_passkey ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_register_passkey" # MODIFIED + end + # verify the required parameter 'user_service_register_passkey_request' is set + if @api_client.config.client_side_validation && user_service_register_passkey_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_register_passkey_request' when calling Api::UserServiceApi.user_service_register_passkey" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/passkeys'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_register_passkey_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRegisterPasskeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_register_passkey", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_register_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRegisterTOTPResponse] + def user_service_register_totp(user_id, opts = {}) + data, _status_code, _headers = user_service_register_totp_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRegisterTOTPResponse, Integer, Hash)>] UserServiceRegisterTOTPResponse data, response status code and response headers + def user_service_register_totp_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_register_totp ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_register_totp" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/totp'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRegisterTOTPResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_register_totp", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_register_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param user_service_register_u2_f_request [UserServiceRegisterU2FRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRegisterU2FResponse] + def user_service_register_u2_f(user_id, user_service_register_u2_f_request, opts = {}) + data, _status_code, _headers = user_service_register_u2_f_with_http_info(user_id, user_service_register_u2_f_request, opts) + data + end + + # 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 [String] + # @param user_service_register_u2_f_request [UserServiceRegisterU2FRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRegisterU2FResponse, Integer, Hash)>] UserServiceRegisterU2FResponse data, response status code and response headers + def user_service_register_u2_f_with_http_info(user_id, user_service_register_u2_f_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_register_u2_f ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_register_u2_f" # MODIFIED + end + # verify the required parameter 'user_service_register_u2_f_request' is set + if @api_client.config.client_side_validation && user_service_register_u2_f_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_register_u2_f_request' when calling Api::UserServiceApi.user_service_register_u2_f" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/u2f'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_register_u2_f_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRegisterU2FResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_register_u2_f", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_register_u2_f\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Remove link of an identity provider to an user + # Remove link of an identity provider to an user. + # @param user_id [String] + # @param idp_id [String] + # @param linked_user_id [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveIDPLinkResponse] + def user_service_remove_idp_link(user_id, idp_id, linked_user_id, opts = {}) + data, _status_code, _headers = user_service_remove_idp_link_with_http_info(user_id, idp_id, linked_user_id, opts) + data + end + + # Remove link of an identity provider to an user + # Remove link of an identity provider to an user. + # @param user_id [String] + # @param idp_id [String] + # @param linked_user_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveIDPLinkResponse, Integer, Hash)>] UserServiceRemoveIDPLinkResponse data, response status code and response headers + def user_service_remove_idp_link_with_http_info(user_id, idp_id, linked_user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_idp_link ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_idp_link" # MODIFIED + end + # verify the required parameter 'idp_id' is set + if @api_client.config.client_side_validation && idp_id.nil? + fail ArgumentError, "Missing the required parameter 'idp_id' when calling Api::UserServiceApi.user_service_remove_idp_link" # MODIFIED + end + # verify the required parameter 'linked_user_id' is set + if @api_client.config.client_side_validation && linked_user_id.nil? + fail ArgumentError, "Missing the required parameter 'linked_user_id' when calling Api::UserServiceApi.user_service_remove_idp_link" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/links/{idpId}/{linkedUserId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'idpId' + '}', CGI.escape(idp_id.to_s)).sub('{' + 'linkedUserId' + '}', CGI.escape(linked_user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRemoveIDPLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_remove_idp_link", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_idp_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveOTPEmailResponse] + def user_service_remove_otp_email(user_id, opts = {}) + data, _status_code, _headers = user_service_remove_otp_email_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveOTPEmailResponse, Integer, Hash)>] UserServiceRemoveOTPEmailResponse data, response status code and response headers + def user_service_remove_otp_email_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_otp_email ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_otp_email" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/otp_email'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRemoveOTPEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_remove_otp_email", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveOTPSMSResponse] + def user_service_remove_otpsms(user_id, opts = {}) + data, _status_code, _headers = user_service_remove_otpsms_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveOTPSMSResponse, Integer, Hash)>] UserServiceRemoveOTPSMSResponse data, response status code and response headers + def user_service_remove_otpsms_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_otpsms ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_otpsms" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/otp_sms'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRemoveOTPSMSResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_remove_otpsms", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Remove passkey from a user + # Remove passkey from a user. + # @param user_id [String] + # @param passkey_id [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemovePasskeyResponse] + def user_service_remove_passkey(user_id, passkey_id, opts = {}) + data, _status_code, _headers = user_service_remove_passkey_with_http_info(user_id, passkey_id, opts) + data + end + + # Remove passkey from a user + # Remove passkey from a user. + # @param user_id [String] + # @param passkey_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemovePasskeyResponse, Integer, Hash)>] UserServiceRemovePasskeyResponse data, response status code and response headers + def user_service_remove_passkey_with_http_info(user_id, passkey_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_passkey ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_passkey" # MODIFIED + end + # verify the required parameter 'passkey_id' is set + if @api_client.config.client_side_validation && passkey_id.nil? + fail ArgumentError, "Missing the required parameter 'passkey_id' when calling Api::UserServiceApi.user_service_remove_passkey" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/passkeys/{passkeyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'passkeyId' + '}', CGI.escape(passkey_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRemovePasskeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_remove_passkey", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Delete the user phone + # Delete the phone number of a user. + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemovePhoneResponse] + def user_service_remove_phone(user_id, opts = {}) + data, _status_code, _headers = user_service_remove_phone_with_http_info(user_id, opts) + data + end + + # Delete the user phone + # Delete the phone number of a user. + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemovePhoneResponse, Integer, Hash)>] UserServiceRemovePhoneResponse data, response status code and response headers + def user_service_remove_phone_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_phone ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_phone" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/phone'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRemovePhoneResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_remove_phone", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveTOTPResponse] + def user_service_remove_totp(user_id, opts = {}) + data, _status_code, _headers = user_service_remove_totp_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveTOTPResponse, Integer, Hash)>] UserServiceRemoveTOTPResponse data, response status code and response headers + def user_service_remove_totp_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_totp ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_totp" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/totp'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRemoveTOTPResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_remove_totp", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Remove u2f token from a user + # Remove u2f token from a user + # @param user_id [String] + # @param u2f_id [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveU2FResponse] + def user_service_remove_u2_f(user_id, u2f_id, opts = {}) + data, _status_code, _headers = user_service_remove_u2_f_with_http_info(user_id, u2f_id, opts) + data + end + + # Remove u2f token from a user + # Remove u2f token from a user + # @param user_id [String] + # @param u2f_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveU2FResponse, Integer, Hash)>] UserServiceRemoveU2FResponse data, response status code and response headers + def user_service_remove_u2_f_with_http_info(user_id, u2f_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_remove_u2_f ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_remove_u2_f" # MODIFIED + end + # verify the required parameter 'u2f_id' is set + if @api_client.config.client_side_validation && u2f_id.nil? + fail ArgumentError, "Missing the required parameter 'u2f_id' when calling Api::UserServiceApi.user_service_remove_u2_f" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/u2f/{u2fId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'u2fId' + '}', CGI.escape(u2f_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRemoveU2FResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_remove_u2_f", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_remove_u2_f\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Resend code to verify user email + # Resend code to verify user email. + # @param user_id [String] + # @param user_service_resend_email_code_request [UserServiceResendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceResendEmailCodeResponse] + def user_service_resend_email_code(user_id, user_service_resend_email_code_request, opts = {}) + data, _status_code, _headers = user_service_resend_email_code_with_http_info(user_id, user_service_resend_email_code_request, opts) + data + end + + # Resend code to verify user email + # Resend code to verify user email. + # @param user_id [String] + # @param user_service_resend_email_code_request [UserServiceResendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceResendEmailCodeResponse, Integer, Hash)>] UserServiceResendEmailCodeResponse data, response status code and response headers + def user_service_resend_email_code_with_http_info(user_id, user_service_resend_email_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_resend_email_code ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_resend_email_code" # MODIFIED + end + # verify the required parameter 'user_service_resend_email_code_request' is set + if @api_client.config.client_side_validation && user_service_resend_email_code_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_resend_email_code_request' when calling Api::UserServiceApi.user_service_resend_email_code" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/email/resend'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_resend_email_code_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceResendEmailCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_resend_email_code", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_resend_email_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Resend an invite code for a user + # Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceResendInviteCodeResponse] + def user_service_resend_invite_code(user_id, opts = {}) + data, _status_code, _headers = user_service_resend_invite_code_with_http_info(user_id, opts) + data + end + + # Resend an invite code for a user + # Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. + # @param user_id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceResendInviteCodeResponse, Integer, Hash)>] UserServiceResendInviteCodeResponse data, response status code and response headers + def user_service_resend_invite_code_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_resend_invite_code ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_resend_invite_code" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/invite_code/resend'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceResendInviteCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_resend_invite_code", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_resend_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Resend code to verify user phone + # Resend code to verify user phone. + # @param user_id [String] + # @param user_service_resend_phone_code_request [UserServiceResendPhoneCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceResendPhoneCodeResponse] + def user_service_resend_phone_code(user_id, user_service_resend_phone_code_request, opts = {}) + data, _status_code, _headers = user_service_resend_phone_code_with_http_info(user_id, user_service_resend_phone_code_request, opts) + data + end + + # Resend code to verify user phone + # Resend code to verify user phone. + # @param user_id [String] + # @param user_service_resend_phone_code_request [UserServiceResendPhoneCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceResendPhoneCodeResponse, Integer, Hash)>] UserServiceResendPhoneCodeResponse data, response status code and response headers + def user_service_resend_phone_code_with_http_info(user_id, user_service_resend_phone_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_resend_phone_code ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_resend_phone_code" # MODIFIED + end + # verify the required parameter 'user_service_resend_phone_code_request' is set + if @api_client.config.client_side_validation && user_service_resend_phone_code_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_resend_phone_code_request' when calling Api::UserServiceApi.user_service_resend_phone_code" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/phone/resend'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_resend_phone_code_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceResendPhoneCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_resend_phone_code", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_resend_phone_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] ID of the idp intent, previously returned on the success response of the IDP callback + # @param user_service_retrieve_identity_provider_intent_request [UserServiceRetrieveIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRetrieveIdentityProviderIntentResponse] + def user_service_retrieve_identity_provider_intent(idp_intent_id, user_service_retrieve_identity_provider_intent_request, opts = {}) + data, _status_code, _headers = user_service_retrieve_identity_provider_intent_with_http_info(idp_intent_id, user_service_retrieve_identity_provider_intent_request, opts) + data + end + + # 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 [String] ID of the idp intent, previously returned on the success response of the IDP callback + # @param user_service_retrieve_identity_provider_intent_request [UserServiceRetrieveIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRetrieveIdentityProviderIntentResponse, Integer, Hash)>] UserServiceRetrieveIdentityProviderIntentResponse data, response status code and response headers + def user_service_retrieve_identity_provider_intent_with_http_info(idp_intent_id, user_service_retrieve_identity_provider_intent_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_retrieve_identity_provider_intent ...' # MODIFIED + end + # verify the required parameter 'idp_intent_id' is set + if @api_client.config.client_side_validation && idp_intent_id.nil? + fail ArgumentError, "Missing the required parameter 'idp_intent_id' when calling Api::UserServiceApi.user_service_retrieve_identity_provider_intent" # MODIFIED + end + # verify the required parameter 'user_service_retrieve_identity_provider_intent_request' is set + if @api_client.config.client_side_validation && user_service_retrieve_identity_provider_intent_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_retrieve_identity_provider_intent_request' when calling Api::UserServiceApi.user_service_retrieve_identity_provider_intent" # MODIFIED + end + # resource path + local_var_path = '/v2/idp_intents/{idpIntentId}'.sub('{' + 'idpIntentId' + '}', CGI.escape(idp_intent_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_retrieve_identity_provider_intent_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceRetrieveIdentityProviderIntentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_retrieve_identity_provider_intent", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_retrieve_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Send code to verify user email + # Send code to verify user email. + # @param user_id [String] + # @param user_service_send_email_code_request [UserServiceSendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSendEmailCodeResponse] + def user_service_send_email_code(user_id, user_service_send_email_code_request, opts = {}) + data, _status_code, _headers = user_service_send_email_code_with_http_info(user_id, user_service_send_email_code_request, opts) + data + end + + # Send code to verify user email + # Send code to verify user email. + # @param user_id [String] + # @param user_service_send_email_code_request [UserServiceSendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceSendEmailCodeResponse, Integer, Hash)>] UserServiceSendEmailCodeResponse data, response status code and response headers + def user_service_send_email_code_with_http_info(user_id, user_service_send_email_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_send_email_code ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_send_email_code" # MODIFIED + end + # verify the required parameter 'user_service_send_email_code_request' is set + if @api_client.config.client_side_validation && user_service_send_email_code_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_send_email_code_request' when calling Api::UserServiceApi.user_service_send_email_code" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/email/send'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_send_email_code_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceSendEmailCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_send_email_code", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_send_email_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param user_service_set_email_request [UserServiceSetEmailRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSetEmailResponse] + def user_service_set_email(user_id, user_service_set_email_request, opts = {}) + data, _status_code, _headers = user_service_set_email_with_http_info(user_id, user_service_set_email_request, opts) + data + end + + # 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 [String] + # @param user_service_set_email_request [UserServiceSetEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceSetEmailResponse, Integer, Hash)>] UserServiceSetEmailResponse data, response status code and response headers + def user_service_set_email_with_http_info(user_id, user_service_set_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_set_email ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_set_email" # MODIFIED + end + # verify the required parameter 'user_service_set_email_request' is set + if @api_client.config.client_side_validation && user_service_set_email_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_set_email_request' when calling Api::UserServiceApi.user_service_set_email" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/email'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_set_email_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceSetEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_set_email", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_set_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Change password + # Change the password of a user with either a verification code or the current password.. + # @param user_id [String] + # @param user_service_set_password_request [UserServiceSetPasswordRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSetPasswordResponse] + def user_service_set_password(user_id, user_service_set_password_request, opts = {}) + data, _status_code, _headers = user_service_set_password_with_http_info(user_id, user_service_set_password_request, opts) + data + end + + # Change password + # Change the password of a user with either a verification code or the current password.. + # @param user_id [String] + # @param user_service_set_password_request [UserServiceSetPasswordRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceSetPasswordResponse, Integer, Hash)>] UserServiceSetPasswordResponse data, response status code and response headers + def user_service_set_password_with_http_info(user_id, user_service_set_password_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_set_password ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_set_password" # MODIFIED + end + # verify the required parameter 'user_service_set_password_request' is set + if @api_client.config.client_side_validation && user_service_set_password_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_set_password_request' when calling Api::UserServiceApi.user_service_set_password" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/password'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_set_password_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceSetPasswordResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_set_password", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_set_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param user_service_set_phone_request [UserServiceSetPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSetPhoneResponse] + def user_service_set_phone(user_id, user_service_set_phone_request, opts = {}) + data, _status_code, _headers = user_service_set_phone_with_http_info(user_id, user_service_set_phone_request, opts) + data + end + + # 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 [String] + # @param user_service_set_phone_request [UserServiceSetPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceSetPhoneResponse, Integer, Hash)>] UserServiceSetPhoneResponse data, response status code and response headers + def user_service_set_phone_with_http_info(user_id, user_service_set_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_set_phone ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_set_phone" # MODIFIED + end + # verify the required parameter 'user_service_set_phone_request' is set + if @api_client.config.client_side_validation && user_service_set_phone_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_set_phone_request' when calling Api::UserServiceApi.user_service_set_phone" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/phone'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_set_phone_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceSetPhoneResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_set_phone", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_set_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [UserServiceStartIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceStartIdentityProviderIntentResponse] + def user_service_start_identity_provider_intent(user_service_start_identity_provider_intent_request, opts = {}) + data, _status_code, _headers = user_service_start_identity_provider_intent_with_http_info(user_service_start_identity_provider_intent_request, opts) + data + end + + # 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 [UserServiceStartIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceStartIdentityProviderIntentResponse, Integer, Hash)>] UserServiceStartIdentityProviderIntentResponse data, response status code and response headers + def user_service_start_identity_provider_intent_with_http_info(user_service_start_identity_provider_intent_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_start_identity_provider_intent ...' # MODIFIED + end + # verify the required parameter 'user_service_start_identity_provider_intent_request' is set + if @api_client.config.client_side_validation && user_service_start_identity_provider_intent_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_start_identity_provider_intent_request' when calling Api::UserServiceApi.user_service_start_identity_provider_intent" # MODIFIED + end + # resource path + local_var_path = '/v2/idp_intents' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_start_identity_provider_intent_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceStartIdentityProviderIntentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_start_identity_provider_intent", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_start_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [UserServiceUnlockUserResponse] + def user_service_unlock_user(user_id, opts = {}) + data, _status_code, _headers = user_service_unlock_user_with_http_info(user_id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceUnlockUserResponse, Integer, Hash)>] UserServiceUnlockUserResponse data, response status code and response headers + def user_service_unlock_user_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_unlock_user ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_unlock_user" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/unlock'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceUnlockUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_unlock_user", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_unlock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Update User + # Update all information from a user.. + # @param user_id [String] + # @param user_service_update_human_user_request [UserServiceUpdateHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceUpdateHumanUserResponse] + def user_service_update_human_user(user_id, user_service_update_human_user_request, opts = {}) + data, _status_code, _headers = user_service_update_human_user_with_http_info(user_id, user_service_update_human_user_request, opts) + data + end + + # Update User + # Update all information from a user.. + # @param user_id [String] + # @param user_service_update_human_user_request [UserServiceUpdateHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceUpdateHumanUserResponse, Integer, Hash)>] UserServiceUpdateHumanUserResponse data, response status code and response headers + def user_service_update_human_user_with_http_info(user_id, user_service_update_human_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_update_human_user ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_update_human_user" # MODIFIED + end + # verify the required parameter 'user_service_update_human_user_request' is set + if @api_client.config.client_side_validation && user_service_update_human_user_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_update_human_user_request' when calling Api::UserServiceApi.user_service_update_human_user" # MODIFIED + end + # resource path + local_var_path = '/v2/users/human/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_update_human_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceUpdateHumanUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_update_human_user", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_update_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Verify the email + # Verify the email with the generated code. + # @param user_id [String] + # @param user_service_verify_email_request [UserServiceVerifyEmailRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyEmailResponse] + def user_service_verify_email(user_id, user_service_verify_email_request, opts = {}) + data, _status_code, _headers = user_service_verify_email_with_http_info(user_id, user_service_verify_email_request, opts) + data + end + + # Verify the email + # Verify the email with the generated code. + # @param user_id [String] + # @param user_service_verify_email_request [UserServiceVerifyEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceVerifyEmailResponse, Integer, Hash)>] UserServiceVerifyEmailResponse data, response status code and response headers + def user_service_verify_email_with_http_info(user_id, user_service_verify_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_email ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_email" # MODIFIED + end + # verify the required parameter 'user_service_verify_email_request' is set + if @api_client.config.client_side_validation && user_service_verify_email_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_verify_email_request' when calling Api::UserServiceApi.user_service_verify_email" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/email/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_email_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceVerifyEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_verify_email", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param user_service_verify_invite_code_request [UserServiceVerifyInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyInviteCodeResponse] + def user_service_verify_invite_code(user_id, user_service_verify_invite_code_request, opts = {}) + data, _status_code, _headers = user_service_verify_invite_code_with_http_info(user_id, user_service_verify_invite_code_request, opts) + data + end + + # 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 [String] + # @param user_service_verify_invite_code_request [UserServiceVerifyInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceVerifyInviteCodeResponse, Integer, Hash)>] UserServiceVerifyInviteCodeResponse data, response status code and response headers + def user_service_verify_invite_code_with_http_info(user_id, user_service_verify_invite_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_invite_code ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_invite_code" # MODIFIED + end + # verify the required parameter 'user_service_verify_invite_code_request' is set + if @api_client.config.client_side_validation && user_service_verify_invite_code_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_verify_invite_code_request' when calling Api::UserServiceApi.user_service_verify_invite_code" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/invite_code/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_invite_code_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceVerifyInviteCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_verify_invite_code", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Verify a passkey for a user + # Verify the passkey registration with the public key credential.. + # @param user_id [String] + # @param passkey_id [String] + # @param user_service_verify_passkey_registration_request [UserServiceVerifyPasskeyRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyPasskeyRegistrationResponse] + def user_service_verify_passkey_registration(user_id, passkey_id, user_service_verify_passkey_registration_request, opts = {}) + data, _status_code, _headers = user_service_verify_passkey_registration_with_http_info(user_id, passkey_id, user_service_verify_passkey_registration_request, opts) + data + end + + # Verify a passkey for a user + # Verify the passkey registration with the public key credential.. + # @param user_id [String] + # @param passkey_id [String] + # @param user_service_verify_passkey_registration_request [UserServiceVerifyPasskeyRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceVerifyPasskeyRegistrationResponse, Integer, Hash)>] UserServiceVerifyPasskeyRegistrationResponse data, response status code and response headers + def user_service_verify_passkey_registration_with_http_info(user_id, passkey_id, user_service_verify_passkey_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_passkey_registration ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_passkey_registration" # MODIFIED + end + # verify the required parameter 'passkey_id' is set + if @api_client.config.client_side_validation && passkey_id.nil? + fail ArgumentError, "Missing the required parameter 'passkey_id' when calling Api::UserServiceApi.user_service_verify_passkey_registration" # MODIFIED + end + # verify the required parameter 'user_service_verify_passkey_registration_request' is set + if @api_client.config.client_side_validation && user_service_verify_passkey_registration_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_verify_passkey_registration_request' when calling Api::UserServiceApi.user_service_verify_passkey_registration" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/passkeys/{passkeyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'passkeyId' + '}', CGI.escape(passkey_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_passkey_registration_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceVerifyPasskeyRegistrationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_verify_passkey_registration", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_passkey_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Verify the phone + # Verify the phone with the generated code.. + # @param user_id [String] + # @param user_service_verify_phone_request [UserServiceVerifyPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyPhoneResponse] + def user_service_verify_phone(user_id, user_service_verify_phone_request, opts = {}) + data, _status_code, _headers = user_service_verify_phone_with_http_info(user_id, user_service_verify_phone_request, opts) + data + end + + # Verify the phone + # Verify the phone with the generated code.. + # @param user_id [String] + # @param user_service_verify_phone_request [UserServiceVerifyPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceVerifyPhoneResponse, Integer, Hash)>] UserServiceVerifyPhoneResponse data, response status code and response headers + def user_service_verify_phone_with_http_info(user_id, user_service_verify_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_phone ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_phone" # MODIFIED + end + # verify the required parameter 'user_service_verify_phone_request' is set + if @api_client.config.client_side_validation && user_service_verify_phone_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_verify_phone_request' when calling Api::UserServiceApi.user_service_verify_phone" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/phone/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_phone_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceVerifyPhoneResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_verify_phone", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Verify a TOTP generator for a user + # Verify the TOTP registration with a generated code.. + # @param user_id [String] + # @param user_service_verify_totp_registration_request [UserServiceVerifyTOTPRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyTOTPRegistrationResponse] + def user_service_verify_totp_registration(user_id, user_service_verify_totp_registration_request, opts = {}) + data, _status_code, _headers = user_service_verify_totp_registration_with_http_info(user_id, user_service_verify_totp_registration_request, opts) + data + end + + # Verify a TOTP generator for a user + # Verify the TOTP registration with a generated code.. + # @param user_id [String] + # @param user_service_verify_totp_registration_request [UserServiceVerifyTOTPRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceVerifyTOTPRegistrationResponse, Integer, Hash)>] UserServiceVerifyTOTPRegistrationResponse data, response status code and response headers + def user_service_verify_totp_registration_with_http_info(user_id, user_service_verify_totp_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_totp_registration ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_totp_registration" # MODIFIED + end + # verify the required parameter 'user_service_verify_totp_registration_request' is set + if @api_client.config.client_side_validation && user_service_verify_totp_registration_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_verify_totp_registration_request' when calling Api::UserServiceApi.user_service_verify_totp_registration" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/totp/verify'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_totp_registration_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceVerifyTOTPRegistrationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_verify_totp_registration", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_totp_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # Verify a u2f token for a user + # Verify the u2f token registration with the public key credential.. + # @param user_id [String] + # @param u2f_id [String] + # @param user_service_verify_u2_f_registration_request [UserServiceVerifyU2FRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyU2FRegistrationResponse] + def user_service_verify_u2_f_registration(user_id, u2f_id, user_service_verify_u2_f_registration_request, opts = {}) + data, _status_code, _headers = user_service_verify_u2_f_registration_with_http_info(user_id, u2f_id, user_service_verify_u2_f_registration_request, opts) + data + end + + # Verify a u2f token for a user + # Verify the u2f token registration with the public key credential.. + # @param user_id [String] + # @param u2f_id [String] + # @param user_service_verify_u2_f_registration_request [UserServiceVerifyU2FRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceVerifyU2FRegistrationResponse, Integer, Hash)>] UserServiceVerifyU2FRegistrationResponse data, response status code and response headers + def user_service_verify_u2_f_registration_with_http_info(user_id, u2f_id, user_service_verify_u2_f_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.user_service_verify_u2_f_registration ...' # MODIFIED + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling Api::UserServiceApi.user_service_verify_u2_f_registration" # MODIFIED + end + # verify the required parameter 'u2f_id' is set + if @api_client.config.client_side_validation && u2f_id.nil? + fail ArgumentError, "Missing the required parameter 'u2f_id' when calling Api::UserServiceApi.user_service_verify_u2_f_registration" # MODIFIED + end + # verify the required parameter 'user_service_verify_u2_f_registration_request' is set + if @api_client.config.client_side_validation && user_service_verify_u2_f_registration_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_verify_u2_f_registration_request' when calling Api::UserServiceApi.user_service_verify_u2_f_registration" # MODIFIED + end + # resource path + local_var_path = '/v2/users/{userId}/u2f/{u2fId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'u2fId' + '}', CGI.escape(u2f_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_service_verify_u2_f_registration_request) + + # return_type + return_type = opts[:debug_return_type] || 'UserServiceVerifyU2FRegistrationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::UserServiceApi.user_service_verify_u2_f_registration", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#user_service_verify_u2_f_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/api/web_key_service_api.rb b/lib/zitadel/client/api/web_key_service_api.rb new file mode 100644 index 00000000..d915ea69 --- /dev/null +++ b/lib/zitadel/client/api/web_key_service_api.rb @@ -0,0 +1,273 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'cgi' + +module Zitadel::Client::Api + class WebKeyServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [WebKeyServiceBetaActivateWebKeyResponse] + def web_key_service_activate_web_key(id, opts = {}) + data, _status_code, _headers = web_key_service_activate_web_key_with_http_info(id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(WebKeyServiceBetaActivateWebKeyResponse, Integer, Hash)>] WebKeyServiceBetaActivateWebKeyResponse data, response status code and response headers + def web_key_service_activate_web_key_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::WebKeyServiceApi.web_key_service_activate_web_key ...' # MODIFIED + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling Api::WebKeyServiceApi.web_key_service_activate_web_key" # MODIFIED + end + # resource path + local_var_path = '/v2beta/web_keys/{id}/activate'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'WebKeyServiceBetaActivateWebKeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::WebKeyServiceApi.web_key_service_activate_web_key", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::WebKeyServiceApi#web_key_service_activate_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [WebKeyServiceCreateWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [WebKeyServiceBetaCreateWebKeyResponse] + def web_key_service_create_web_key(web_key_service_create_web_key_request, opts = {}) + data, _status_code, _headers = web_key_service_create_web_key_with_http_info(web_key_service_create_web_key_request, opts) + data + end + + # 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 [WebKeyServiceCreateWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(WebKeyServiceBetaCreateWebKeyResponse, Integer, Hash)>] WebKeyServiceBetaCreateWebKeyResponse data, response status code and response headers + def web_key_service_create_web_key_with_http_info(web_key_service_create_web_key_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::WebKeyServiceApi.web_key_service_create_web_key ...' # MODIFIED + end + # verify the required parameter 'web_key_service_create_web_key_request' is set + if @api_client.config.client_side_validation && web_key_service_create_web_key_request.nil? + fail ArgumentError, "Missing the required parameter 'web_key_service_create_web_key_request' when calling Api::WebKeyServiceApi.web_key_service_create_web_key" # MODIFIED + end + # resource path + local_var_path = '/v2beta/web_keys' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(web_key_service_create_web_key_request) + + # return_type + return_type = opts[:debug_return_type] || 'WebKeyServiceBetaCreateWebKeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::WebKeyServiceApi.web_key_service_create_web_key", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::WebKeyServiceApi#web_key_service_create_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [WebKeyServiceBetaDeleteWebKeyResponse] + def web_key_service_delete_web_key(id, opts = {}) + data, _status_code, _headers = web_key_service_delete_web_key_with_http_info(id, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(WebKeyServiceBetaDeleteWebKeyResponse, Integer, Hash)>] WebKeyServiceBetaDeleteWebKeyResponse data, response status code and response headers + def web_key_service_delete_web_key_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::WebKeyServiceApi.web_key_service_delete_web_key ...' # MODIFIED + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling Api::WebKeyServiceApi.web_key_service_delete_web_key" # MODIFIED + end + # resource path + local_var_path = '/v2beta/web_keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'WebKeyServiceBetaDeleteWebKeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::WebKeyServiceApi.web_key_service_delete_web_key", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::WebKeyServiceApi#web_key_service_delete_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # List Web Keys + # List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + # @param [Hash] opts the optional parameters + # @return [WebKeyServiceBetaListWebKeysResponse] + def web_key_service_list_web_keys(opts = {}) + data, _status_code, _headers = web_key_service_list_web_keys_with_http_info(opts) + data + end + + # List Web Keys + # List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + # @param [Hash] opts the optional parameters + # @return [Array<(WebKeyServiceBetaListWebKeysResponse, Integer, Hash)>] WebKeyServiceBetaListWebKeysResponse data, response status code and response headers + def web_key_service_list_web_keys_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::WebKeyServiceApi.web_key_service_list_web_keys ...' # MODIFIED + end + # resource path + local_var_path = '/v2beta/web_keys' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'WebKeyServiceBetaListWebKeysResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::WebKeyServiceApi.web_key_service_list_web_keys", # MODIFIED + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::WebKeyServiceApi#web_key_service_list_web_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + end +end diff --git a/lib/zitadel/client/models/action_service_beta_condition.rb b/lib/zitadel/client/models/action_service_beta_condition.rb new file mode 100644 index 00000000..00189813 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_condition.rb @@ -0,0 +1,257 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaCondition + attr_accessor :request + + attr_accessor :response + + attr_accessor :function + + attr_accessor :event + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'request' => :'request', + :'response' => :'response', + :'function' => :'function', + :'event' => :'event' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'request' => :'ActionServiceBetaRequestExecution', + :'response' => :'ActionServiceBetaResponseExecution', + :'function' => :'ActionServiceBetaFunctionExecution', + :'event' => :'ActionServiceBetaEventExecution' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaCondition` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaCondition`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'request') + self.request = attributes[:'request'] + end + + if attributes.key?(:'response') + self.response = attributes[:'response'] + end + + if attributes.key?(:'function') + self.function = attributes[:'function'] + end + + if attributes.key?(:'event') + self.event = attributes[:'event'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + request == o.request && + response == o.response && + function == o.function && + event == o.event + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [request, response, function, event].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_create_target_response.rb b/lib/zitadel/client/models/action_service_beta_create_target_response.rb new file mode 100644 index 00000000..bd5ecf14 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_create_target_response.rb @@ -0,0 +1,251 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaCreateTargetResponse + # The unique identifier of the newly created target. + attr_accessor :id + + # The timestamp of the target creation. + attr_accessor :creation_date + + # Key used to sign and check payload sent to the target. + attr_accessor :signing_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'creation_date' => :'creationDate', + :'signing_key' => :'signingKey' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'creation_date' => :'Time', + :'signing_key' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaCreateTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaCreateTargetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'signing_key') + self.signing_key = attributes[:'signing_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + creation_date == o.creation_date && + signing_key == o.signing_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, creation_date, signing_key].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_delete_target_response.rb b/lib/zitadel/client/models/action_service_beta_delete_target_response.rb new file mode 100644 index 00000000..d86214ef --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_delete_target_response.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaDeleteTargetResponse + # 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. + attr_accessor :deletion_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deletion_date' => :'deletionDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'deletion_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaDeleteTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaDeleteTargetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deletion_date') + self.deletion_date = attributes[:'deletion_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deletion_date == o.deletion_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deletion_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_event_execution.rb b/lib/zitadel/client/models/action_service_beta_event_execution.rb new file mode 100644 index 00000000..b199abc7 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_event_execution.rb @@ -0,0 +1,307 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaEventExecution + # Event name as condition. + attr_accessor :event + + # Event group as condition, all events under this group. + attr_accessor :group + + # all events as condition. + attr_accessor :all + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'event' => :'event', + :'group' => :'group', + :'all' => :'all' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'event' => :'String', + :'group' => :'String', + :'all' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaEventExecution` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaEventExecution`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'event') + self.event = attributes[:'event'] + end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end + + if attributes.key?(:'all') + self.all = attributes[:'all'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@event.nil? && @event.to_s.length > 1000 + invalid_properties.push('invalid value for "event", the character length must be smaller than or equal to 1000.') + end + + if !@event.nil? && @event.to_s.length < 1 + invalid_properties.push('invalid value for "event", the character length must be great than or equal to 1.') + end + + if !@group.nil? && @group.to_s.length > 1000 + invalid_properties.push('invalid value for "group", the character length must be smaller than or equal to 1000.') + end + + if !@group.nil? && @group.to_s.length < 1 + invalid_properties.push('invalid value for "group", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@event.nil? && @event.to_s.length > 1000 + return false if !@event.nil? && @event.to_s.length < 1 + return false if !@group.nil? && @group.to_s.length > 1000 + return false if !@group.nil? && @group.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] event Value to be assigned + def event=(event) + if event.nil? + fail ArgumentError, 'event cannot be nil' + end + + if event.to_s.length > 1000 + fail ArgumentError, 'invalid value for "event", the character length must be smaller than or equal to 1000.' + end + + if event.to_s.length < 1 + fail ArgumentError, 'invalid value for "event", the character length must be great than or equal to 1.' + end + + @event = event + end + + # Custom attribute writer method with validation + # @param [Object] group Value to be assigned + def group=(group) + if group.nil? + fail ArgumentError, 'group cannot be nil' + end + + if group.to_s.length > 1000 + fail ArgumentError, 'invalid value for "group", the character length must be smaller than or equal to 1000.' + end + + if group.to_s.length < 1 + fail ArgumentError, 'invalid value for "group", the character length must be great than or equal to 1.' + end + + @group = group + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event == o.event && + group == o.group && + all == o.all + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [event, group, all].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_execution.rb b/lib/zitadel/client/models/action_service_beta_execution.rb new file mode 100644 index 00000000..42b6fc04 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_execution.rb @@ -0,0 +1,262 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaExecution + attr_accessor :condition + + # The timestamp of the execution creation. + attr_accessor :creation_date + + # The timestamp of the last change to the execution. + attr_accessor :change_date + + # Ordered list of targets/includes called during the execution. + attr_accessor :targets + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'condition' => :'condition', + :'creation_date' => :'creationDate', + :'change_date' => :'changeDate', + :'targets' => :'targets' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'condition' => :'ActionServiceBetaCondition', + :'creation_date' => :'Time', + :'change_date' => :'Time', + :'targets' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaExecution` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaExecution`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'targets') + if (value = attributes[:'targets']).is_a?(Array) + self.targets = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + condition == o.condition && + creation_date == o.creation_date && + change_date == o.change_date && + targets == o.targets + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [condition, creation_date, change_date, targets].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_execution_target_type.rb b/lib/zitadel/client/models/action_service_beta_execution_target_type.rb new file mode 100644 index 00000000..80c33ebc --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_execution_target_type.rb @@ -0,0 +1,240 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaExecutionTargetType + # Unique identifier of existing target to call. + attr_accessor :target + + attr_accessor :include + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target' => :'target', + :'include' => :'include' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'target' => :'String', + :'include' => :'ActionServiceBetaCondition' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaExecutionTargetType` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaExecutionTargetType`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + target == o.target && + include == o.include + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [target, include].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_function_execution.rb b/lib/zitadel/client/models/action_service_beta_function_execution.rb new file mode 100644 index 00000000..51c5e384 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_function_execution.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaFunctionExecution + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaFunctionExecution` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaFunctionExecution`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_get_target_response.rb b/lib/zitadel/client/models/action_service_beta_get_target_response.rb new file mode 100644 index 00000000..5e3227a9 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_get_target_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaGetTargetResponse + attr_accessor :target + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target' => :'target' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'target' => :'ActionServiceBetaTarget' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaGetTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaGetTargetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + target == o.target + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [target].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_in_target_i_ds_filter.rb b/lib/zitadel/client/models/action_service_beta_in_target_i_ds_filter.rb new file mode 100644 index 00000000..4522325d --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_in_target_i_ds_filter.rb @@ -0,0 +1,233 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaInTargetIDsFilter + # the ids of the targets to include + attr_accessor :target_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target_ids' => :'targetIds' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'target_ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaInTargetIDsFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaInTargetIDsFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'target_ids') + if (value = attributes[:'target_ids']).is_a?(Array) + self.target_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + target_ids == o.target_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [target_ids].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_list_execution_functions_response.rb b/lib/zitadel/client/models/action_service_beta_list_execution_functions_response.rb new file mode 100644 index 00000000..469086e5 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_list_execution_functions_response.rb @@ -0,0 +1,232 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaListExecutionFunctionsResponse + attr_accessor :functions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'functions' => :'functions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'functions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaListExecutionFunctionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaListExecutionFunctionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'functions') + if (value = attributes[:'functions']).is_a?(Array) + self.functions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + functions == o.functions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [functions].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_list_execution_methods_response.rb b/lib/zitadel/client/models/action_service_beta_list_execution_methods_response.rb new file mode 100644 index 00000000..3e6fb174 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_list_execution_methods_response.rb @@ -0,0 +1,232 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaListExecutionMethodsResponse + attr_accessor :methods + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'methods' => :'methods' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'methods' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaListExecutionMethodsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaListExecutionMethodsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'methods') + if (value = attributes[:'methods']).is_a?(Array) + self.methods = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + methods == o.methods + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [methods].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_list_execution_services_response.rb b/lib/zitadel/client/models/action_service_beta_list_execution_services_response.rb new file mode 100644 index 00000000..a00b995a --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_list_execution_services_response.rb @@ -0,0 +1,232 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaListExecutionServicesResponse + attr_accessor :services + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'services' => :'services' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'services' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaListExecutionServicesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaListExecutionServicesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'services') + if (value = attributes[:'services']).is_a?(Array) + self.services = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + services == o.services + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [services].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_list_executions_response.rb b/lib/zitadel/client/models/action_service_beta_list_executions_response.rb new file mode 100644 index 00000000..b8972fa2 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_list_executions_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaListExecutionsResponse + attr_accessor :pagination + + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pagination' => :'pagination', + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pagination' => :'ActionServiceBetaPaginationResponse', + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaListExecutionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaListExecutionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pagination') + self.pagination = attributes[:'pagination'] + end + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pagination == o.pagination && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pagination, result].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_list_targets_response.rb b/lib/zitadel/client/models/action_service_beta_list_targets_response.rb new file mode 100644 index 00000000..980c2bc0 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_list_targets_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaListTargetsResponse + attr_accessor :pagination + + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pagination' => :'pagination', + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pagination' => :'ActionServiceBetaPaginationResponse', + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaListTargetsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaListTargetsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pagination') + self.pagination = attributes[:'pagination'] + end + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pagination == o.pagination && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pagination, result].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_pagination_request.rb b/lib/zitadel/client/models/action_service_beta_pagination_request.rb new file mode 100644 index 00000000..c0c7142e --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_pagination_request.rb @@ -0,0 +1,251 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaPaginationRequest + # Starting point for retrieval, in combination of offset used to query a set list of objects. + attr_accessor :offset + + # 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. + attr_accessor :limit + + # Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. + attr_accessor :asc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'offset' => :'offset', + :'limit' => :'limit', + :'asc' => :'asc' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'offset' => :'String', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaPaginationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaPaginationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'asc') + self.asc = attributes[:'asc'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + offset == o.offset && + limit == o.limit && + asc == o.asc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [offset, limit, asc].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_pagination_response.rb b/lib/zitadel/client/models/action_service_beta_pagination_response.rb new file mode 100644 index 00000000..1cbd0f72 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_pagination_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaPaginationResponse + # Absolute number of objects matching the query, regardless of applied limit. + attr_accessor :total_result + + # Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned. + attr_accessor :applied_limit + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_result' => :'totalResult', + :'applied_limit' => :'appliedLimit' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total_result' => :'String', + :'applied_limit' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaPaginationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaPaginationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total_result') + self.total_result = attributes[:'total_result'] + end + + if attributes.key?(:'applied_limit') + self.applied_limit = attributes[:'applied_limit'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_result == o.total_result && + applied_limit == o.applied_limit + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total_result, applied_limit].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_r_e_s_t_call.rb b/lib/zitadel/client/models/action_service_beta_r_e_s_t_call.rb new file mode 100644 index 00000000..1e035b0b --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_r_e_s_t_call.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaRESTCall + # Define if any error stops the whole execution. By default the process continues as normal. + attr_accessor :interrupt_on_error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'interrupt_on_error' => :'interruptOnError' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'interrupt_on_error' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaRESTCall` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaRESTCall`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'interrupt_on_error') + self.interrupt_on_error = attributes[:'interrupt_on_error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + interrupt_on_error == o.interrupt_on_error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [interrupt_on_error].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_r_e_s_t_webhook.rb b/lib/zitadel/client/models/action_service_beta_r_e_s_t_webhook.rb new file mode 100644 index 00000000..b240b3ff --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_r_e_s_t_webhook.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaRESTWebhook + # Define if any error stops the whole execution. By default the process continues as normal. + attr_accessor :interrupt_on_error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'interrupt_on_error' => :'interruptOnError' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'interrupt_on_error' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaRESTWebhook` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaRESTWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'interrupt_on_error') + self.interrupt_on_error = attributes[:'interrupt_on_error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + interrupt_on_error == o.interrupt_on_error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [interrupt_on_error].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_request_execution.rb b/lib/zitadel/client/models/action_service_beta_request_execution.rb new file mode 100644 index 00000000..6ad3094d --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_request_execution.rb @@ -0,0 +1,307 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaRequestExecution + # GRPC-method as condition. + attr_accessor :method + + # GRPC-service as condition. + attr_accessor :service + + # All calls to any available services and methods as condition. + attr_accessor :all + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'method' => :'method', + :'service' => :'service', + :'all' => :'all' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'method' => :'String', + :'service' => :'String', + :'all' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaRequestExecution` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaRequestExecution`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'method') + self.method = attributes[:'method'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'all') + self.all = attributes[:'all'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@method.nil? && @method.to_s.length > 1000 + invalid_properties.push('invalid value for "method", the character length must be smaller than or equal to 1000.') + end + + if !@method.nil? && @method.to_s.length < 1 + invalid_properties.push('invalid value for "method", the character length must be great than or equal to 1.') + end + + if !@service.nil? && @service.to_s.length > 1000 + invalid_properties.push('invalid value for "service", the character length must be smaller than or equal to 1000.') + end + + if !@service.nil? && @service.to_s.length < 1 + invalid_properties.push('invalid value for "service", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@method.nil? && @method.to_s.length > 1000 + return false if !@method.nil? && @method.to_s.length < 1 + return false if !@service.nil? && @service.to_s.length > 1000 + return false if !@service.nil? && @service.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] method Value to be assigned + def method=(method) + if method.nil? + fail ArgumentError, 'method cannot be nil' + end + + if method.to_s.length > 1000 + fail ArgumentError, 'invalid value for "method", the character length must be smaller than or equal to 1000.' + end + + if method.to_s.length < 1 + fail ArgumentError, 'invalid value for "method", the character length must be great than or equal to 1.' + end + + @method = method + end + + # Custom attribute writer method with validation + # @param [Object] service Value to be assigned + def service=(service) + if service.nil? + fail ArgumentError, 'service cannot be nil' + end + + if service.to_s.length > 1000 + fail ArgumentError, 'invalid value for "service", the character length must be smaller than or equal to 1000.' + end + + if service.to_s.length < 1 + fail ArgumentError, 'invalid value for "service", the character length must be great than or equal to 1.' + end + + @service = service + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + method == o.method && + service == o.service && + all == o.all + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [method, service, all].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_response_execution.rb b/lib/zitadel/client/models/action_service_beta_response_execution.rb new file mode 100644 index 00000000..f360a029 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_response_execution.rb @@ -0,0 +1,307 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaResponseExecution + # GRPC-method as condition. + attr_accessor :method + + # GRPC-service as condition. + attr_accessor :service + + # All calls to any available services and methods as condition. + attr_accessor :all + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'method' => :'method', + :'service' => :'service', + :'all' => :'all' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'method' => :'String', + :'service' => :'String', + :'all' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaResponseExecution` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaResponseExecution`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'method') + self.method = attributes[:'method'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'all') + self.all = attributes[:'all'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@method.nil? && @method.to_s.length > 1000 + invalid_properties.push('invalid value for "method", the character length must be smaller than or equal to 1000.') + end + + if !@method.nil? && @method.to_s.length < 1 + invalid_properties.push('invalid value for "method", the character length must be great than or equal to 1.') + end + + if !@service.nil? && @service.to_s.length > 1000 + invalid_properties.push('invalid value for "service", the character length must be smaller than or equal to 1000.') + end + + if !@service.nil? && @service.to_s.length < 1 + invalid_properties.push('invalid value for "service", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@method.nil? && @method.to_s.length > 1000 + return false if !@method.nil? && @method.to_s.length < 1 + return false if !@service.nil? && @service.to_s.length > 1000 + return false if !@service.nil? && @service.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] method Value to be assigned + def method=(method) + if method.nil? + fail ArgumentError, 'method cannot be nil' + end + + if method.to_s.length > 1000 + fail ArgumentError, 'invalid value for "method", the character length must be smaller than or equal to 1000.' + end + + if method.to_s.length < 1 + fail ArgumentError, 'invalid value for "method", the character length must be great than or equal to 1.' + end + + @method = method + end + + # Custom attribute writer method with validation + # @param [Object] service Value to be assigned + def service=(service) + if service.nil? + fail ArgumentError, 'service cannot be nil' + end + + if service.to_s.length > 1000 + fail ArgumentError, 'invalid value for "service", the character length must be smaller than or equal to 1000.' + end + + if service.to_s.length < 1 + fail ArgumentError, 'invalid value for "service", the character length must be great than or equal to 1.' + end + + @service = service + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + method == o.method && + service == o.service && + all == o.all + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [method, service, all].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_set_execution_response.rb b/lib/zitadel/client/models/action_service_beta_set_execution_response.rb new file mode 100644 index 00000000..f1ce19ba --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_set_execution_response.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaSetExecutionResponse + # The timestamp of the execution set. + attr_accessor :set_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'set_date' => :'setDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'set_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaSetExecutionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaSetExecutionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'set_date') + self.set_date = attributes[:'set_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + set_date == o.set_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [set_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_target.rb b/lib/zitadel/client/models/action_service_beta_target.rb new file mode 100644 index 00000000..03d8a74a --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_target.rb @@ -0,0 +1,315 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaTarget + # The unique identifier of the target. + attr_accessor :id + + # The timestamp of the target creation. + attr_accessor :creation_date + + # The timestamp of the last change to the target (e.g. creation, activation, deactivation). + attr_accessor :change_date + + attr_accessor :name + + attr_accessor :rest_webhook + + attr_accessor :rest_call + + attr_accessor :rest_async + + # 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. + attr_accessor :timeout + + attr_accessor :endpoint + + attr_accessor :signing_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'creation_date' => :'creationDate', + :'change_date' => :'changeDate', + :'name' => :'name', + :'rest_webhook' => :'restWebhook', + :'rest_call' => :'restCall', + :'rest_async' => :'restAsync', + :'timeout' => :'timeout', + :'endpoint' => :'endpoint', + :'signing_key' => :'signingKey' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'creation_date' => :'Time', + :'change_date' => :'Time', + :'name' => :'String', + :'rest_webhook' => :'ActionServiceBetaRESTWebhook', + :'rest_call' => :'ActionServiceBetaRESTCall', + :'rest_async' => :'Object', + :'timeout' => :'String', + :'endpoint' => :'String', + :'signing_key' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaTarget` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaTarget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'rest_webhook') + self.rest_webhook = attributes[:'rest_webhook'] + end + + if attributes.key?(:'rest_call') + self.rest_call = attributes[:'rest_call'] + end + + if attributes.key?(:'rest_async') + self.rest_async = attributes[:'rest_async'] + end + + if attributes.key?(:'timeout') + self.timeout = attributes[:'timeout'] + end + + if attributes.key?(:'endpoint') + self.endpoint = attributes[:'endpoint'] + end + + if attributes.key?(:'signing_key') + self.signing_key = attributes[:'signing_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + creation_date == o.creation_date && + change_date == o.change_date && + name == o.name && + rest_webhook == o.rest_webhook && + rest_call == o.rest_call && + rest_async == o.rest_async && + timeout == o.timeout && + endpoint == o.endpoint && + signing_key == o.signing_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, creation_date, change_date, name, rest_webhook, rest_call, rest_async, timeout, endpoint, signing_key].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_target_field_name.rb b/lib/zitadel/client/models/action_service_beta_target_field_name.rb new file mode 100644 index 00000000..e2a98ce4 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_target_field_name.rb @@ -0,0 +1,48 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaTargetFieldName + TARGET_FIELD_NAME_UNSPECIFIED = "TARGET_FIELD_NAME_UNSPECIFIED".freeze + TARGET_FIELD_NAME_ID = "TARGET_FIELD_NAME_ID".freeze + TARGET_FIELD_NAME_CREATED_DATE = "TARGET_FIELD_NAME_CREATED_DATE".freeze + TARGET_FIELD_NAME_CHANGED_DATE = "TARGET_FIELD_NAME_CHANGED_DATE".freeze + TARGET_FIELD_NAME_NAME = "TARGET_FIELD_NAME_NAME".freeze + TARGET_FIELD_NAME_TARGET_TYPE = "TARGET_FIELD_NAME_TARGET_TYPE".freeze + TARGET_FIELD_NAME_URL = "TARGET_FIELD_NAME_URL".freeze + TARGET_FIELD_NAME_TIMEOUT = "TARGET_FIELD_NAME_TIMEOUT".freeze + TARGET_FIELD_NAME_INTERRUPT_ON_ERROR = "TARGET_FIELD_NAME_INTERRUPT_ON_ERROR".freeze + + def self.all_vars + @all_vars ||= [TARGET_FIELD_NAME_UNSPECIFIED, TARGET_FIELD_NAME_ID, TARGET_FIELD_NAME_CREATED_DATE, TARGET_FIELD_NAME_CHANGED_DATE, TARGET_FIELD_NAME_NAME, TARGET_FIELD_NAME_TARGET_TYPE, TARGET_FIELD_NAME_URL, TARGET_FIELD_NAME_TIMEOUT, TARGET_FIELD_NAME_INTERRUPT_ON_ERROR].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if ActionServiceBetaTargetFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::ActionServiceBetaTargetFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_target_name_filter.rb b/lib/zitadel/client/models/action_service_beta_target_name_filter.rb new file mode 100644 index 00000000..3b6d0565 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_target_name_filter.rb @@ -0,0 +1,283 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaTargetNameFilter + # Defines the name of the target to query for. + attr_accessor :target_name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target_name' => :'targetName', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'target_name' => :'String', + :'method' => :'ActionServiceBetaTextFilterMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaTargetNameFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaTargetNameFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'target_name') + self.target_name = attributes[:'target_name'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_FILTER_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@target_name.nil? && @target_name.to_s.length > 200 + invalid_properties.push('invalid value for "target_name", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@target_name.nil? && @target_name.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] target_name Value to be assigned + def target_name=(target_name) + if target_name.nil? + fail ArgumentError, 'target_name cannot be nil' + end + + if target_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "target_name", the character length must be smaller than or equal to 200.' + end + + @target_name = target_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + target_name == o.target_name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [target_name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_target_search_filter.rb b/lib/zitadel/client/models/action_service_beta_target_search_filter.rb new file mode 100644 index 00000000..5c7a9841 --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_target_search_filter.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaTargetSearchFilter + attr_accessor :target_name_filter + + attr_accessor :in_target_ids_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target_name_filter' => :'targetNameFilter', + :'in_target_ids_filter' => :'inTargetIdsFilter' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'target_name_filter' => :'ActionServiceBetaTargetNameFilter', + :'in_target_ids_filter' => :'ActionServiceBetaInTargetIDsFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaTargetSearchFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaTargetSearchFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'target_name_filter') + self.target_name_filter = attributes[:'target_name_filter'] + end + + if attributes.key?(:'in_target_ids_filter') + self.in_target_ids_filter = attributes[:'in_target_ids_filter'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + target_name_filter == o.target_name_filter && + in_target_ids_filter == o.in_target_ids_filter + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [target_name_filter, in_target_ids_filter].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_text_filter_method.rb b/lib/zitadel/client/models/action_service_beta_text_filter_method.rb new file mode 100644 index 00000000..e4dfe39c --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_text_filter_method.rb @@ -0,0 +1,47 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaTextFilterMethod + TEXT_FILTER_METHOD_EQUALS = "TEXT_FILTER_METHOD_EQUALS".freeze + TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE = "TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE".freeze + TEXT_FILTER_METHOD_STARTS_WITH = "TEXT_FILTER_METHOD_STARTS_WITH".freeze + TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE = "TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE".freeze + TEXT_FILTER_METHOD_CONTAINS = "TEXT_FILTER_METHOD_CONTAINS".freeze + TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE = "TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE".freeze + TEXT_FILTER_METHOD_ENDS_WITH = "TEXT_FILTER_METHOD_ENDS_WITH".freeze + TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE = "TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE".freeze + + def self.all_vars + @all_vars ||= [TEXT_FILTER_METHOD_EQUALS, TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE, TEXT_FILTER_METHOD_STARTS_WITH, TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_FILTER_METHOD_CONTAINS, TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE, TEXT_FILTER_METHOD_ENDS_WITH, TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if ActionServiceBetaTextFilterMethod.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::ActionServiceBetaTextFilterMethod" + end + end + +end diff --git a/lib/zitadel/client/models/action_service_beta_update_target_response.rb b/lib/zitadel/client/models/action_service_beta_update_target_response.rb new file mode 100644 index 00000000..5d92e82d --- /dev/null +++ b/lib/zitadel/client/models/action_service_beta_update_target_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceBetaUpdateTargetResponse + # The timestamp of the change of the target. + attr_accessor :change_date + + # Key used to sign and check payload sent to the target. + attr_accessor :signing_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'change_date' => :'changeDate', + :'signing_key' => :'signingKey' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'change_date' => :'Time', + :'signing_key' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceBetaUpdateTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceBetaUpdateTargetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'signing_key') + self.signing_key = attributes[:'signing_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + change_date == o.change_date && + signing_key == o.signing_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [change_date, signing_key].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_create_target_request.rb b/lib/zitadel/client/models/action_service_create_target_request.rb new file mode 100644 index 00000000..d546bb8c --- /dev/null +++ b/lib/zitadel/client/models/action_service_create_target_request.rb @@ -0,0 +1,332 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceCreateTargetRequest + attr_accessor :name + + attr_accessor :rest_webhook + + attr_accessor :rest_call + + attr_accessor :rest_async + + # 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. + attr_accessor :timeout + + attr_accessor :endpoint + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'rest_webhook' => :'restWebhook', + :'rest_call' => :'restCall', + :'rest_async' => :'restAsync', + :'timeout' => :'timeout', + :'endpoint' => :'endpoint' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'rest_webhook' => :'ActionServiceBetaRESTWebhook', + :'rest_call' => :'ActionServiceBetaRESTCall', + :'rest_async' => :'Object', + :'timeout' => :'String', + :'endpoint' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceCreateTargetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceCreateTargetRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'rest_webhook') + self.rest_webhook = attributes[:'rest_webhook'] + end + + if attributes.key?(:'rest_call') + self.rest_call = attributes[:'rest_call'] + end + + if attributes.key?(:'rest_async') + self.rest_async = attributes[:'rest_async'] + end + + if attributes.key?(:'timeout') + self.timeout = attributes[:'timeout'] + end + + if attributes.key?(:'endpoint') + self.endpoint = attributes[:'endpoint'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@name.nil? && @name.to_s.length > 1000 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 1000.') + end + + if !@name.nil? && @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + if !@endpoint.nil? && @endpoint.to_s.length > 1000 + invalid_properties.push('invalid value for "endpoint", the character length must be smaller than or equal to 1000.') + end + + if !@endpoint.nil? && @endpoint.to_s.length < 1 + invalid_properties.push('invalid value for "endpoint", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@name.nil? && @name.to_s.length > 1000 + return false if !@name.nil? && @name.to_s.length < 1 + return false if !@endpoint.nil? && @endpoint.to_s.length > 1000 + return false if !@endpoint.nil? && @endpoint.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 1000 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 1000.' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] endpoint Value to be assigned + def endpoint=(endpoint) + if endpoint.nil? + fail ArgumentError, 'endpoint cannot be nil' + end + + if endpoint.to_s.length > 1000 + fail ArgumentError, 'invalid value for "endpoint", the character length must be smaller than or equal to 1000.' + end + + if endpoint.to_s.length < 1 + fail ArgumentError, 'invalid value for "endpoint", the character length must be great than or equal to 1.' + end + + @endpoint = endpoint + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + rest_webhook == o.rest_webhook && + rest_call == o.rest_call && + rest_async == o.rest_async && + timeout == o.timeout && + endpoint == o.endpoint + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, rest_webhook, rest_call, rest_async, timeout, endpoint].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_list_targets_request.rb b/lib/zitadel/client/models/action_service_list_targets_request.rb new file mode 100644 index 00000000..bfd900d3 --- /dev/null +++ b/lib/zitadel/client/models/action_service_list_targets_request.rb @@ -0,0 +1,275 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceListTargetsRequest + attr_accessor :pagination + + attr_accessor :sorting_column + + # Define the criteria to query for. + attr_accessor :filters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pagination' => :'pagination', + :'sorting_column' => :'sortingColumn', + :'filters' => :'filters' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pagination' => :'ActionServiceBetaPaginationRequest', + :'sorting_column' => :'ActionServiceBetaTargetFieldName', + :'filters' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceListTargetsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceListTargetsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pagination') + self.pagination = attributes[:'pagination'] + end + + if attributes.key?(:'sorting_column') + self.sorting_column = attributes[:'sorting_column'] + else + self.sorting_column = 'TARGET_FIELD_NAME_UNSPECIFIED' + end + + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pagination == o.pagination && + sorting_column == o.sorting_column && + filters == o.filters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pagination, sorting_column, filters].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_protobuf_any.rb b/lib/zitadel/client/models/action_service_protobuf_any.rb new file mode 100644 index 00000000..6d6c2ac2 --- /dev/null +++ b/lib/zitadel/client/models/action_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_rpc_status.rb b/lib/zitadel/client/models/action_service_rpc_status.rb new file mode 100644 index 00000000..869834b9 --- /dev/null +++ b/lib/zitadel/client/models/action_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_set_execution_request.rb b/lib/zitadel/client/models/action_service_set_execution_request.rb new file mode 100644 index 00000000..ce93f48d --- /dev/null +++ b/lib/zitadel/client/models/action_service_set_execution_request.rb @@ -0,0 +1,242 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceSetExecutionRequest + attr_accessor :condition + + # Ordered list of targets/includes called during the execution. + attr_accessor :targets + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'condition' => :'condition', + :'targets' => :'targets' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'condition' => :'ActionServiceBetaCondition', + :'targets' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceSetExecutionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceSetExecutionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'targets') + if (value = attributes[:'targets']).is_a?(Array) + self.targets = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + condition == o.condition && + targets == o.targets + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [condition, targets].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/action_service_update_target_request.rb b/lib/zitadel/client/models/action_service_update_target_request.rb new file mode 100644 index 00000000..efec5a09 --- /dev/null +++ b/lib/zitadel/client/models/action_service_update_target_request.rb @@ -0,0 +1,342 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ActionServiceUpdateTargetRequest + attr_accessor :name + + attr_accessor :rest_webhook + + attr_accessor :rest_call + + attr_accessor :rest_async + + # 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. + attr_accessor :timeout + + attr_accessor :endpoint + + # 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. + attr_accessor :expiration_signing_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'rest_webhook' => :'restWebhook', + :'rest_call' => :'restCall', + :'rest_async' => :'restAsync', + :'timeout' => :'timeout', + :'endpoint' => :'endpoint', + :'expiration_signing_key' => :'expirationSigningKey' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'rest_webhook' => :'ActionServiceBetaRESTWebhook', + :'rest_call' => :'ActionServiceBetaRESTCall', + :'rest_async' => :'Object', + :'timeout' => :'String', + :'endpoint' => :'String', + :'expiration_signing_key' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ActionServiceUpdateTargetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ActionServiceUpdateTargetRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'rest_webhook') + self.rest_webhook = attributes[:'rest_webhook'] + end + + if attributes.key?(:'rest_call') + self.rest_call = attributes[:'rest_call'] + end + + if attributes.key?(:'rest_async') + self.rest_async = attributes[:'rest_async'] + end + + if attributes.key?(:'timeout') + self.timeout = attributes[:'timeout'] + end + + if attributes.key?(:'endpoint') + self.endpoint = attributes[:'endpoint'] + end + + if attributes.key?(:'expiration_signing_key') + self.expiration_signing_key = attributes[:'expiration_signing_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@name.nil? && @name.to_s.length > 1000 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 1000.') + end + + if !@name.nil? && @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + if !@endpoint.nil? && @endpoint.to_s.length > 1000 + invalid_properties.push('invalid value for "endpoint", the character length must be smaller than or equal to 1000.') + end + + if !@endpoint.nil? && @endpoint.to_s.length < 1 + invalid_properties.push('invalid value for "endpoint", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@name.nil? && @name.to_s.length > 1000 + return false if !@name.nil? && @name.to_s.length < 1 + return false if !@endpoint.nil? && @endpoint.to_s.length > 1000 + return false if !@endpoint.nil? && @endpoint.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 1000 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 1000.' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] endpoint Value to be assigned + def endpoint=(endpoint) + if endpoint.nil? + fail ArgumentError, 'endpoint cannot be nil' + end + + if endpoint.to_s.length > 1000 + fail ArgumentError, 'invalid value for "endpoint", the character length must be smaller than or equal to 1000.' + end + + if endpoint.to_s.length < 1 + fail ArgumentError, 'invalid value for "endpoint", the character length must be great than or equal to 1.' + end + + @endpoint = endpoint + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + rest_webhook == o.rest_webhook && + rest_call == o.rest_call && + rest_async == o.rest_async && + timeout == o.timeout && + endpoint == o.endpoint && + expiration_signing_key == o.expiration_signing_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, rest_webhook, rest_call, rest_async, timeout, endpoint, expiration_signing_key].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_details.rb b/lib/zitadel/client/models/feature_service_details.rb new file mode 100644 index 00000000..fb5b596a --- /dev/null +++ b/lib/zitadel/client/models/feature_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_feature_flag.rb b/lib/zitadel/client/models/feature_service_feature_flag.rb new file mode 100644 index 00000000..dbbaef8b --- /dev/null +++ b/lib/zitadel/client/models/feature_service_feature_flag.rb @@ -0,0 +1,265 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # FeatureFlag is a simple boolean Feature setting, without further payload. + class FeatureServiceFeatureFlag + # Whether a feature is enabled. + attr_accessor :enabled + + attr_accessor :source + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enabled' => :'enabled', + :'source' => :'source' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'enabled' => :'Boolean', + :'source' => :'FeatureServiceSource' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceFeatureFlag` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceFeatureFlag`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = 'SOURCE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + source == o.source + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enabled, source].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_get_instance_features_response.rb b/lib/zitadel/client/models/feature_service_get_instance_features_response.rb new file mode 100644 index 00000000..e2664c66 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_instance_features_response.rb @@ -0,0 +1,365 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceGetInstanceFeaturesResponse + attr_accessor :details + + attr_accessor :login_default_org + + attr_accessor :oidc_trigger_introspection_projections + + attr_accessor :oidc_legacy_introspection + + attr_accessor :user_schema + + attr_accessor :oidc_token_exchange + + attr_accessor :actions + + attr_accessor :improved_performance + + attr_accessor :web_key + + attr_accessor :debug_oidc_parent_error + + attr_accessor :oidc_single_v1_session_termination + + attr_accessor :disable_user_token_event + + attr_accessor :enable_back_channel_logout + + attr_accessor :login_v2 + + attr_accessor :permission_check_v2 + + attr_accessor :console_use_v2_user_api + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'login_default_org' => :'loginDefaultOrg', + :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', + :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', + :'user_schema' => :'userSchema', + :'oidc_token_exchange' => :'oidcTokenExchange', + :'actions' => :'actions', + :'improved_performance' => :'improvedPerformance', + :'web_key' => :'webKey', + :'debug_oidc_parent_error' => :'debugOidcParentError', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', + :'disable_user_token_event' => :'disableUserTokenEvent', + :'enable_back_channel_logout' => :'enableBackChannelLogout', + :'login_v2' => :'loginV2', + :'permission_check_v2' => :'permissionCheckV2', + :'console_use_v2_user_api' => :'consoleUseV2UserApi' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails', + :'login_default_org' => :'FeatureServiceFeatureFlag', + :'oidc_trigger_introspection_projections' => :'FeatureServiceFeatureFlag', + :'oidc_legacy_introspection' => :'FeatureServiceFeatureFlag', + :'user_schema' => :'FeatureServiceFeatureFlag', + :'oidc_token_exchange' => :'FeatureServiceFeatureFlag', + :'actions' => :'FeatureServiceFeatureFlag', + :'improved_performance' => :'FeatureServiceImprovedPerformanceFeatureFlag', + :'web_key' => :'FeatureServiceFeatureFlag', + :'debug_oidc_parent_error' => :'FeatureServiceFeatureFlag', + :'oidc_single_v1_session_termination' => :'FeatureServiceFeatureFlag', + :'disable_user_token_event' => :'FeatureServiceFeatureFlag', + :'enable_back_channel_logout' => :'FeatureServiceFeatureFlag', + :'login_v2' => :'FeatureServiceLoginV2FeatureFlag', + :'permission_check_v2' => :'FeatureServiceFeatureFlag', + :'console_use_v2_user_api' => :'FeatureServiceFeatureFlag' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetInstanceFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetInstanceFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'login_default_org') + self.login_default_org = attributes[:'login_default_org'] + end + + if attributes.key?(:'oidc_trigger_introspection_projections') + self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] + end + + if attributes.key?(:'oidc_legacy_introspection') + self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] + end + + if attributes.key?(:'user_schema') + self.user_schema = attributes[:'user_schema'] + end + + if attributes.key?(:'oidc_token_exchange') + self.oidc_token_exchange = attributes[:'oidc_token_exchange'] + end + + if attributes.key?(:'actions') + self.actions = attributes[:'actions'] + end + + if attributes.key?(:'improved_performance') + self.improved_performance = attributes[:'improved_performance'] + end + + if attributes.key?(:'web_key') + self.web_key = attributes[:'web_key'] + end + + if attributes.key?(:'debug_oidc_parent_error') + self.debug_oidc_parent_error = attributes[:'debug_oidc_parent_error'] + end + + if attributes.key?(:'oidc_single_v1_session_termination') + self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] + end + + if attributes.key?(:'disable_user_token_event') + self.disable_user_token_event = attributes[:'disable_user_token_event'] + end + + if attributes.key?(:'enable_back_channel_logout') + self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] + end + + if attributes.key?(:'login_v2') + self.login_v2 = attributes[:'login_v2'] + end + + if attributes.key?(:'permission_check_v2') + self.permission_check_v2 = attributes[:'permission_check_v2'] + end + + if attributes.key?(:'console_use_v2_user_api') + self.console_use_v2_user_api = attributes[:'console_use_v2_user_api'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + login_default_org == o.login_default_org && + oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && + oidc_legacy_introspection == o.oidc_legacy_introspection && + user_schema == o.user_schema && + oidc_token_exchange == o.oidc_token_exchange && + actions == o.actions && + improved_performance == o.improved_performance && + web_key == o.web_key && + debug_oidc_parent_error == o.debug_oidc_parent_error && + oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && + disable_user_token_event == o.disable_user_token_event && + enable_back_channel_logout == o.enable_back_channel_logout && + login_v2 == o.login_v2 && + permission_check_v2 == o.permission_check_v2 && + console_use_v2_user_api == o.console_use_v2_user_api + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, web_key, debug_oidc_parent_error, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2, console_use_v2_user_api].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_get_organization_features_response.rb b/lib/zitadel/client/models/feature_service_get_organization_features_response.rb new file mode 100644 index 00000000..09e03a52 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_organization_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceGetOrganizationFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetOrganizationFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetOrganizationFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_get_system_features_response.rb b/lib/zitadel/client/models/feature_service_get_system_features_response.rb new file mode 100644 index 00000000..3d75aec1 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_system_features_response.rb @@ -0,0 +1,338 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceGetSystemFeaturesResponse + attr_accessor :details + + attr_accessor :login_default_org + + attr_accessor :oidc_trigger_introspection_projections + + attr_accessor :oidc_legacy_introspection + + attr_accessor :user_schema + + attr_accessor :oidc_token_exchange + + attr_accessor :actions + + attr_accessor :improved_performance + + attr_accessor :oidc_single_v1_session_termination + + attr_accessor :disable_user_token_event + + attr_accessor :enable_back_channel_logout + + attr_accessor :login_v2 + + attr_accessor :permission_check_v2 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'login_default_org' => :'loginDefaultOrg', + :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', + :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', + :'user_schema' => :'userSchema', + :'oidc_token_exchange' => :'oidcTokenExchange', + :'actions' => :'actions', + :'improved_performance' => :'improvedPerformance', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', + :'disable_user_token_event' => :'disableUserTokenEvent', + :'enable_back_channel_logout' => :'enableBackChannelLogout', + :'login_v2' => :'loginV2', + :'permission_check_v2' => :'permissionCheckV2' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails', + :'login_default_org' => :'FeatureServiceFeatureFlag', + :'oidc_trigger_introspection_projections' => :'FeatureServiceFeatureFlag', + :'oidc_legacy_introspection' => :'FeatureServiceFeatureFlag', + :'user_schema' => :'FeatureServiceFeatureFlag', + :'oidc_token_exchange' => :'FeatureServiceFeatureFlag', + :'actions' => :'FeatureServiceFeatureFlag', + :'improved_performance' => :'FeatureServiceImprovedPerformanceFeatureFlag', + :'oidc_single_v1_session_termination' => :'FeatureServiceFeatureFlag', + :'disable_user_token_event' => :'FeatureServiceFeatureFlag', + :'enable_back_channel_logout' => :'FeatureServiceFeatureFlag', + :'login_v2' => :'FeatureServiceLoginV2FeatureFlag', + :'permission_check_v2' => :'FeatureServiceFeatureFlag' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetSystemFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetSystemFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'login_default_org') + self.login_default_org = attributes[:'login_default_org'] + end + + if attributes.key?(:'oidc_trigger_introspection_projections') + self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] + end + + if attributes.key?(:'oidc_legacy_introspection') + self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] + end + + if attributes.key?(:'user_schema') + self.user_schema = attributes[:'user_schema'] + end + + if attributes.key?(:'oidc_token_exchange') + self.oidc_token_exchange = attributes[:'oidc_token_exchange'] + end + + if attributes.key?(:'actions') + self.actions = attributes[:'actions'] + end + + if attributes.key?(:'improved_performance') + self.improved_performance = attributes[:'improved_performance'] + end + + if attributes.key?(:'oidc_single_v1_session_termination') + self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] + end + + if attributes.key?(:'disable_user_token_event') + self.disable_user_token_event = attributes[:'disable_user_token_event'] + end + + if attributes.key?(:'enable_back_channel_logout') + self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] + end + + if attributes.key?(:'login_v2') + self.login_v2 = attributes[:'login_v2'] + end + + if attributes.key?(:'permission_check_v2') + self.permission_check_v2 = attributes[:'permission_check_v2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + login_default_org == o.login_default_org && + oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && + oidc_legacy_introspection == o.oidc_legacy_introspection && + user_schema == o.user_schema && + oidc_token_exchange == o.oidc_token_exchange && + actions == o.actions && + improved_performance == o.improved_performance && + oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && + disable_user_token_event == o.disable_user_token_event && + enable_back_channel_logout == o.enable_back_channel_logout && + login_v2 == o.login_v2 && + permission_check_v2 == o.permission_check_v2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_get_user_features_response.rb b/lib/zitadel/client/models/feature_service_get_user_features_response.rb new file mode 100644 index 00000000..95da1ec0 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_user_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceGetUserFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceGetUserFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetUserFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_improved_performance.rb b/lib/zitadel/client/models/feature_service_improved_performance.rb new file mode 100644 index 00000000..79117ba6 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_improved_performance.rb @@ -0,0 +1,45 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceImprovedPerformance + IMPROVED_PERFORMANCE_UNSPECIFIED = "IMPROVED_PERFORMANCE_UNSPECIFIED".freeze + IMPROVED_PERFORMANCE_ORG_BY_ID = "IMPROVED_PERFORMANCE_ORG_BY_ID".freeze + IMPROVED_PERFORMANCE_PROJECT_GRANT = "IMPROVED_PERFORMANCE_PROJECT_GRANT".freeze + IMPROVED_PERFORMANCE_PROJECT = "IMPROVED_PERFORMANCE_PROJECT".freeze + IMPROVED_PERFORMANCE_USER_GRANT = "IMPROVED_PERFORMANCE_USER_GRANT".freeze + IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED = "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED".freeze + + def self.all_vars + @all_vars ||= [IMPROVED_PERFORMANCE_UNSPECIFIED, IMPROVED_PERFORMANCE_ORG_BY_ID, IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if FeatureServiceImprovedPerformance.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::FeatureServiceImprovedPerformance" + end + end + +end diff --git a/lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb b/lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb new file mode 100644 index 00000000..6f35b41e --- /dev/null +++ b/lib/zitadel/client/models/feature_service_improved_performance_feature_flag.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceImprovedPerformanceFeatureFlag + # Which of the performance improvements is enabled + attr_accessor :execution_paths + + attr_accessor :source + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'execution_paths' => :'executionPaths', + :'source' => :'source' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'execution_paths' => :'Array', + :'source' => :'FeatureServiceSource' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceImprovedPerformanceFeatureFlag` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceImprovedPerformanceFeatureFlag`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'execution_paths') + if (value = attributes[:'execution_paths']).is_a?(Array) + self.execution_paths = value + end + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = 'SOURCE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + execution_paths == o.execution_paths && + source == o.source + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [execution_paths, source].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_login_v2.rb b/lib/zitadel/client/models/feature_service_login_v2.rb new file mode 100644 index 00000000..32360ab8 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_login_v2.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceLoginV2 + # Require that all users must use the new login UI. If enabled, all users will be redirected to the login V2 regardless of the application's preference. + attr_accessor :required + + # Optionally specify a base uri of the login UI. If unspecified the default URI will be used. + attr_accessor :base_uri + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'required' => :'required', + :'base_uri' => :'baseUri' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'required' => :'Boolean', + :'base_uri' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceLoginV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceLoginV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'required') + self.required = attributes[:'required'] + end + + if attributes.key?(:'base_uri') + self.base_uri = attributes[:'base_uri'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + required == o.required && + base_uri == o.base_uri + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [required, base_uri].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb b/lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb new file mode 100644 index 00000000..e61c5597 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_login_v2_feature_flag.rb @@ -0,0 +1,272 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceLoginV2FeatureFlag + attr_accessor :required + + attr_accessor :base_uri + + attr_accessor :source + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'required' => :'required', + :'base_uri' => :'baseUri', + :'source' => :'source' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'required' => :'Boolean', + :'base_uri' => :'String', + :'source' => :'FeatureServiceSource' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceLoginV2FeatureFlag` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceLoginV2FeatureFlag`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'required') + self.required = attributes[:'required'] + end + + if attributes.key?(:'base_uri') + self.base_uri = attributes[:'base_uri'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = 'SOURCE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + required == o.required && + base_uri == o.base_uri && + source == o.source + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [required, base_uri, source].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_protobuf_any.rb b/lib/zitadel/client/models/feature_service_protobuf_any.rb new file mode 100644 index 00000000..788683c1 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_reset_instance_features_response.rb b/lib/zitadel/client/models/feature_service_reset_instance_features_response.rb new file mode 100644 index 00000000..b060bc9b --- /dev/null +++ b/lib/zitadel/client/models/feature_service_reset_instance_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceResetInstanceFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetInstanceFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetInstanceFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_reset_organization_features_response.rb b/lib/zitadel/client/models/feature_service_reset_organization_features_response.rb new file mode 100644 index 00000000..573cb3f1 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_reset_organization_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceResetOrganizationFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetOrganizationFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetOrganizationFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_reset_system_features_response.rb b/lib/zitadel/client/models/feature_service_reset_system_features_response.rb new file mode 100644 index 00000000..c27edb08 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_reset_system_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceResetSystemFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetSystemFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetSystemFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_reset_user_features_response.rb b/lib/zitadel/client/models/feature_service_reset_user_features_response.rb new file mode 100644 index 00000000..ec61962a --- /dev/null +++ b/lib/zitadel/client/models/feature_service_reset_user_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceResetUserFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceResetUserFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetUserFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_rpc_status.rb b/lib/zitadel/client/models/feature_service_rpc_status.rb new file mode 100644 index 00000000..484bd7fb --- /dev/null +++ b/lib/zitadel/client/models/feature_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_set_instance_features_request.rb b/lib/zitadel/client/models/feature_service_set_instance_features_request.rb new file mode 100644 index 00000000..7cfd7bf8 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_instance_features_request.rb @@ -0,0 +1,372 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceSetInstanceFeaturesRequest + # The login UI will use the settings of the default org (and not from the instance) if no organization context is set + attr_accessor :login_default_org + + # 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. + attr_accessor :oidc_trigger_introspection_projections + + # 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. + attr_accessor :oidc_legacy_introspection + + # 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. + attr_accessor :user_schema + + # 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. + attr_accessor :oidc_token_exchange + + # Actions allow to manage data executions and targets. 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. + attr_accessor :actions + + # Improves performance of specified execution paths. + attr_accessor :improved_performance + + # Enable the webkey/v3alpha API. The first time this feature is enabled, web keys are generated and activated. + attr_accessor :web_key + + # 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. + attr_accessor :debug_oidc_parent_error + + # 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. + attr_accessor :oidc_single_v1_session_termination + + # Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins + attr_accessor :disable_user_token_event + + # 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. + attr_accessor :enable_back_channel_logout + + attr_accessor :login_v2 + + # Enable a newer, more performant, permission check used for v2 and v3 resource based APIs. + attr_accessor :permission_check_v2 + + # If this is enabled the console web client will use the new User v2 API for certain calls + attr_accessor :console_use_v2_user_api + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'login_default_org' => :'loginDefaultOrg', + :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', + :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', + :'user_schema' => :'userSchema', + :'oidc_token_exchange' => :'oidcTokenExchange', + :'actions' => :'actions', + :'improved_performance' => :'improvedPerformance', + :'web_key' => :'webKey', + :'debug_oidc_parent_error' => :'debugOidcParentError', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', + :'disable_user_token_event' => :'disableUserTokenEvent', + :'enable_back_channel_logout' => :'enableBackChannelLogout', + :'login_v2' => :'loginV2', + :'permission_check_v2' => :'permissionCheckV2', + :'console_use_v2_user_api' => :'consoleUseV2UserApi' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'login_default_org' => :'Boolean', + :'oidc_trigger_introspection_projections' => :'Boolean', + :'oidc_legacy_introspection' => :'Boolean', + :'user_schema' => :'Boolean', + :'oidc_token_exchange' => :'Boolean', + :'actions' => :'Boolean', + :'improved_performance' => :'Array', + :'web_key' => :'Boolean', + :'debug_oidc_parent_error' => :'Boolean', + :'oidc_single_v1_session_termination' => :'Boolean', + :'disable_user_token_event' => :'Boolean', + :'enable_back_channel_logout' => :'Boolean', + :'login_v2' => :'FeatureServiceLoginV2', + :'permission_check_v2' => :'Boolean', + :'console_use_v2_user_api' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'login_default_org') + self.login_default_org = attributes[:'login_default_org'] + end + + if attributes.key?(:'oidc_trigger_introspection_projections') + self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] + end + + if attributes.key?(:'oidc_legacy_introspection') + self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] + end + + if attributes.key?(:'user_schema') + self.user_schema = attributes[:'user_schema'] + end + + if attributes.key?(:'oidc_token_exchange') + self.oidc_token_exchange = attributes[:'oidc_token_exchange'] + end + + if attributes.key?(:'actions') + self.actions = attributes[:'actions'] + end + + if attributes.key?(:'improved_performance') + if (value = attributes[:'improved_performance']).is_a?(Array) + self.improved_performance = value + end + end + + if attributes.key?(:'web_key') + self.web_key = attributes[:'web_key'] + end + + if attributes.key?(:'debug_oidc_parent_error') + self.debug_oidc_parent_error = attributes[:'debug_oidc_parent_error'] + end + + if attributes.key?(:'oidc_single_v1_session_termination') + self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] + end + + if attributes.key?(:'disable_user_token_event') + self.disable_user_token_event = attributes[:'disable_user_token_event'] + end + + if attributes.key?(:'enable_back_channel_logout') + self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] + end + + if attributes.key?(:'login_v2') + self.login_v2 = attributes[:'login_v2'] + end + + if attributes.key?(:'permission_check_v2') + self.permission_check_v2 = attributes[:'permission_check_v2'] + end + + if attributes.key?(:'console_use_v2_user_api') + self.console_use_v2_user_api = attributes[:'console_use_v2_user_api'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + login_default_org == o.login_default_org && + oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && + oidc_legacy_introspection == o.oidc_legacy_introspection && + user_schema == o.user_schema && + oidc_token_exchange == o.oidc_token_exchange && + actions == o.actions && + improved_performance == o.improved_performance && + web_key == o.web_key && + debug_oidc_parent_error == o.debug_oidc_parent_error && + oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && + disable_user_token_event == o.disable_user_token_event && + enable_back_channel_logout == o.enable_back_channel_logout && + login_v2 == o.login_v2 && + permission_check_v2 == o.permission_check_v2 && + console_use_v2_user_api == o.console_use_v2_user_api + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, web_key, debug_oidc_parent_error, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2, console_use_v2_user_api].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_set_instance_features_response.rb b/lib/zitadel/client/models/feature_service_set_instance_features_response.rb new file mode 100644 index 00000000..934f6277 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_instance_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceSetInstanceFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetInstanceFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_set_organization_features_response.rb b/lib/zitadel/client/models/feature_service_set_organization_features_response.rb new file mode 100644 index 00000000..1113a525 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_organization_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceSetOrganizationFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetOrganizationFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetOrganizationFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_set_system_features_request.rb b/lib/zitadel/client/models/feature_service_set_system_features_request.rb new file mode 100644 index 00000000..2ba4cc62 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_system_features_request.rb @@ -0,0 +1,342 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceSetSystemFeaturesRequest + # The login UI will use the settings of the default org (and not from the instance) if no organization context is set + attr_accessor :login_default_org + + # 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. + attr_accessor :oidc_trigger_introspection_projections + + # 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. + attr_accessor :oidc_legacy_introspection + + # 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. + attr_accessor :user_schema + + # 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. + attr_accessor :oidc_token_exchange + + # Actions allow to manage data executions and targets. 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. + attr_accessor :actions + + # Improves performance of specified execution paths. + attr_accessor :improved_performance + + # 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. + attr_accessor :oidc_single_v1_session_termination + + # Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins + attr_accessor :disable_user_token_event + + # 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. + attr_accessor :enable_back_channel_logout + + attr_accessor :login_v2 + + # Enable a newer, more performant, permission check used for v2 and v3 resource based APIs. + attr_accessor :permission_check_v2 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'login_default_org' => :'loginDefaultOrg', + :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', + :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', + :'user_schema' => :'userSchema', + :'oidc_token_exchange' => :'oidcTokenExchange', + :'actions' => :'actions', + :'improved_performance' => :'improvedPerformance', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination', + :'disable_user_token_event' => :'disableUserTokenEvent', + :'enable_back_channel_logout' => :'enableBackChannelLogout', + :'login_v2' => :'loginV2', + :'permission_check_v2' => :'permissionCheckV2' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'login_default_org' => :'Boolean', + :'oidc_trigger_introspection_projections' => :'Boolean', + :'oidc_legacy_introspection' => :'Boolean', + :'user_schema' => :'Boolean', + :'oidc_token_exchange' => :'Boolean', + :'actions' => :'Boolean', + :'improved_performance' => :'Array', + :'oidc_single_v1_session_termination' => :'Boolean', + :'disable_user_token_event' => :'Boolean', + :'enable_back_channel_logout' => :'Boolean', + :'login_v2' => :'FeatureServiceLoginV2', + :'permission_check_v2' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'login_default_org') + self.login_default_org = attributes[:'login_default_org'] + end + + if attributes.key?(:'oidc_trigger_introspection_projections') + self.oidc_trigger_introspection_projections = attributes[:'oidc_trigger_introspection_projections'] + end + + if attributes.key?(:'oidc_legacy_introspection') + self.oidc_legacy_introspection = attributes[:'oidc_legacy_introspection'] + end + + if attributes.key?(:'user_schema') + self.user_schema = attributes[:'user_schema'] + end + + if attributes.key?(:'oidc_token_exchange') + self.oidc_token_exchange = attributes[:'oidc_token_exchange'] + end + + if attributes.key?(:'actions') + self.actions = attributes[:'actions'] + end + + if attributes.key?(:'improved_performance') + if (value = attributes[:'improved_performance']).is_a?(Array) + self.improved_performance = value + end + end + + if attributes.key?(:'oidc_single_v1_session_termination') + self.oidc_single_v1_session_termination = attributes[:'oidc_single_v1_session_termination'] + end + + if attributes.key?(:'disable_user_token_event') + self.disable_user_token_event = attributes[:'disable_user_token_event'] + end + + if attributes.key?(:'enable_back_channel_logout') + self.enable_back_channel_logout = attributes[:'enable_back_channel_logout'] + end + + if attributes.key?(:'login_v2') + self.login_v2 = attributes[:'login_v2'] + end + + if attributes.key?(:'permission_check_v2') + self.permission_check_v2 = attributes[:'permission_check_v2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + login_default_org == o.login_default_org && + oidc_trigger_introspection_projections == o.oidc_trigger_introspection_projections && + oidc_legacy_introspection == o.oidc_legacy_introspection && + user_schema == o.user_schema && + oidc_token_exchange == o.oidc_token_exchange && + actions == o.actions && + improved_performance == o.improved_performance && + oidc_single_v1_session_termination == o.oidc_single_v1_session_termination && + disable_user_token_event == o.disable_user_token_event && + enable_back_channel_logout == o.enable_back_channel_logout && + login_v2 == o.login_v2 && + permission_check_v2 == o.permission_check_v2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [login_default_org, oidc_trigger_introspection_projections, oidc_legacy_introspection, user_schema, oidc_token_exchange, actions, improved_performance, oidc_single_v1_session_termination, disable_user_token_event, enable_back_channel_logout, login_v2, permission_check_v2].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_set_system_features_response.rb b/lib/zitadel/client/models/feature_service_set_system_features_response.rb new file mode 100644 index 00000000..07bf5cac --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_system_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceSetSystemFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetSystemFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_set_user_features_response.rb b/lib/zitadel/client/models/feature_service_set_user_features_response.rb new file mode 100644 index 00000000..413988f6 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_user_features_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceSetUserFeaturesResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'FeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceSetUserFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetUserFeaturesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/feature_service_source.rb b/lib/zitadel/client/models/feature_service_source.rb new file mode 100644 index 00000000..56742c52 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_source.rb @@ -0,0 +1,46 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FeatureServiceSource + SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED".freeze + SOURCE_SYSTEM = "SOURCE_SYSTEM".freeze + SOURCE_INSTANCE = "SOURCE_INSTANCE".freeze + SOURCE_ORGANIZATION = "SOURCE_ORGANIZATION".freeze + SOURCE_PROJECT = "SOURCE_PROJECT".freeze + SOURCE_APP = "SOURCE_APP".freeze + SOURCE_USER = "SOURCE_USER".freeze + + def self.all_vars + @all_vars ||= [SOURCE_UNSPECIFIED, SOURCE_SYSTEM, SOURCE_INSTANCE, SOURCE_ORGANIZATION, SOURCE_PROJECT, SOURCE_APP, SOURCE_USER].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if FeatureServiceSource.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::FeatureServiceSource" + end + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_apple_config.rb b/lib/zitadel/client/models/identity_provider_service_apple_config.rb new file mode 100644 index 00000000..77e5129a --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_apple_config.rb @@ -0,0 +1,263 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceAppleConfig + # Client id (App ID or Service ID) provided by Apple. + attr_accessor :client_id + + # Team ID provided by Apple. + attr_accessor :team_id + + # ID of the private key generated by Apple. + attr_accessor :key_id + + # The scopes requested by ZITADEL during the request to Apple. + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'clientId', + :'team_id' => :'teamId', + :'key_id' => :'keyId', + :'scopes' => :'scopes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'team_id' => :'String', + :'key_id' => :'String', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceAppleConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceAppleConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + end + + if attributes.key?(:'key_id') + self.key_id = attributes[:'key_id'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + team_id == o.team_id && + key_id == o.key_id && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, team_id, key_id, scopes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb b/lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb new file mode 100644 index 00000000..1c9119fd --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_auto_linking_option.rb @@ -0,0 +1,42 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceAutoLinkingOption + AUTO_LINKING_OPTION_UNSPECIFIED = "AUTO_LINKING_OPTION_UNSPECIFIED".freeze + AUTO_LINKING_OPTION_USERNAME = "AUTO_LINKING_OPTION_USERNAME".freeze + AUTO_LINKING_OPTION_EMAIL = "AUTO_LINKING_OPTION_EMAIL".freeze + + def self.all_vars + @all_vars ||= [AUTO_LINKING_OPTION_UNSPECIFIED, AUTO_LINKING_OPTION_USERNAME, AUTO_LINKING_OPTION_EMAIL].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if IdentityProviderServiceAutoLinkingOption.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceAutoLinkingOption" + end + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb b/lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb new file mode 100644 index 00000000..ccd84e41 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_azure_a_d_config.rb @@ -0,0 +1,261 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceAzureADConfig + attr_accessor :client_id + + attr_accessor :tenant + + # 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). + attr_accessor :email_verified + + # The scopes requested by ZITADEL during the request to Azure AD. + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'clientId', + :'tenant' => :'tenant', + :'email_verified' => :'emailVerified', + :'scopes' => :'scopes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'tenant' => :'IdentityProviderServiceAzureADTenant', + :'email_verified' => :'Boolean', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceAzureADConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceAzureADConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'tenant') + self.tenant = attributes[:'tenant'] + end + + if attributes.key?(:'email_verified') + self.email_verified = attributes[:'email_verified'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + tenant == o.tenant && + email_verified == o.email_verified && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, tenant, email_verified, scopes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb b/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb new file mode 100644 index 00000000..a673b9e4 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceAzureADTenant + attr_accessor :tenant_type + + attr_accessor :tenant_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tenant_type' => :'tenantType', + :'tenant_id' => :'tenantId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'tenant_type' => :'IdentityProviderServiceAzureADTenantType', + :'tenant_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceAzureADTenant` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceAzureADTenant`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tenant_type') + self.tenant_type = attributes[:'tenant_type'] + else + self.tenant_type = 'AZURE_AD_TENANT_TYPE_COMMON' + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tenant_type == o.tenant_type && + tenant_id == o.tenant_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tenant_type, tenant_id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb b/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb new file mode 100644 index 00000000..571c49bd --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_azure_a_d_tenant_type.rb @@ -0,0 +1,42 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceAzureADTenantType + AZURE_AD_TENANT_TYPE_COMMON = "AZURE_AD_TENANT_TYPE_COMMON".freeze + AZURE_AD_TENANT_TYPE_ORGANISATIONS = "AZURE_AD_TENANT_TYPE_ORGANISATIONS".freeze + AZURE_AD_TENANT_TYPE_CONSUMERS = "AZURE_AD_TENANT_TYPE_CONSUMERS".freeze + + def self.all_vars + @all_vars ||= [AZURE_AD_TENANT_TYPE_COMMON, AZURE_AD_TENANT_TYPE_ORGANISATIONS, AZURE_AD_TENANT_TYPE_CONSUMERS].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if IdentityProviderServiceAzureADTenantType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceAzureADTenantType" + end + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_details.rb b/lib/zitadel/client/models/identity_provider_service_details.rb new file mode 100644 index 00000000..e2d4b9b5 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb b/lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb new file mode 100644 index 00000000..3ed0afaa --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_generic_o_i_d_c_config.rb @@ -0,0 +1,263 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceGenericOIDCConfig + # The OIDC issuer of the identity provider. + attr_accessor :issuer + + # Client id generated by the identity provider. + attr_accessor :client_id + + # The scopes requested by ZITADEL during the request on the identity provider. + attr_accessor :scopes + + # If true, provider information get mapped from the id token, not from the userinfo endpoint. + attr_accessor :is_id_token_mapping + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'issuer' => :'issuer', + :'client_id' => :'clientId', + :'scopes' => :'scopes', + :'is_id_token_mapping' => :'isIdTokenMapping' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'issuer' => :'String', + :'client_id' => :'String', + :'scopes' => :'Array', + :'is_id_token_mapping' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGenericOIDCConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGenericOIDCConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + + if attributes.key?(:'is_id_token_mapping') + self.is_id_token_mapping = attributes[:'is_id_token_mapping'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + issuer == o.issuer && + client_id == o.client_id && + scopes == o.scopes && + is_id_token_mapping == o.is_id_token_mapping + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [issuer, client_id, scopes, is_id_token_mapping].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb b/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb new file mode 100644 index 00000000..3e8912d4 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceGetIDPByIDResponse + attr_accessor :idp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp' => :'idp' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp' => :'IdentityProviderServiceIDP' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGetIDPByIDResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGetIDPByIDResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp') + self.idp = attributes[:'idp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp == o.idp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_git_hub_config.rb b/lib/zitadel/client/models/identity_provider_service_git_hub_config.rb new file mode 100644 index 00000000..6fdcf8e6 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_git_hub_config.rb @@ -0,0 +1,243 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceGitHubConfig + # The client ID of the GitHub App. + attr_accessor :client_id + + # The scopes requested by ZITADEL during the request to GitHub. + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'clientId', + :'scopes' => :'scopes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitHubConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitHubConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, scopes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb b/lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb new file mode 100644 index 00000000..c8f924fb --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_git_hub_enterprise_server_config.rb @@ -0,0 +1,270 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceGitHubEnterpriseServerConfig + # The client ID of the GitHub App. + attr_accessor :client_id + + attr_accessor :authorization_endpoint + + attr_accessor :token_endpoint + + attr_accessor :user_endpoint + + # The scopes requested by ZITADEL during the request to GitHub. + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'clientId', + :'authorization_endpoint' => :'authorizationEndpoint', + :'token_endpoint' => :'tokenEndpoint', + :'user_endpoint' => :'userEndpoint', + :'scopes' => :'scopes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'authorization_endpoint' => :'String', + :'token_endpoint' => :'String', + :'user_endpoint' => :'String', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitHubEnterpriseServerConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitHubEnterpriseServerConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'authorization_endpoint') + self.authorization_endpoint = attributes[:'authorization_endpoint'] + end + + if attributes.key?(:'token_endpoint') + self.token_endpoint = attributes[:'token_endpoint'] + end + + if attributes.key?(:'user_endpoint') + self.user_endpoint = attributes[:'user_endpoint'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + authorization_endpoint == o.authorization_endpoint && + token_endpoint == o.token_endpoint && + user_endpoint == o.user_endpoint && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, authorization_endpoint, token_endpoint, user_endpoint, scopes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_git_lab_config.rb b/lib/zitadel/client/models/identity_provider_service_git_lab_config.rb new file mode 100644 index 00000000..94abda3c --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_git_lab_config.rb @@ -0,0 +1,243 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceGitLabConfig + # Client id of the GitLab application. + attr_accessor :client_id + + # The scopes requested by ZITADEL during the request to GitLab. + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'clientId', + :'scopes' => :'scopes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitLabConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitLabConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, scopes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb b/lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb new file mode 100644 index 00000000..6d5efebd --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_git_lab_self_hosted_config.rb @@ -0,0 +1,252 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceGitLabSelfHostedConfig + attr_accessor :issuer + + # Client id of the GitLab application. + attr_accessor :client_id + + # The scopes requested by ZITADEL during the request to GitLab. + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'issuer' => :'issuer', + :'client_id' => :'clientId', + :'scopes' => :'scopes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'issuer' => :'String', + :'client_id' => :'String', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGitLabSelfHostedConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGitLabSelfHostedConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + issuer == o.issuer && + client_id == o.client_id && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [issuer, client_id, scopes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_google_config.rb b/lib/zitadel/client/models/identity_provider_service_google_config.rb new file mode 100644 index 00000000..800843e9 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_google_config.rb @@ -0,0 +1,243 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceGoogleConfig + # Client id of the Google application. + attr_accessor :client_id + + # The scopes requested by ZITADEL during the request to Google. + attr_accessor :scopes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'clientId', + :'scopes' => :'scopes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'scopes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceGoogleConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGoogleConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + scopes == o.scopes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, scopes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p.rb new file mode 100644 index 00000000..579f8eee --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_i_d_p.rb @@ -0,0 +1,302 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceIDP + # Unique identifier for the identity provider. + attr_accessor :id + + attr_accessor :details + + attr_accessor :state + + attr_accessor :name + + attr_accessor :type + + attr_accessor :config + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'details' => :'details', + :'state' => :'state', + :'name' => :'name', + :'type' => :'type', + :'config' => :'config' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'details' => :'IdentityProviderServiceDetails', + :'state' => :'IdentityProviderServiceIDPState', + :'name' => :'String', + :'type' => :'IdentityProviderServiceIDPType', + :'config' => :'IdentityProviderServiceIDPConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceIDP` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceIDP`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'IDP_STATE_UNSPECIFIED' + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = 'IDP_TYPE_UNSPECIFIED' + end + + if attributes.key?(:'config') + self.config = attributes[:'config'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + details == o.details && + state == o.state && + name == o.name && + type == o.type && + config == o.config + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, details, state, name, type, config].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb new file mode 100644 index 00000000..e8556de7 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_i_d_p_config.rb @@ -0,0 +1,338 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceIDPConfig + attr_accessor :options + + attr_accessor :ldap + + attr_accessor :google + + attr_accessor :oauth + + attr_accessor :oidc + + attr_accessor :jwt + + attr_accessor :github + + attr_accessor :github_es + + attr_accessor :gitlab + + attr_accessor :gitlab_self_hosted + + attr_accessor :azure_ad + + attr_accessor :apple + + attr_accessor :saml + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'options' => :'options', + :'ldap' => :'ldap', + :'google' => :'google', + :'oauth' => :'oauth', + :'oidc' => :'oidc', + :'jwt' => :'jwt', + :'github' => :'github', + :'github_es' => :'githubEs', + :'gitlab' => :'gitlab', + :'gitlab_self_hosted' => :'gitlabSelfHosted', + :'azure_ad' => :'azureAd', + :'apple' => :'apple', + :'saml' => :'saml' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'options' => :'IdentityProviderServiceOptions', + :'ldap' => :'IdentityProviderServiceLDAPConfig', + :'google' => :'IdentityProviderServiceGoogleConfig', + :'oauth' => :'IdentityProviderServiceOAuthConfig', + :'oidc' => :'IdentityProviderServiceGenericOIDCConfig', + :'jwt' => :'IdentityProviderServiceJWTConfig', + :'github' => :'IdentityProviderServiceGitHubConfig', + :'github_es' => :'IdentityProviderServiceGitHubEnterpriseServerConfig', + :'gitlab' => :'IdentityProviderServiceGitLabConfig', + :'gitlab_self_hosted' => :'IdentityProviderServiceGitLabSelfHostedConfig', + :'azure_ad' => :'IdentityProviderServiceAzureADConfig', + :'apple' => :'IdentityProviderServiceAppleConfig', + :'saml' => :'IdentityProviderServiceSAMLConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceIDPConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceIDPConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + end + + if attributes.key?(:'google') + self.google = attributes[:'google'] + end + + if attributes.key?(:'oauth') + self.oauth = attributes[:'oauth'] + end + + if attributes.key?(:'oidc') + self.oidc = attributes[:'oidc'] + end + + if attributes.key?(:'jwt') + self.jwt = attributes[:'jwt'] + end + + if attributes.key?(:'github') + self.github = attributes[:'github'] + end + + if attributes.key?(:'github_es') + self.github_es = attributes[:'github_es'] + end + + if attributes.key?(:'gitlab') + self.gitlab = attributes[:'gitlab'] + end + + if attributes.key?(:'gitlab_self_hosted') + self.gitlab_self_hosted = attributes[:'gitlab_self_hosted'] + end + + if attributes.key?(:'azure_ad') + self.azure_ad = attributes[:'azure_ad'] + end + + if attributes.key?(:'apple') + self.apple = attributes[:'apple'] + end + + if attributes.key?(:'saml') + self.saml = attributes[:'saml'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + options == o.options && + ldap == o.ldap && + google == o.google && + oauth == o.oauth && + oidc == o.oidc && + jwt == o.jwt && + github == o.github && + github_es == o.github_es && + gitlab == o.gitlab && + gitlab_self_hosted == o.gitlab_self_hosted && + azure_ad == o.azure_ad && + apple == o.apple && + saml == o.saml + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [options, ldap, google, oauth, oidc, jwt, github, github_es, gitlab, gitlab_self_hosted, azure_ad, apple, saml].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb new file mode 100644 index 00000000..6a72c524 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_i_d_p_state.rb @@ -0,0 +1,44 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceIDPState + IDP_STATE_UNSPECIFIED = "IDP_STATE_UNSPECIFIED".freeze + IDP_STATE_ACTIVE = "IDP_STATE_ACTIVE".freeze + IDP_STATE_INACTIVE = "IDP_STATE_INACTIVE".freeze + IDP_STATE_REMOVED = "IDP_STATE_REMOVED".freeze + IDP_STATE_MIGRATED = "IDP_STATE_MIGRATED".freeze + + def self.all_vars + @all_vars ||= [IDP_STATE_UNSPECIFIED, IDP_STATE_ACTIVE, IDP_STATE_INACTIVE, IDP_STATE_REMOVED, IDP_STATE_MIGRATED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if IdentityProviderServiceIDPState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceIDPState" + end + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb new file mode 100644 index 00000000..f8bc969f --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_i_d_p_type.rb @@ -0,0 +1,52 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceIDPType + IDP_TYPE_UNSPECIFIED = "IDP_TYPE_UNSPECIFIED".freeze + IDP_TYPE_OIDC = "IDP_TYPE_OIDC".freeze + IDP_TYPE_JWT = "IDP_TYPE_JWT".freeze + IDP_TYPE_LDAP = "IDP_TYPE_LDAP".freeze + IDP_TYPE_OAUTH = "IDP_TYPE_OAUTH".freeze + IDP_TYPE_AZURE_AD = "IDP_TYPE_AZURE_AD".freeze + IDP_TYPE_GITHUB = "IDP_TYPE_GITHUB".freeze + IDP_TYPE_GITHUB_ES = "IDP_TYPE_GITHUB_ES".freeze + IDP_TYPE_GITLAB = "IDP_TYPE_GITLAB".freeze + IDP_TYPE_GITLAB_SELF_HOSTED = "IDP_TYPE_GITLAB_SELF_HOSTED".freeze + IDP_TYPE_GOOGLE = "IDP_TYPE_GOOGLE".freeze + IDP_TYPE_APPLE = "IDP_TYPE_APPLE".freeze + IDP_TYPE_SAML = "IDP_TYPE_SAML".freeze + + def self.all_vars + @all_vars ||= [IDP_TYPE_UNSPECIFIED, IDP_TYPE_OIDC, IDP_TYPE_JWT, IDP_TYPE_LDAP, IDP_TYPE_OAUTH, IDP_TYPE_AZURE_AD, IDP_TYPE_GITHUB, IDP_TYPE_GITHUB_ES, IDP_TYPE_GITLAB, IDP_TYPE_GITLAB_SELF_HOSTED, IDP_TYPE_GOOGLE, IDP_TYPE_APPLE, IDP_TYPE_SAML].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if IdentityProviderServiceIDPType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceIDPType" + end + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb b/lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb new file mode 100644 index 00000000..f5e795a3 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_j_w_t_config.rb @@ -0,0 +1,261 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceJWTConfig + # The endpoint where the JWT can be extracted. + attr_accessor :jwt_endpoint + + # The issuer of the JWT (for validation). + attr_accessor :issuer + + # The endpoint to the key (JWK) which is used to sign the JWT with. + attr_accessor :keys_endpoint + + # The name of the header where the JWT is sent in, default is authorization. + attr_accessor :header_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'jwt_endpoint' => :'jwtEndpoint', + :'issuer' => :'issuer', + :'keys_endpoint' => :'keysEndpoint', + :'header_name' => :'headerName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'jwt_endpoint' => :'String', + :'issuer' => :'String', + :'keys_endpoint' => :'String', + :'header_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceJWTConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceJWTConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'jwt_endpoint') + self.jwt_endpoint = attributes[:'jwt_endpoint'] + end + + if attributes.key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.key?(:'keys_endpoint') + self.keys_endpoint = attributes[:'keys_endpoint'] + end + + if attributes.key?(:'header_name') + self.header_name = attributes[:'header_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + jwt_endpoint == o.jwt_endpoint && + issuer == o.issuer && + keys_endpoint == o.keys_endpoint && + header_name == o.header_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [jwt_endpoint, issuer, keys_endpoint, header_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb b/lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb new file mode 100644 index 00000000..d5f8c406 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_l_d_a_p_attributes.rb @@ -0,0 +1,347 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceLDAPAttributes + attr_accessor :id_attribute + + attr_accessor :first_name_attribute + + attr_accessor :last_name_attribute + + attr_accessor :display_name_attribute + + attr_accessor :nick_name_attribute + + attr_accessor :preferred_username_attribute + + attr_accessor :email_attribute + + attr_accessor :email_verified_attribute + + attr_accessor :phone_attribute + + attr_accessor :phone_verified_attribute + + attr_accessor :preferred_language_attribute + + attr_accessor :avatar_url_attribute + + attr_accessor :profile_attribute + + attr_accessor :root_ca + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id_attribute' => :'idAttribute', + :'first_name_attribute' => :'firstNameAttribute', + :'last_name_attribute' => :'lastNameAttribute', + :'display_name_attribute' => :'displayNameAttribute', + :'nick_name_attribute' => :'nickNameAttribute', + :'preferred_username_attribute' => :'preferredUsernameAttribute', + :'email_attribute' => :'emailAttribute', + :'email_verified_attribute' => :'emailVerifiedAttribute', + :'phone_attribute' => :'phoneAttribute', + :'phone_verified_attribute' => :'phoneVerifiedAttribute', + :'preferred_language_attribute' => :'preferredLanguageAttribute', + :'avatar_url_attribute' => :'avatarUrlAttribute', + :'profile_attribute' => :'profileAttribute', + :'root_ca' => :'rootCa' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id_attribute' => :'String', + :'first_name_attribute' => :'String', + :'last_name_attribute' => :'String', + :'display_name_attribute' => :'String', + :'nick_name_attribute' => :'String', + :'preferred_username_attribute' => :'String', + :'email_attribute' => :'String', + :'email_verified_attribute' => :'String', + :'phone_attribute' => :'String', + :'phone_verified_attribute' => :'String', + :'preferred_language_attribute' => :'String', + :'avatar_url_attribute' => :'String', + :'profile_attribute' => :'String', + :'root_ca' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceLDAPAttributes` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceLDAPAttributes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id_attribute') + self.id_attribute = attributes[:'id_attribute'] + end + + if attributes.key?(:'first_name_attribute') + self.first_name_attribute = attributes[:'first_name_attribute'] + end + + if attributes.key?(:'last_name_attribute') + self.last_name_attribute = attributes[:'last_name_attribute'] + end + + if attributes.key?(:'display_name_attribute') + self.display_name_attribute = attributes[:'display_name_attribute'] + end + + if attributes.key?(:'nick_name_attribute') + self.nick_name_attribute = attributes[:'nick_name_attribute'] + end + + if attributes.key?(:'preferred_username_attribute') + self.preferred_username_attribute = attributes[:'preferred_username_attribute'] + end + + if attributes.key?(:'email_attribute') + self.email_attribute = attributes[:'email_attribute'] + end + + if attributes.key?(:'email_verified_attribute') + self.email_verified_attribute = attributes[:'email_verified_attribute'] + end + + if attributes.key?(:'phone_attribute') + self.phone_attribute = attributes[:'phone_attribute'] + end + + if attributes.key?(:'phone_verified_attribute') + self.phone_verified_attribute = attributes[:'phone_verified_attribute'] + end + + if attributes.key?(:'preferred_language_attribute') + self.preferred_language_attribute = attributes[:'preferred_language_attribute'] + end + + if attributes.key?(:'avatar_url_attribute') + self.avatar_url_attribute = attributes[:'avatar_url_attribute'] + end + + if attributes.key?(:'profile_attribute') + self.profile_attribute = attributes[:'profile_attribute'] + end + + if attributes.key?(:'root_ca') + self.root_ca = attributes[:'root_ca'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id_attribute == o.id_attribute && + first_name_attribute == o.first_name_attribute && + last_name_attribute == o.last_name_attribute && + display_name_attribute == o.display_name_attribute && + nick_name_attribute == o.nick_name_attribute && + preferred_username_attribute == o.preferred_username_attribute && + email_attribute == o.email_attribute && + email_verified_attribute == o.email_verified_attribute && + phone_attribute == o.phone_attribute && + phone_verified_attribute == o.phone_verified_attribute && + preferred_language_attribute == o.preferred_language_attribute && + avatar_url_attribute == o.avatar_url_attribute && + profile_attribute == o.profile_attribute && + root_ca == o.root_ca + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id_attribute, first_name_attribute, last_name_attribute, display_name_attribute, nick_name_attribute, preferred_username_attribute, email_attribute, email_verified_attribute, phone_attribute, phone_verified_attribute, preferred_language_attribute, avatar_url_attribute, profile_attribute, root_ca].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb b/lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb new file mode 100644 index 00000000..cdcbe55f --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_l_d_a_p_config.rb @@ -0,0 +1,317 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceLDAPConfig + attr_accessor :servers + + attr_accessor :start_tls + + attr_accessor :base_dn + + attr_accessor :bind_dn + + attr_accessor :user_base + + attr_accessor :user_object_classes + + attr_accessor :user_filters + + attr_accessor :timeout + + attr_accessor :attributes + + attr_accessor :root_ca + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'servers' => :'servers', + :'start_tls' => :'startTls', + :'base_dn' => :'baseDn', + :'bind_dn' => :'bindDn', + :'user_base' => :'userBase', + :'user_object_classes' => :'userObjectClasses', + :'user_filters' => :'userFilters', + :'timeout' => :'timeout', + :'attributes' => :'attributes', + :'root_ca' => :'rootCa' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'servers' => :'Array', + :'start_tls' => :'Boolean', + :'base_dn' => :'String', + :'bind_dn' => :'String', + :'user_base' => :'String', + :'user_object_classes' => :'Array', + :'user_filters' => :'Array', + :'timeout' => :'String', + :'attributes' => :'IdentityProviderServiceLDAPAttributes', + :'root_ca' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceLDAPConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceLDAPConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'servers') + if (value = attributes[:'servers']).is_a?(Array) + self.servers = value + end + end + + if attributes.key?(:'start_tls') + self.start_tls = attributes[:'start_tls'] + end + + if attributes.key?(:'base_dn') + self.base_dn = attributes[:'base_dn'] + end + + if attributes.key?(:'bind_dn') + self.bind_dn = attributes[:'bind_dn'] + end + + if attributes.key?(:'user_base') + self.user_base = attributes[:'user_base'] + end + + if attributes.key?(:'user_object_classes') + if (value = attributes[:'user_object_classes']).is_a?(Array) + self.user_object_classes = value + end + end + + if attributes.key?(:'user_filters') + if (value = attributes[:'user_filters']).is_a?(Array) + self.user_filters = value + end + end + + if attributes.key?(:'timeout') + self.timeout = attributes[:'timeout'] + end + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'root_ca') + self.root_ca = attributes[:'root_ca'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + servers == o.servers && + start_tls == o.start_tls && + base_dn == o.base_dn && + bind_dn == o.bind_dn && + user_base == o.user_base && + user_object_classes == o.user_object_classes && + user_filters == o.user_filters && + timeout == o.timeout && + attributes == o.attributes && + root_ca == o.root_ca + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [servers, start_tls, base_dn, bind_dn, user_base, user_object_classes, user_filters, timeout, attributes, root_ca].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_o_auth_config.rb b/lib/zitadel/client/models/identity_provider_service_o_auth_config.rb new file mode 100644 index 00000000..6a36b30b --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_o_auth_config.rb @@ -0,0 +1,283 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceOAuthConfig + # Client id generated by the identity provider. + attr_accessor :client_id + + # The endpoint where ZITADEL send the user to authenticate. + attr_accessor :authorization_endpoint + + # The endpoint where ZITADEL can get the token. + attr_accessor :token_endpoint + + # The endpoint where ZITADEL can get the user information. + attr_accessor :user_endpoint + + # The scopes requested by ZITADEL during the request on the identity provider. + attr_accessor :scopes + + # Defines how the attribute is called where ZITADEL can get the id of the user. + attr_accessor :id_attribute + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'clientId', + :'authorization_endpoint' => :'authorizationEndpoint', + :'token_endpoint' => :'tokenEndpoint', + :'user_endpoint' => :'userEndpoint', + :'scopes' => :'scopes', + :'id_attribute' => :'idAttribute' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'authorization_endpoint' => :'String', + :'token_endpoint' => :'String', + :'user_endpoint' => :'String', + :'scopes' => :'Array', + :'id_attribute' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceOAuthConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceOAuthConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'authorization_endpoint') + self.authorization_endpoint = attributes[:'authorization_endpoint'] + end + + if attributes.key?(:'token_endpoint') + self.token_endpoint = attributes[:'token_endpoint'] + end + + if attributes.key?(:'user_endpoint') + self.user_endpoint = attributes[:'user_endpoint'] + end + + if attributes.key?(:'scopes') + if (value = attributes[:'scopes']).is_a?(Array) + self.scopes = value + end + end + + if attributes.key?(:'id_attribute') + self.id_attribute = attributes[:'id_attribute'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + authorization_endpoint == o.authorization_endpoint && + token_endpoint == o.token_endpoint && + user_endpoint == o.user_endpoint && + scopes == o.scopes && + id_attribute == o.id_attribute + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, authorization_endpoint, token_endpoint, user_endpoint, scopes, id_attribute].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_options.rb b/lib/zitadel/client/models/identity_provider_service_options.rb new file mode 100644 index 00000000..43a19043 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_options.rb @@ -0,0 +1,294 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceOptions + # Enable if users should be able to link an existing ZITADEL user with an external account. + attr_accessor :is_linking_allowed + + # Enable if users should be able to create a new account in ZITADEL when using an external account. + attr_accessor :is_creation_allowed + + # Enable if a new account in ZITADEL should be created automatically when login with an external account. + attr_accessor :is_auto_creation + + # Enable if a the ZITADEL account fields should be updated automatically on each login. + attr_accessor :is_auto_update + + attr_accessor :auto_linking + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'is_linking_allowed' => :'isLinkingAllowed', + :'is_creation_allowed' => :'isCreationAllowed', + :'is_auto_creation' => :'isAutoCreation', + :'is_auto_update' => :'isAutoUpdate', + :'auto_linking' => :'autoLinking' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'is_linking_allowed' => :'Boolean', + :'is_creation_allowed' => :'Boolean', + :'is_auto_creation' => :'Boolean', + :'is_auto_update' => :'Boolean', + :'auto_linking' => :'IdentityProviderServiceAutoLinkingOption' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceOptions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'is_linking_allowed') + self.is_linking_allowed = attributes[:'is_linking_allowed'] + end + + if attributes.key?(:'is_creation_allowed') + self.is_creation_allowed = attributes[:'is_creation_allowed'] + end + + if attributes.key?(:'is_auto_creation') + self.is_auto_creation = attributes[:'is_auto_creation'] + end + + if attributes.key?(:'is_auto_update') + self.is_auto_update = attributes[:'is_auto_update'] + end + + if attributes.key?(:'auto_linking') + self.auto_linking = attributes[:'auto_linking'] + else + self.auto_linking = 'AUTO_LINKING_OPTION_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_linking_allowed == o.is_linking_allowed && + is_creation_allowed == o.is_creation_allowed && + is_auto_creation == o.is_auto_creation && + is_auto_update == o.is_auto_update && + auto_linking == o.auto_linking + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [is_linking_allowed, is_creation_allowed, is_auto_creation, is_auto_update, auto_linking].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_protobuf_any.rb b/lib/zitadel/client/models/identity_provider_service_protobuf_any.rb new file mode 100644 index 00000000..00c0d965 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_rpc_status.rb b/lib/zitadel/client/models/identity_provider_service_rpc_status.rb new file mode 100644 index 00000000..ac1d7555 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb new file mode 100644 index 00000000..1c637d74 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_binding.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceSAMLBinding + SAML_BINDING_UNSPECIFIED = "SAML_BINDING_UNSPECIFIED".freeze + SAML_BINDING_POST = "SAML_BINDING_POST".freeze + SAML_BINDING_REDIRECT = "SAML_BINDING_REDIRECT".freeze + SAML_BINDING_ARTIFACT = "SAML_BINDING_ARTIFACT".freeze + + def self.all_vars + @all_vars ||= [SAML_BINDING_UNSPECIFIED, SAML_BINDING_POST, SAML_BINDING_REDIRECT, SAML_BINDING_ARTIFACT].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if IdentityProviderServiceSAMLBinding.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceSAMLBinding" + end + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb new file mode 100644 index 00000000..3676bf08 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb @@ -0,0 +1,295 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceSAMLConfig + # Metadata of the SAML identity provider. + attr_accessor :metadata_xml + + attr_accessor :binding + + # Boolean which defines if the authentication requests are signed. + attr_accessor :with_signed_request + + attr_accessor :name_id_format + + # 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`. + attr_accessor :transient_mapping_attribute_name + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'metadata_xml' => :'metadataXml', + :'binding' => :'binding', + :'with_signed_request' => :'withSignedRequest', + :'name_id_format' => :'nameIdFormat', + :'transient_mapping_attribute_name' => :'transientMappingAttributeName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'metadata_xml' => :'String', + :'binding' => :'IdentityProviderServiceSAMLBinding', + :'with_signed_request' => :'Boolean', + :'name_id_format' => :'IdentityProviderServiceSAMLNameIDFormat', + :'transient_mapping_attribute_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceSAMLConfig` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceSAMLConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'metadata_xml') + self.metadata_xml = attributes[:'metadata_xml'] + end + + if attributes.key?(:'binding') + self.binding = attributes[:'binding'] + else + self.binding = 'SAML_BINDING_UNSPECIFIED' + end + + if attributes.key?(:'with_signed_request') + self.with_signed_request = attributes[:'with_signed_request'] + end + + if attributes.key?(:'name_id_format') + self.name_id_format = attributes[:'name_id_format'] + else + self.name_id_format = 'SAML_NAME_ID_FORMAT_UNSPECIFIED' + end + + if attributes.key?(:'transient_mapping_attribute_name') + self.transient_mapping_attribute_name = attributes[:'transient_mapping_attribute_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + metadata_xml == o.metadata_xml && + binding == o.binding && + with_signed_request == o.with_signed_request && + name_id_format == o.name_id_format && + transient_mapping_attribute_name == o.transient_mapping_attribute_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [metadata_xml, binding, with_signed_request, name_id_format, transient_mapping_attribute_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb new file mode 100644 index 00000000..71650a2f --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_s_a_m_l_name_i_d_format.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdentityProviderServiceSAMLNameIDFormat + SAML_NAME_ID_FORMAT_UNSPECIFIED = "SAML_NAME_ID_FORMAT_UNSPECIFIED".freeze + SAML_NAME_ID_FORMAT_EMAIL_ADDRESS = "SAML_NAME_ID_FORMAT_EMAIL_ADDRESS".freeze + SAML_NAME_ID_FORMAT_PERSISTENT = "SAML_NAME_ID_FORMAT_PERSISTENT".freeze + SAML_NAME_ID_FORMAT_TRANSIENT = "SAML_NAME_ID_FORMAT_TRANSIENT".freeze + + def self.all_vars + @all_vars ||= [SAML_NAME_ID_FORMAT_UNSPECIFIED, SAML_NAME_ID_FORMAT_EMAIL_ADDRESS, SAML_NAME_ID_FORMAT_PERSISTENT, SAML_NAME_ID_FORMAT_TRANSIENT].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if IdentityProviderServiceSAMLNameIDFormat.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::IdentityProviderServiceSAMLNameIDFormat" + end + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_auth_request.rb b/lib/zitadel/client/models/o_i_d_c_service_auth_request.rb new file mode 100644 index 00000000..e264aeab --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_auth_request.rb @@ -0,0 +1,327 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceAuthRequest + # ID of the authorization request + attr_accessor :id + + # Time when the auth request was created + attr_accessor :creation_date + + # OIDC client ID of the application that created the auth request + attr_accessor :client_id + + # Requested scopes by the application, which the user must consent to. + attr_accessor :scope + + # Base URI that points back to the application + attr_accessor :redirect_uri + + # Prompts that must be displayed to the user + attr_accessor :prompt + + # 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. + attr_accessor :ui_locales + + # Login hint can be set by the application with a user identifier such as an email or phone number. + attr_accessor :login_hint + + # 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. + attr_accessor :max_age + + # User ID taken from a ID Token Hint if it was present and valid. + attr_accessor :hint_user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'creation_date' => :'creationDate', + :'client_id' => :'clientId', + :'scope' => :'scope', + :'redirect_uri' => :'redirectUri', + :'prompt' => :'prompt', + :'ui_locales' => :'uiLocales', + :'login_hint' => :'loginHint', + :'max_age' => :'maxAge', + :'hint_user_id' => :'hintUserId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'creation_date' => :'Time', + :'client_id' => :'String', + :'scope' => :'Array', + :'redirect_uri' => :'String', + :'prompt' => :'Array', + :'ui_locales' => :'Array', + :'login_hint' => :'String', + :'max_age' => :'String', + :'hint_user_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceAuthRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceAuthRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'scope') + if (value = attributes[:'scope']).is_a?(Array) + self.scope = value + end + end + + if attributes.key?(:'redirect_uri') + self.redirect_uri = attributes[:'redirect_uri'] + end + + if attributes.key?(:'prompt') + if (value = attributes[:'prompt']).is_a?(Array) + self.prompt = value + end + end + + if attributes.key?(:'ui_locales') + if (value = attributes[:'ui_locales']).is_a?(Array) + self.ui_locales = value + end + end + + if attributes.key?(:'login_hint') + self.login_hint = attributes[:'login_hint'] + end + + if attributes.key?(:'max_age') + self.max_age = attributes[:'max_age'] + end + + if attributes.key?(:'hint_user_id') + self.hint_user_id = attributes[:'hint_user_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + creation_date == o.creation_date && + client_id == o.client_id && + scope == o.scope && + redirect_uri == o.redirect_uri && + prompt == o.prompt && + ui_locales == o.ui_locales && + login_hint == o.login_hint && + max_age == o.max_age && + hint_user_id == o.hint_user_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, creation_date, client_id, scope, redirect_uri, prompt, ui_locales, login_hint, max_age, hint_user_id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb b/lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb new file mode 100644 index 00000000..913656b9 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_authorization_error.rb @@ -0,0 +1,272 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceAuthorizationError + attr_accessor :error + + attr_accessor :error_description + + attr_accessor :error_uri + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error', + :'error_description' => :'errorDescription', + :'error_uri' => :'errorUri' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'OIDCServiceErrorReason', + :'error_description' => :'String', + :'error_uri' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceAuthorizationError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceAuthorizationError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + else + self.error = 'ERROR_REASON_UNSPECIFIED' + end + + if attributes.key?(:'error_description') + self.error_description = attributes[:'error_description'] + end + + if attributes.key?(:'error_uri') + self.error_uri = attributes[:'error_uri'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error && + error_description == o.error_description && + error_uri == o.error_uri + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error, error_description, error_uri].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb b/lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb new file mode 100644 index 00000000..ab1595f3 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_authorize_or_deny_device_authorization_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest + attr_accessor :session + + attr_accessor :deny + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session' => :'session', + :'deny' => :'deny' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session' => :'OIDCServiceSession', + :'deny' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session') + self.session = attributes[:'session'] + end + + if attributes.key?(:'deny') + self.deny = attributes[:'deny'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session == o.session && + deny == o.deny + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session, deny].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb b/lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb new file mode 100644 index 00000000..90d9fa82 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_create_callback_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceCreateCallbackRequest + attr_accessor :session + + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session' => :'session', + :'error' => :'error' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session' => :'OIDCServiceSession', + :'error' => :'OIDCServiceAuthorizationError' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceCreateCallbackRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceCreateCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session') + self.session = attributes[:'session'] + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session == o.session && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session, error].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb b/lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb new file mode 100644 index 00000000..2883d8b2 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_create_callback_response.rb @@ -0,0 +1,240 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceCreateCallbackResponse + attr_accessor :details + + # 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. + attr_accessor :callback_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'callback_url' => :'callbackUrl' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'OIDCServiceDetails', + :'callback_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceCreateCallbackResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceCreateCallbackResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'callback_url') + self.callback_url = attributes[:'callback_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + callback_url == o.callback_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, callback_url].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_details.rb b/lib/zitadel/client/models/o_i_d_c_service_details.rb new file mode 100644 index 00000000..8153947b --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb b/lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb new file mode 100644 index 00000000..d06221ca --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_device_authorization_request.rb @@ -0,0 +1,273 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceDeviceAuthorizationRequest + # The unique identifier of the device authorization request to be used for authorizing or denying the request. + attr_accessor :id + + # The client_id of the application that initiated the device authorization request. + attr_accessor :client_id + + # The scopes requested by the application. + attr_accessor :scope + + # Name of the client application. + attr_accessor :app_name + + # Name of the project the client application is part of. + attr_accessor :project_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'client_id' => :'clientId', + :'scope' => :'scope', + :'app_name' => :'appName', + :'project_name' => :'projectName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'client_id' => :'String', + :'scope' => :'Array', + :'app_name' => :'String', + :'project_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceDeviceAuthorizationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceDeviceAuthorizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'scope') + if (value = attributes[:'scope']).is_a?(Array) + self.scope = value + end + end + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'project_name') + self.project_name = attributes[:'project_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + client_id == o.client_id && + scope == o.scope && + app_name == o.app_name && + project_name == o.project_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, client_id, scope, app_name, project_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_error_reason.rb b/lib/zitadel/client/models/o_i_d_c_service_error_reason.rb new file mode 100644 index 00000000..559d0051 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_error_reason.rb @@ -0,0 +1,56 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceErrorReason + ERROR_REASON_UNSPECIFIED = "ERROR_REASON_UNSPECIFIED".freeze + ERROR_REASON_INVALID_REQUEST = "ERROR_REASON_INVALID_REQUEST".freeze + ERROR_REASON_UNAUTHORIZED_CLIENT = "ERROR_REASON_UNAUTHORIZED_CLIENT".freeze + ERROR_REASON_ACCESS_DENIED = "ERROR_REASON_ACCESS_DENIED".freeze + ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE = "ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE".freeze + ERROR_REASON_INVALID_SCOPE = "ERROR_REASON_INVALID_SCOPE".freeze + ERROR_REASON_SERVER_ERROR = "ERROR_REASON_SERVER_ERROR".freeze + ERROR_REASON_TEMPORARY_UNAVAILABLE = "ERROR_REASON_TEMPORARY_UNAVAILABLE".freeze + ERROR_REASON_INTERACTION_REQUIRED = "ERROR_REASON_INTERACTION_REQUIRED".freeze + ERROR_REASON_LOGIN_REQUIRED = "ERROR_REASON_LOGIN_REQUIRED".freeze + ERROR_REASON_ACCOUNT_SELECTION_REQUIRED = "ERROR_REASON_ACCOUNT_SELECTION_REQUIRED".freeze + ERROR_REASON_CONSENT_REQUIRED = "ERROR_REASON_CONSENT_REQUIRED".freeze + ERROR_REASON_INVALID_REQUEST_URI = "ERROR_REASON_INVALID_REQUEST_URI".freeze + ERROR_REASON_INVALID_REQUEST_OBJECT = "ERROR_REASON_INVALID_REQUEST_OBJECT".freeze + ERROR_REASON_REQUEST_NOT_SUPPORTED = "ERROR_REASON_REQUEST_NOT_SUPPORTED".freeze + ERROR_REASON_REQUEST_URI_NOT_SUPPORTED = "ERROR_REASON_REQUEST_URI_NOT_SUPPORTED".freeze + ERROR_REASON_REGISTRATION_NOT_SUPPORTED = "ERROR_REASON_REGISTRATION_NOT_SUPPORTED".freeze + + def self.all_vars + @all_vars ||= [ERROR_REASON_UNSPECIFIED, ERROR_REASON_INVALID_REQUEST, ERROR_REASON_UNAUTHORIZED_CLIENT, ERROR_REASON_ACCESS_DENIED, ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE, ERROR_REASON_INVALID_SCOPE, ERROR_REASON_SERVER_ERROR, ERROR_REASON_TEMPORARY_UNAVAILABLE, ERROR_REASON_INTERACTION_REQUIRED, ERROR_REASON_LOGIN_REQUIRED, ERROR_REASON_ACCOUNT_SELECTION_REQUIRED, ERROR_REASON_CONSENT_REQUIRED, ERROR_REASON_INVALID_REQUEST_URI, ERROR_REASON_INVALID_REQUEST_OBJECT, ERROR_REASON_REQUEST_NOT_SUPPORTED, ERROR_REASON_REQUEST_URI_NOT_SUPPORTED, ERROR_REASON_REGISTRATION_NOT_SUPPORTED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if OIDCServiceErrorReason.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OIDCServiceErrorReason" + end + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb b/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb new file mode 100644 index 00000000..4fee18af --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceGetAuthRequestResponse + attr_accessor :auth_request + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'auth_request' => :'authRequest' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'auth_request' => :'OIDCServiceAuthRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceGetAuthRequestResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceGetAuthRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'auth_request') + self.auth_request = attributes[:'auth_request'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_request == o.auth_request + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [auth_request].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb b/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb new file mode 100644 index 00000000..51d48476 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceGetDeviceAuthorizationRequestResponse + attr_accessor :device_authorization_request + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'device_authorization_request' => :'deviceAuthorizationRequest' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'device_authorization_request' => :'OIDCServiceDeviceAuthorizationRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceGetDeviceAuthorizationRequestResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceGetDeviceAuthorizationRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'device_authorization_request') + self.device_authorization_request = attributes[:'device_authorization_request'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + device_authorization_request == o.device_authorization_request + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [device_authorization_request].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_prompt.rb b/lib/zitadel/client/models/o_i_d_c_service_prompt.rb new file mode 100644 index 00000000..a4368004 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_prompt.rb @@ -0,0 +1,45 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServicePrompt + PROMPT_UNSPECIFIED = "PROMPT_UNSPECIFIED".freeze + PROMPT_NONE = "PROMPT_NONE".freeze + PROMPT_LOGIN = "PROMPT_LOGIN".freeze + PROMPT_CONSENT = "PROMPT_CONSENT".freeze + PROMPT_SELECT_ACCOUNT = "PROMPT_SELECT_ACCOUNT".freeze + PROMPT_CREATE = "PROMPT_CREATE".freeze + + def self.all_vars + @all_vars ||= [PROMPT_UNSPECIFIED, PROMPT_NONE, PROMPT_LOGIN, PROMPT_CONSENT, PROMPT_SELECT_ACCOUNT, PROMPT_CREATE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if OIDCServicePrompt.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OIDCServicePrompt" + end + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb b/lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb new file mode 100644 index 00000000..6ae4aa78 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb b/lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb new file mode 100644 index 00000000..11451a0f --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/o_i_d_c_service_session.rb b/lib/zitadel/client/models/o_i_d_c_service_session.rb new file mode 100644 index 00000000..1493e4ed --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_session.rb @@ -0,0 +1,297 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OIDCServiceSession + # ID of the session, used to login the user. Connects the session to the Auth Request. + attr_accessor :session_id + + # Token to verify the session is valid + attr_accessor :session_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session_id' => :'sessionId', + :'session_token' => :'sessionToken' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session_id' => :'String', + :'session_token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceSession` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'session_token') + self.session_token = attributes[:'session_token'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@session_id.nil? && @session_id.to_s.length > 200 + invalid_properties.push('invalid value for "session_id", the character length must be smaller than or equal to 200.') + end + + if !@session_id.nil? && @session_id.to_s.length < 1 + invalid_properties.push('invalid value for "session_id", the character length must be great than or equal to 1.') + end + + if !@session_token.nil? && @session_token.to_s.length > 200 + invalid_properties.push('invalid value for "session_token", the character length must be smaller than or equal to 200.') + end + + if !@session_token.nil? && @session_token.to_s.length < 1 + invalid_properties.push('invalid value for "session_token", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@session_id.nil? && @session_id.to_s.length > 200 + return false if !@session_id.nil? && @session_id.to_s.length < 1 + return false if !@session_token.nil? && @session_token.to_s.length > 200 + return false if !@session_token.nil? && @session_token.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] session_id Value to be assigned + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'session_id cannot be nil' + end + + if session_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "session_id", the character length must be smaller than or equal to 200.' + end + + if session_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "session_id", the character length must be great than or equal to 1.' + end + + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param [Object] session_token Value to be assigned + def session_token=(session_token) + if session_token.nil? + fail ArgumentError, 'session_token cannot be nil' + end + + if session_token.to_s.length > 200 + fail ArgumentError, 'invalid value for "session_token", the character length must be smaller than or equal to 200.' + end + + if session_token.to_s.length < 1 + fail ArgumentError, 'invalid value for "session_token", the character length must be great than or equal to 1.' + end + + @session_token = session_token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session_id == o.session_id && + session_token == o.session_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session_id, session_token].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_add_human_user_request.rb b/lib/zitadel/client/models/organization_service_add_human_user_request.rb new file mode 100644 index 00000000..dd4838c1 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_add_human_user_request.rb @@ -0,0 +1,445 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceAddHumanUserRequest + # optionally set your own id unique for the user. + attr_accessor :user_id + + # optionally set a unique username, if none is provided the email will be used. + attr_accessor :username + + attr_accessor :organization + + attr_accessor :profile + + attr_accessor :email + + attr_accessor :phone + + attr_accessor :metadata + + attr_accessor :password + + attr_accessor :hashed_password + + attr_accessor :idp_links + + # 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. + attr_accessor :totp_secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'username' => :'username', + :'organization' => :'organization', + :'profile' => :'profile', + :'email' => :'email', + :'phone' => :'phone', + :'metadata' => :'metadata', + :'password' => :'password', + :'hashed_password' => :'hashedPassword', + :'idp_links' => :'idpLinks', + :'totp_secret' => :'totpSecret' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'username' => :'String', + :'organization' => :'Zitadelobjectv2Organization', + :'profile' => :'OrganizationServiceSetHumanProfile', + :'email' => :'OrganizationServiceSetHumanEmail', + :'phone' => :'OrganizationServiceSetHumanPhone', + :'metadata' => :'Array', + :'password' => :'OrganizationServicePassword', + :'hashed_password' => :'OrganizationServiceHashedPassword', + :'idp_links' => :'Array', + :'totp_secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddHumanUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddHumanUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'organization') + self.organization = attributes[:'organization'] + end + + if attributes.key?(:'profile') + self.profile = attributes[:'profile'] + else + self.profile = nil + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + else + self.email = nil + end + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Array) + self.metadata = value + end + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'hashed_password') + self.hashed_password = attributes[:'hashed_password'] + end + + if attributes.key?(:'idp_links') + if (value = attributes[:'idp_links']).is_a?(Array) + self.idp_links = value + end + end + + if attributes.key?(:'totp_secret') + self.totp_secret = attributes[:'totp_secret'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@user_id.nil? && @user_id.to_s.length > 200 + invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') + end + + if !@user_id.nil? && @user_id.to_s.length < 1 + invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') + end + + if !@username.nil? && @username.to_s.length > 200 + invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') + end + + if !@username.nil? && @username.to_s.length < 1 + invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') + end + + if @profile.nil? + invalid_properties.push('invalid value for "profile", profile cannot be nil.') + end + + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if !@totp_secret.nil? && @totp_secret.to_s.length > 200 + invalid_properties.push('invalid value for "totp_secret", the character length must be smaller than or equal to 200.') + end + + if !@totp_secret.nil? && @totp_secret.to_s.length < 1 + invalid_properties.push('invalid value for "totp_secret", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@user_id.nil? && @user_id.to_s.length > 200 + return false if !@user_id.nil? && @user_id.to_s.length < 1 + return false if !@username.nil? && @username.to_s.length > 200 + return false if !@username.nil? && @username.to_s.length < 1 + return false if @profile.nil? + return false if @email.nil? + return false if !@totp_secret.nil? && @totp_secret.to_s.length > 200 + return false if !@totp_secret.nil? && @totp_secret.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + if user_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' + end + + if user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [Object] username Value to be assigned + def username=(username) + if username.nil? + fail ArgumentError, 'username cannot be nil' + end + + if username.to_s.length > 200 + fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' + end + + if username.to_s.length < 1 + fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' + end + + @username = username + end + + # Custom attribute writer method with validation + # @param [Object] profile Value to be assigned + def profile=(profile) + if profile.nil? + fail ArgumentError, 'profile cannot be nil' + end + + @profile = profile + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if email.nil? + fail ArgumentError, 'email cannot be nil' + end + + @email = email + end + + # Custom attribute writer method with validation + # @param [Object] totp_secret Value to be assigned + def totp_secret=(totp_secret) + if totp_secret.nil? + fail ArgumentError, 'totp_secret cannot be nil' + end + + if totp_secret.to_s.length > 200 + fail ArgumentError, 'invalid value for "totp_secret", the character length must be smaller than or equal to 200.' + end + + if totp_secret.to_s.length < 1 + fail ArgumentError, 'invalid value for "totp_secret", the character length must be great than or equal to 1.' + end + + @totp_secret = totp_secret + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + username == o.username && + organization == o.organization && + profile == o.profile && + email == o.email && + phone == o.phone && + metadata == o.metadata && + password == o.password && + hashed_password == o.hashed_password && + idp_links == o.idp_links && + totp_secret == o.totp_secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, username, organization, profile, email, phone, metadata, password, hashed_password, idp_links, totp_secret].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_add_organization_request.rb b/lib/zitadel/client/models/organization_service_add_organization_request.rb new file mode 100644 index 00000000..4e94397e --- /dev/null +++ b/lib/zitadel/client/models/organization_service_add_organization_request.rb @@ -0,0 +1,276 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceAddOrganizationRequest + attr_accessor :name + + attr_accessor :admins + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'admins' => :'admins' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'admins' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'admins') + if (value = attributes[:'admins']).is_a?(Array) + self.admins = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 200 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.') + end + + if @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @name.nil? + return false if @name.to_s.length > 200 + return false if @name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 200 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + admins == o.admins + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, admins].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_add_organization_request_admin.rb b/lib/zitadel/client/models/organization_service_add_organization_request_admin.rb new file mode 100644 index 00000000..d923e441 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_add_organization_request_admin.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceAddOrganizationRequestAdmin + attr_accessor :user_id + + attr_accessor :human + + attr_accessor :roles + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'human' => :'human', + :'roles' => :'roles' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'human' => :'OrganizationServiceAddHumanUserRequest', + :'roles' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequestAdmin` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationRequestAdmin`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'human') + self.human = attributes[:'human'] + end + + if attributes.key?(:'roles') + if (value = attributes[:'roles']).is_a?(Array) + self.roles = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + human == o.human && + roles == o.roles + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, human, roles].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_add_organization_response.rb b/lib/zitadel/client/models/organization_service_add_organization_response.rb new file mode 100644 index 00000000..138e04c4 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_add_organization_response.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceAddOrganizationResponse + attr_accessor :details + + attr_accessor :organization_id + + attr_accessor :created_admins + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'organization_id' => :'organizationId', + :'created_admins' => :'createdAdmins' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'OrganizationServiceDetails', + :'organization_id' => :'String', + :'created_admins' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'created_admins') + if (value = attributes[:'created_admins']).is_a?(Array) + self.created_admins = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + organization_id == o.organization_id && + created_admins == o.created_admins + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, organization_id, created_admins].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb b/lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb new file mode 100644 index 00000000..9f746208 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_add_organization_response_created_admin.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceAddOrganizationResponseCreatedAdmin + attr_accessor :user_id + + attr_accessor :email_code + + attr_accessor :phone_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'email_code' => :'emailCode', + :'phone_code' => :'phoneCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'email_code' => :'String', + :'phone_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponseCreatedAdmin` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAddOrganizationResponseCreatedAdmin`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'email_code') + self.email_code = attributes[:'email_code'] + end + + if attributes.key?(:'phone_code') + self.phone_code = attributes[:'phone_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + email_code == o.email_code && + phone_code == o.phone_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, email_code, phone_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_details.rb b/lib/zitadel/client/models/organization_service_details.rb new file mode 100644 index 00000000..4b8d6a89 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_gender.rb b/lib/zitadel/client/models/organization_service_gender.rb new file mode 100644 index 00000000..935b3f19 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_gender.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceGender + GENDER_UNSPECIFIED = "GENDER_UNSPECIFIED".freeze + GENDER_FEMALE = "GENDER_FEMALE".freeze + GENDER_MALE = "GENDER_MALE".freeze + GENDER_DIVERSE = "GENDER_DIVERSE".freeze + + def self.all_vars + @all_vars ||= [GENDER_UNSPECIFIED, GENDER_FEMALE, GENDER_MALE, GENDER_DIVERSE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if OrganizationServiceGender.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceGender" + end + end + +end diff --git a/lib/zitadel/client/models/organization_service_hashed_password.rb b/lib/zitadel/client/models/organization_service_hashed_password.rb new file mode 100644 index 00000000..232c25ef --- /dev/null +++ b/lib/zitadel/client/models/organization_service_hashed_password.rb @@ -0,0 +1,275 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceHashedPassword + # \"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\" + attr_accessor :hash + + attr_accessor :change_required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'hash' => :'hash', + :'change_required' => :'changeRequired' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'hash' => :'String', + :'change_required' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceHashedPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceHashedPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'hash') + self.hash = attributes[:'hash'] + else + self.hash = nil + end + + if attributes.key?(:'change_required') + self.change_required = attributes[:'change_required'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @hash.nil? + invalid_properties.push('invalid value for "hash", hash cannot be nil.') + end + + if @hash.to_s.length > 200 + invalid_properties.push('invalid value for "hash", the character length must be smaller than or equal to 200.') + end + + if @hash.to_s.length < 1 + invalid_properties.push('invalid value for "hash", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @hash.nil? + return false if @hash.to_s.length > 200 + return false if @hash.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] hash Value to be assigned + def hash=(hash) + if hash.nil? + fail ArgumentError, 'hash cannot be nil' + end + + if hash.to_s.length > 200 + fail ArgumentError, 'invalid value for "hash", the character length must be smaller than or equal to 200.' + end + + if hash.to_s.length < 1 + fail ArgumentError, 'invalid value for "hash", the character length must be great than or equal to 1.' + end + + @hash = hash + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hash == o.hash && + change_required == o.change_required + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [hash, change_required].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_i_d_p_link.rb b/lib/zitadel/client/models/organization_service_i_d_p_link.rb new file mode 100644 index 00000000..bab15485 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_i_d_p_link.rb @@ -0,0 +1,335 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceIDPLink + # ID of the identity provider + attr_accessor :idp_id + + # ID of the user of the identity provider + attr_accessor :user_id + + # username of the user of the identity provider + attr_accessor :user_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_id' => :'idpId', + :'user_id' => :'userId', + :'user_name' => :'userName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp_id' => :'String', + :'user_id' => :'String', + :'user_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceIDPLink` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceIDPLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp_id') + self.idp_id = attributes[:'idp_id'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@idp_id.nil? && @idp_id.to_s.length > 200 + invalid_properties.push('invalid value for "idp_id", the character length must be smaller than or equal to 200.') + end + + if !@idp_id.nil? && @idp_id.to_s.length < 1 + invalid_properties.push('invalid value for "idp_id", the character length must be great than or equal to 1.') + end + + if !@user_id.nil? && @user_id.to_s.length > 200 + invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') + end + + if !@user_id.nil? && @user_id.to_s.length < 1 + invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') + end + + if !@user_name.nil? && @user_name.to_s.length > 200 + invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 200.') + end + + if !@user_name.nil? && @user_name.to_s.length < 1 + invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@idp_id.nil? && @idp_id.to_s.length > 200 + return false if !@idp_id.nil? && @idp_id.to_s.length < 1 + return false if !@user_id.nil? && @user_id.to_s.length > 200 + return false if !@user_id.nil? && @user_id.to_s.length < 1 + return false if !@user_name.nil? && @user_name.to_s.length > 200 + return false if !@user_name.nil? && @user_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] idp_id Value to be assigned + def idp_id=(idp_id) + if idp_id.nil? + fail ArgumentError, 'idp_id cannot be nil' + end + + if idp_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_id", the character length must be smaller than or equal to 200.' + end + + if idp_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_id", the character length must be great than or equal to 1.' + end + + @idp_id = idp_id + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + if user_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' + end + + if user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [Object] user_name Value to be assigned + def user_name=(user_name) + if user_name.nil? + fail ArgumentError, 'user_name cannot be nil' + end + + if user_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 200.' + end + + if user_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.' + end + + @user_name = user_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp_id == o.idp_id && + user_id == o.user_id && + user_name == o.user_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp_id, user_id, user_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_list_details.rb b/lib/zitadel/client/models/organization_service_list_details.rb new file mode 100644 index 00000000..5ffd426f --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_details.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # the last time the projection got updated + attr_accessor :timestamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_result' => :'totalResult', + :'processed_sequence' => :'processedSequence', + :'timestamp' => :'timestamp' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total_result' => :'String', + :'processed_sequence' => :'String', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total_result') + self.total_result = attributes[:'total_result'] + end + + if attributes.key?(:'processed_sequence') + self.processed_sequence = attributes[:'processed_sequence'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_result == o.total_result && + processed_sequence == o.processed_sequence && + timestamp == o.timestamp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total_result, processed_sequence, timestamp].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_list_organizations_request.rb b/lib/zitadel/client/models/organization_service_list_organizations_request.rb new file mode 100644 index 00000000..978396f0 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_organizations_request.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceListOrganizationsRequest + attr_accessor :query + + attr_accessor :sorting_column + + attr_accessor :queries + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'query' => :'query', + :'sorting_column' => :'sortingColumn', + :'queries' => :'queries' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'query' => :'OrganizationServiceListQuery', + :'sorting_column' => :'OrganizationServiceOrganizationFieldName', + :'queries' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListOrganizationsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListOrganizationsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'sorting_column') + self.sorting_column = attributes[:'sorting_column'] + else + self.sorting_column = 'ORGANIZATION_FIELD_NAME_UNSPECIFIED' + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query && + sorting_column == o.sorting_column && + queries == o.queries + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [query, sorting_column, queries].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_list_organizations_response.rb b/lib/zitadel/client/models/organization_service_list_organizations_response.rb new file mode 100644 index 00000000..0dc2d308 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_organizations_response.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceListOrganizationsResponse + attr_accessor :details + + attr_accessor :sorting_column + + attr_accessor :result + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'sorting_column' => :'sortingColumn', + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'OrganizationServiceListDetails', + :'sorting_column' => :'OrganizationServiceOrganizationFieldName', + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListOrganizationsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListOrganizationsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'sorting_column') + self.sorting_column = attributes[:'sorting_column'] + else + self.sorting_column = 'ORGANIZATION_FIELD_NAME_UNSPECIFIED' + end + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + sorting_column == o.sorting_column && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, sorting_column, result].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_list_query.rb b/lib/zitadel/client/models/organization_service_list_query.rb new file mode 100644 index 00000000..23b0f181 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_query.rb @@ -0,0 +1,251 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Object unspecific list filters like offset, limit and asc/desc. + class OrganizationServiceListQuery + attr_accessor :offset + + # 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. + attr_accessor :limit + + # default is descending + attr_accessor :asc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'offset' => :'offset', + :'limit' => :'limit', + :'asc' => :'asc' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'offset' => :'String', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceListQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceListQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'asc') + self.asc = attributes[:'asc'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + offset == o.offset && + limit == o.limit && + asc == o.asc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [offset, limit, asc].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_organization_domain_query.rb b/lib/zitadel/client/models/organization_service_organization_domain_query.rb new file mode 100644 index 00000000..8050b183 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_organization_domain_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceOrganizationDomainQuery + # Domain used in organization, not necessary primary domain. + attr_accessor :domain + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'domain', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String', + :'method' => :'OrganizationServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationDomainQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationDomainQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + else + self.domain = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @domain.nil? + invalid_properties.push('invalid value for "domain", domain cannot be nil.') + end + + if @domain.to_s.length > 200 + invalid_properties.push('invalid value for "domain", the character length must be smaller than or equal to 200.') + end + + if @domain.to_s.length < 1 + invalid_properties.push('invalid value for "domain", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @domain.nil? + return false if @domain.to_s.length > 200 + return false if @domain.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] domain Value to be assigned + def domain=(domain) + if domain.nil? + fail ArgumentError, 'domain cannot be nil' + end + + if domain.to_s.length > 200 + fail ArgumentError, 'invalid value for "domain", the character length must be smaller than or equal to 200.' + end + + if domain.to_s.length < 1 + fail ArgumentError, 'invalid value for "domain", the character length must be great than or equal to 1.' + end + + @domain = domain + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_organization_field_name.rb b/lib/zitadel/client/models/organization_service_organization_field_name.rb new file mode 100644 index 00000000..c00de812 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_organization_field_name.rb @@ -0,0 +1,41 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceOrganizationFieldName + ORGANIZATION_FIELD_NAME_UNSPECIFIED = "ORGANIZATION_FIELD_NAME_UNSPECIFIED".freeze + ORGANIZATION_FIELD_NAME_NAME = "ORGANIZATION_FIELD_NAME_NAME".freeze + + def self.all_vars + @all_vars ||= [ORGANIZATION_FIELD_NAME_UNSPECIFIED, ORGANIZATION_FIELD_NAME_NAME].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if OrganizationServiceOrganizationFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceOrganizationFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/organization_service_organization_i_d_query.rb b/lib/zitadel/client/models/organization_service_organization_i_d_query.rb new file mode 100644 index 00000000..68d26344 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_organization_i_d_query.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceOrganizationIDQuery + # Unique identifier of the organization. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationIDQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationIDQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @id.to_s.length > 200 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 200.') + end + + if @id.to_s.length < 1 + invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @id.to_s.length > 200 + return false if @id.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + if id.to_s.length > 200 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 200.' + end + + if id.to_s.length < 1 + fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.' + end + + @id = id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_organization_name_query.rb b/lib/zitadel/client/models/organization_service_organization_name_query.rb new file mode 100644 index 00000000..cc7b0eda --- /dev/null +++ b/lib/zitadel/client/models/organization_service_organization_name_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceOrganizationNameQuery + # Name of the organization. + attr_accessor :name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'method' => :'OrganizationServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 200 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.') + end + + if @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @name.nil? + return false if @name.to_s.length > 200 + return false if @name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 200 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_organization_state.rb b/lib/zitadel/client/models/organization_service_organization_state.rb new file mode 100644 index 00000000..a1f261f3 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_organization_state.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceOrganizationState + ORGANIZATION_STATE_UNSPECIFIED = "ORGANIZATION_STATE_UNSPECIFIED".freeze + ORGANIZATION_STATE_ACTIVE = "ORGANIZATION_STATE_ACTIVE".freeze + ORGANIZATION_STATE_INACTIVE = "ORGANIZATION_STATE_INACTIVE".freeze + ORGANIZATION_STATE_REMOVED = "ORGANIZATION_STATE_REMOVED".freeze + + def self.all_vars + @all_vars ||= [ORGANIZATION_STATE_UNSPECIFIED, ORGANIZATION_STATE_ACTIVE, ORGANIZATION_STATE_INACTIVE, ORGANIZATION_STATE_REMOVED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if OrganizationServiceOrganizationState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceOrganizationState" + end + end + +end diff --git a/lib/zitadel/client/models/organization_service_organization_state_query.rb b/lib/zitadel/client/models/organization_service_organization_state_query.rb new file mode 100644 index 00000000..ccd127ed --- /dev/null +++ b/lib/zitadel/client/models/organization_service_organization_state_query.rb @@ -0,0 +1,254 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceOrganizationStateQuery + attr_accessor :state + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state' => :'state' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'state' => :'OrganizationServiceOrganizationState' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceOrganizationStateQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganizationStateQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'ORGANIZATION_STATE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + state == o.state + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [state].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_password.rb b/lib/zitadel/client/models/organization_service_password.rb new file mode 100644 index 00000000..a584ee61 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_password.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServicePassword + attr_accessor :password + + attr_accessor :change_required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'password' => :'password', + :'change_required' => :'changeRequired' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'password' => :'String', + :'change_required' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServicePassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServicePassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'password') + self.password = attributes[:'password'] + else + self.password = nil + end + + if attributes.key?(:'change_required') + self.change_required = attributes[:'change_required'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @password.nil? + invalid_properties.push('invalid value for "password", password cannot be nil.') + end + + if @password.to_s.length > 200 + invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') + end + + if @password.to_s.length < 1 + invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @password.nil? + return false if @password.to_s.length > 200 + return false if @password.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + end + + if password.to_s.length > 200 + fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' + end + + if password.to_s.length < 1 + fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' + end + + @password = password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + password == o.password && + change_required == o.change_required + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [password, change_required].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_protobuf_any.rb b/lib/zitadel/client/models/organization_service_protobuf_any.rb new file mode 100644 index 00000000..815a1efe --- /dev/null +++ b/lib/zitadel/client/models/organization_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_rpc_status.rb b/lib/zitadel/client/models/organization_service_rpc_status.rb new file mode 100644 index 00000000..f42b6076 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_search_query.rb b/lib/zitadel/client/models/organization_service_search_query.rb new file mode 100644 index 00000000..e6efd29b --- /dev/null +++ b/lib/zitadel/client/models/organization_service_search_query.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceSearchQuery + attr_accessor :name_query + + attr_accessor :domain_query + + attr_accessor :state_query + + attr_accessor :id_query + + attr_accessor :default_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name_query' => :'nameQuery', + :'domain_query' => :'domainQuery', + :'state_query' => :'stateQuery', + :'id_query' => :'idQuery', + :'default_query' => :'defaultQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name_query' => :'OrganizationServiceOrganizationNameQuery', + :'domain_query' => :'OrganizationServiceOrganizationDomainQuery', + :'state_query' => :'OrganizationServiceOrganizationStateQuery', + :'id_query' => :'OrganizationServiceOrganizationIDQuery', + :'default_query' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSearchQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSearchQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name_query') + self.name_query = attributes[:'name_query'] + end + + if attributes.key?(:'domain_query') + self.domain_query = attributes[:'domain_query'] + end + + if attributes.key?(:'state_query') + self.state_query = attributes[:'state_query'] + end + + if attributes.key?(:'id_query') + self.id_query = attributes[:'id_query'] + end + + if attributes.key?(:'default_query') + self.default_query = attributes[:'default_query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name_query == o.name_query && + domain_query == o.domain_query && + state_query == o.state_query && + id_query == o.id_query && + default_query == o.default_query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name_query, domain_query, state_query, id_query, default_query].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_send_email_verification_code.rb b/lib/zitadel/client/models/organization_service_send_email_verification_code.rb new file mode 100644 index 00000000..9f0e07e6 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_send_email_verification_code.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceSendEmailVerificationCode + # 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 + attr_accessor :url_template + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url_template' => :'urlTemplate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url_template' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSendEmailVerificationCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSendEmailVerificationCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url_template') + self.url_template = attributes[:'url_template'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@url_template.nil? && @url_template.to_s.length > 200 + invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') + end + + if !@url_template.nil? && @url_template.to_s.length < 1 + invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@url_template.nil? && @url_template.to_s.length > 200 + return false if !@url_template.nil? && @url_template.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] url_template Value to be assigned + def url_template=(url_template) + if url_template.nil? + fail ArgumentError, 'url_template cannot be nil' + end + + if url_template.to_s.length > 200 + fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' + end + + if url_template.to_s.length < 1 + fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' + end + + @url_template = url_template + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url_template == o.url_template + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url_template].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_set_human_email.rb b/lib/zitadel/client/models/organization_service_set_human_email.rb new file mode 100644 index 00000000..319a29ee --- /dev/null +++ b/lib/zitadel/client/models/organization_service_set_human_email.rb @@ -0,0 +1,292 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceSetHumanEmail + attr_accessor :email + + attr_accessor :send_code + + attr_accessor :return_code + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'send_code' => :'sendCode', + :'return_code' => :'returnCode', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'String', + :'send_code' => :'OrganizationServiceSendEmailVerificationCode', + :'return_code' => :'Object', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetHumanEmail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetHumanEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + else + self.email = nil + end + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if @email.to_s.length > 200 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') + end + + if @email.to_s.length < 1 + invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @email.nil? + return false if @email.to_s.length > 200 + return false if @email.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if email.nil? + fail ArgumentError, 'email cannot be nil' + end + + if email.to_s.length > 200 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' + end + + if email.to_s.length < 1 + fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' + end + + @email = email + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + send_code == o.send_code && + return_code == o.return_code && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, send_code, return_code, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_set_human_phone.rb b/lib/zitadel/client/models/organization_service_set_human_phone.rb new file mode 100644 index 00000000..826b79d7 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_set_human_phone.rb @@ -0,0 +1,276 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceSetHumanPhone + attr_accessor :phone + + attr_accessor :send_code + + attr_accessor :return_code + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'phone' => :'phone', + :'send_code' => :'sendCode', + :'return_code' => :'returnCode', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'phone' => :'String', + :'send_code' => :'Object', + :'return_code' => :'Object', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetHumanPhone` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetHumanPhone`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@phone.nil? && @phone.to_s.length > 200 + invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@phone.nil? && @phone.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] phone Value to be assigned + def phone=(phone) + if phone.nil? + fail ArgumentError, 'phone cannot be nil' + end + + if phone.to_s.length > 200 + fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' + end + + @phone = phone + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + phone == o.phone && + send_code == o.send_code && + return_code == o.return_code && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [phone, send_code, return_code, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_set_human_profile.rb b/lib/zitadel/client/models/organization_service_set_human_profile.rb new file mode 100644 index 00000000..5a7b5a4d --- /dev/null +++ b/lib/zitadel/client/models/organization_service_set_human_profile.rb @@ -0,0 +1,426 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceSetHumanProfile + attr_accessor :given_name + + attr_accessor :family_name + + attr_accessor :nick_name + + attr_accessor :display_name + + attr_accessor :preferred_language + + attr_accessor :gender + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'given_name' => :'givenName', + :'family_name' => :'familyName', + :'nick_name' => :'nickName', + :'display_name' => :'displayName', + :'preferred_language' => :'preferredLanguage', + :'gender' => :'gender' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'given_name' => :'String', + :'family_name' => :'String', + :'nick_name' => :'String', + :'display_name' => :'String', + :'preferred_language' => :'String', + :'gender' => :'OrganizationServiceGender' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetHumanProfile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetHumanProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'given_name') + self.given_name = attributes[:'given_name'] + else + self.given_name = nil + end + + if attributes.key?(:'family_name') + self.family_name = attributes[:'family_name'] + else + self.family_name = nil + end + + if attributes.key?(:'nick_name') + self.nick_name = attributes[:'nick_name'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'preferred_language') + self.preferred_language = attributes[:'preferred_language'] + end + + if attributes.key?(:'gender') + self.gender = attributes[:'gender'] + else + self.gender = 'GENDER_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @given_name.nil? + invalid_properties.push('invalid value for "given_name", given_name cannot be nil.') + end + + if @given_name.to_s.length > 200 + invalid_properties.push('invalid value for "given_name", the character length must be smaller than or equal to 200.') + end + + if @given_name.to_s.length < 1 + invalid_properties.push('invalid value for "given_name", the character length must be great than or equal to 1.') + end + + if @family_name.nil? + invalid_properties.push('invalid value for "family_name", family_name cannot be nil.') + end + + if @family_name.to_s.length > 200 + invalid_properties.push('invalid value for "family_name", the character length must be smaller than or equal to 200.') + end + + if @family_name.to_s.length < 1 + invalid_properties.push('invalid value for "family_name", the character length must be great than or equal to 1.') + end + + if !@nick_name.nil? && @nick_name.to_s.length > 200 + invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') + end + + if !@display_name.nil? && @display_name.to_s.length > 200 + invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') + end + + if !@preferred_language.nil? && @preferred_language.to_s.length > 10 + invalid_properties.push('invalid value for "preferred_language", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @given_name.nil? + return false if @given_name.to_s.length > 200 + return false if @given_name.to_s.length < 1 + return false if @family_name.nil? + return false if @family_name.to_s.length > 200 + return false if @family_name.to_s.length < 1 + return false if !@nick_name.nil? && @nick_name.to_s.length > 200 + return false if !@display_name.nil? && @display_name.to_s.length > 200 + return false if !@preferred_language.nil? && @preferred_language.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] given_name Value to be assigned + def given_name=(given_name) + if given_name.nil? + fail ArgumentError, 'given_name cannot be nil' + end + + if given_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "given_name", the character length must be smaller than or equal to 200.' + end + + if given_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "given_name", the character length must be great than or equal to 1.' + end + + @given_name = given_name + end + + # Custom attribute writer method with validation + # @param [Object] family_name Value to be assigned + def family_name=(family_name) + if family_name.nil? + fail ArgumentError, 'family_name cannot be nil' + end + + if family_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "family_name", the character length must be smaller than or equal to 200.' + end + + if family_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "family_name", the character length must be great than or equal to 1.' + end + + @family_name = family_name + end + + # Custom attribute writer method with validation + # @param [Object] nick_name Value to be assigned + def nick_name=(nick_name) + if nick_name.nil? + fail ArgumentError, 'nick_name cannot be nil' + end + + if nick_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' + end + + @nick_name = nick_name + end + + # Custom attribute writer method with validation + # @param [Object] display_name Value to be assigned + def display_name=(display_name) + if display_name.nil? + fail ArgumentError, 'display_name cannot be nil' + end + + if display_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' + end + + @display_name = display_name + end + + # Custom attribute writer method with validation + # @param [Object] preferred_language Value to be assigned + def preferred_language=(preferred_language) + if preferred_language.nil? + fail ArgumentError, 'preferred_language cannot be nil' + end + + if preferred_language.to_s.length > 10 + fail ArgumentError, 'invalid value for "preferred_language", the character length must be smaller than or equal to 10.' + end + + @preferred_language = preferred_language + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + given_name == o.given_name && + family_name == o.family_name && + nick_name == o.nick_name && + display_name == o.display_name && + preferred_language == o.preferred_language && + gender == o.gender + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [given_name, family_name, nick_name, display_name, preferred_language, gender].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_set_metadata_entry.rb b/lib/zitadel/client/models/organization_service_set_metadata_entry.rb new file mode 100644 index 00000000..d2177396 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_set_metadata_entry.rb @@ -0,0 +1,310 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceSetMetadataEntry + attr_accessor :key + + # The value has to be base64 encoded. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'key' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceSetMetadataEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceSetMetadataEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'key') + self.key = attributes[:'key'] + else + self.key = nil + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + else + self.value = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @key.nil? + invalid_properties.push('invalid value for "key", key cannot be nil.') + end + + if @key.to_s.length > 200 + invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 200.') + end + + if @key.to_s.length < 1 + invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + if @value.to_s.length > 500000 + invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 500000.') + end + + if @value.to_s.length < 1 + invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @key.nil? + return false if @key.to_s.length > 200 + return false if @key.to_s.length < 1 + return false if @value.nil? + return false if @value.to_s.length > 500000 + return false if @value.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] key Value to be assigned + def key=(key) + if key.nil? + fail ArgumentError, 'key cannot be nil' + end + + if key.to_s.length > 200 + fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 200.' + end + + if key.to_s.length < 1 + fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.' + end + + @key = key + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + if value.nil? + fail ArgumentError, 'value cannot be nil' + end + + if value.to_s.length > 500000 + fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 500000.' + end + + if value.to_s.length < 1 + fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.' + end + + @value = value + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + key == o.key && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [key, value].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/organization_service_text_query_method.rb b/lib/zitadel/client/models/organization_service_text_query_method.rb new file mode 100644 index 00000000..5152fe17 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_text_query_method.rb @@ -0,0 +1,47 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationServiceTextQueryMethod + TEXT_QUERY_METHOD_EQUALS = "TEXT_QUERY_METHOD_EQUALS".freeze + TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE".freeze + TEXT_QUERY_METHOD_STARTS_WITH = "TEXT_QUERY_METHOD_STARTS_WITH".freeze + TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE".freeze + TEXT_QUERY_METHOD_CONTAINS = "TEXT_QUERY_METHOD_CONTAINS".freeze + TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE".freeze + TEXT_QUERY_METHOD_ENDS_WITH = "TEXT_QUERY_METHOD_ENDS_WITH".freeze + TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE".freeze + + def self.all_vars + @all_vars ||= [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if OrganizationServiceTextQueryMethod.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::OrganizationServiceTextQueryMethod" + end + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb b/lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb new file mode 100644 index 00000000..53e24906 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_authorization_error.rb @@ -0,0 +1,263 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceAuthorizationError + attr_accessor :error + + attr_accessor :error_description + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error', + :'error_description' => :'errorDescription' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'SAMLServiceErrorReason', + :'error_description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceAuthorizationError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceAuthorizationError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + else + self.error = 'ERROR_REASON_UNSPECIFIED' + end + + if attributes.key?(:'error_description') + self.error_description = attributes[:'error_description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error && + error_description == o.error_description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error, error_description].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb b/lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb new file mode 100644 index 00000000..1bd0a70b --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_create_response_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceCreateResponseRequest + attr_accessor :session + + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session' => :'session', + :'error' => :'error' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session' => :'SAMLServiceSession', + :'error' => :'SAMLServiceAuthorizationError' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceCreateResponseRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceCreateResponseRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session') + self.session = attributes[:'session'] + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session == o.session && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session, error].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb b/lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb new file mode 100644 index 00000000..c84d8c9f --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_create_response_response.rb @@ -0,0 +1,258 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceCreateResponseResponse + attr_accessor :details + + # 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. + attr_accessor :url + + attr_accessor :redirect + + attr_accessor :post + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'url' => :'url', + :'redirect' => :'redirect', + :'post' => :'post' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SAMLServiceDetails', + :'url' => :'String', + :'redirect' => :'Object', + :'post' => :'SAMLServicePostResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceCreateResponseResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceCreateResponseResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'redirect') + self.redirect = attributes[:'redirect'] + end + + if attributes.key?(:'post') + self.post = attributes[:'post'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + url == o.url && + redirect == o.redirect && + post == o.post + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, url, redirect, post].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_details.rb b/lib/zitadel/client/models/s_a_m_l_service_details.rb new file mode 100644 index 00000000..abc08358 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_error_reason.rb b/lib/zitadel/client/models/s_a_m_l_service_error_reason.rb new file mode 100644 index 00000000..67d3c02e --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_error_reason.rb @@ -0,0 +1,47 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceErrorReason + ERROR_REASON_UNSPECIFIED = "ERROR_REASON_UNSPECIFIED".freeze + ERROR_REASON_VERSION_MISSMATCH = "ERROR_REASON_VERSION_MISSMATCH".freeze + ERROR_REASON_AUTH_N_FAILED = "ERROR_REASON_AUTH_N_FAILED".freeze + ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE = "ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE".freeze + ERROR_REASON_INVALID_NAMEID_POLICY = "ERROR_REASON_INVALID_NAMEID_POLICY".freeze + ERROR_REASON_REQUEST_DENIED = "ERROR_REASON_REQUEST_DENIED".freeze + ERROR_REASON_REQUEST_UNSUPPORTED = "ERROR_REASON_REQUEST_UNSUPPORTED".freeze + ERROR_REASON_UNSUPPORTED_BINDING = "ERROR_REASON_UNSUPPORTED_BINDING".freeze + + def self.all_vars + @all_vars ||= [ERROR_REASON_UNSPECIFIED, ERROR_REASON_VERSION_MISSMATCH, ERROR_REASON_AUTH_N_FAILED, ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE, ERROR_REASON_INVALID_NAMEID_POLICY, ERROR_REASON_REQUEST_DENIED, ERROR_REASON_REQUEST_UNSUPPORTED, ERROR_REASON_UNSUPPORTED_BINDING].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SAMLServiceErrorReason.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SAMLServiceErrorReason" + end + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb b/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb new file mode 100644 index 00000000..5e2d78d8 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceGetSAMLRequestResponse + attr_accessor :saml_request + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'saml_request' => :'samlRequest' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'saml_request' => :'SAMLServiceSAMLRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceGetSAMLRequestResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceGetSAMLRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'saml_request') + self.saml_request = attributes[:'saml_request'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + saml_request == o.saml_request + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [saml_request].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_post_response.rb b/lib/zitadel/client/models/s_a_m_l_service_post_response.rb new file mode 100644 index 00000000..98881dd3 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_post_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServicePostResponse + attr_accessor :relay_state + + attr_accessor :saml_response + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'relay_state' => :'relayState', + :'saml_response' => :'samlResponse' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'relay_state' => :'String', + :'saml_response' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServicePostResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServicePostResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'relay_state') + self.relay_state = attributes[:'relay_state'] + end + + if attributes.key?(:'saml_response') + self.saml_response = attributes[:'saml_response'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + relay_state == o.relay_state && + saml_response == o.saml_response + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [relay_state, saml_response].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb b/lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb new file mode 100644 index 00000000..7e8d2def --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb b/lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb new file mode 100644 index 00000000..e1880b5a --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb b/lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb new file mode 100644 index 00000000..58482625 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_request.rb @@ -0,0 +1,281 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceSAMLRequest + # ID of the SAMLRequest + attr_accessor :id + + # Time when the SAMLRequest was created + attr_accessor :creation_date + + # SAML entityID of the application that created the SAMLRequest + attr_accessor :issuer + + # URL which points back to the assertion consumer service of the application + attr_accessor :assertion_consumer_service + + # RelayState provided by the application for the request + attr_accessor :relay_state + + # Binding used by the application for the request + attr_accessor :binding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'creation_date' => :'creationDate', + :'issuer' => :'issuer', + :'assertion_consumer_service' => :'assertionConsumerService', + :'relay_state' => :'relayState', + :'binding' => :'binding' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'creation_date' => :'Time', + :'issuer' => :'String', + :'assertion_consumer_service' => :'String', + :'relay_state' => :'String', + :'binding' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceSAMLRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceSAMLRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.key?(:'assertion_consumer_service') + self.assertion_consumer_service = attributes[:'assertion_consumer_service'] + end + + if attributes.key?(:'relay_state') + self.relay_state = attributes[:'relay_state'] + end + + if attributes.key?(:'binding') + self.binding = attributes[:'binding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + creation_date == o.creation_date && + issuer == o.issuer && + assertion_consumer_service == o.assertion_consumer_service && + relay_state == o.relay_state && + binding == o.binding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, creation_date, issuer, assertion_consumer_service, relay_state, binding].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/s_a_m_l_service_session.rb b/lib/zitadel/client/models/s_a_m_l_service_session.rb new file mode 100644 index 00000000..3f0d5004 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_session.rb @@ -0,0 +1,297 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SAMLServiceSession + # ID of the session, used to login the user. Connects the session to the SAML Request. + attr_accessor :session_id + + # Token to verify the session is valid. + attr_accessor :session_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session_id' => :'sessionId', + :'session_token' => :'sessionToken' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session_id' => :'String', + :'session_token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceSession` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'session_token') + self.session_token = attributes[:'session_token'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@session_id.nil? && @session_id.to_s.length > 200 + invalid_properties.push('invalid value for "session_id", the character length must be smaller than or equal to 200.') + end + + if !@session_id.nil? && @session_id.to_s.length < 1 + invalid_properties.push('invalid value for "session_id", the character length must be great than or equal to 1.') + end + + if !@session_token.nil? && @session_token.to_s.length > 200 + invalid_properties.push('invalid value for "session_token", the character length must be smaller than or equal to 200.') + end + + if !@session_token.nil? && @session_token.to_s.length < 1 + invalid_properties.push('invalid value for "session_token", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@session_id.nil? && @session_id.to_s.length > 200 + return false if !@session_id.nil? && @session_id.to_s.length < 1 + return false if !@session_token.nil? && @session_token.to_s.length > 200 + return false if !@session_token.nil? && @session_token.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] session_id Value to be assigned + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'session_id cannot be nil' + end + + if session_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "session_id", the character length must be smaller than or equal to 200.' + end + + if session_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "session_id", the character length must be great than or equal to 1.' + end + + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param [Object] session_token Value to be assigned + def session_token=(session_token) + if session_token.nil? + fail ArgumentError, 'session_token cannot be nil' + end + + if session_token.to_s.length > 200 + fail ArgumentError, 'invalid value for "session_token", the character length must be smaller than or equal to 200.' + end + + if session_token.to_s.length < 1 + fail ArgumentError, 'invalid value for "session_token", the character length must be great than or equal to 1.' + end + + @session_token = session_token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session_id == o.session_id && + session_token == o.session_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session_id, session_token].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_challenges.rb b/lib/zitadel/client/models/session_service_challenges.rb new file mode 100644 index 00000000..698085ff --- /dev/null +++ b/lib/zitadel/client/models/session_service_challenges.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceChallenges + attr_accessor :web_auth_n + + attr_accessor :otp_sms + + attr_accessor :otp_email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'web_auth_n' => :'webAuthN', + :'otp_sms' => :'otpSms', + :'otp_email' => :'otpEmail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'web_auth_n' => :'SessionServiceChallengesWebAuthN', + :'otp_sms' => :'String', + :'otp_email' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceChallenges` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceChallenges`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'web_auth_n') + self.web_auth_n = attributes[:'web_auth_n'] + end + + if attributes.key?(:'otp_sms') + self.otp_sms = attributes[:'otp_sms'] + end + + if attributes.key?(:'otp_email') + self.otp_email = attributes[:'otp_email'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + web_auth_n == o.web_auth_n && + otp_sms == o.otp_sms && + otp_email == o.otp_email + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [web_auth_n, otp_sms, otp_email].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_challenges_web_auth_n.rb b/lib/zitadel/client/models/session_service_challenges_web_auth_n.rb new file mode 100644 index 00000000..993d463d --- /dev/null +++ b/lib/zitadel/client/models/session_service_challenges_web_auth_n.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceChallengesWebAuthN + # 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 + attr_accessor :public_key_credential_request_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'public_key_credential_request_options' => :'publicKeyCredentialRequestOptions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'public_key_credential_request_options' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceChallengesWebAuthN` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceChallengesWebAuthN`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'public_key_credential_request_options') + self.public_key_credential_request_options = attributes[:'public_key_credential_request_options'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key_credential_request_options == o.public_key_credential_request_options + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [public_key_credential_request_options].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_check_i_d_p_intent.rb b/lib/zitadel/client/models/session_service_check_i_d_p_intent.rb new file mode 100644 index 00000000..a9cde4b0 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_i_d_p_intent.rb @@ -0,0 +1,297 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCheckIDPIntent + # ID of the idp intent, previously returned on the success response of the IDP callback + attr_accessor :idp_intent_id + + # token of the idp intent, previously returned on the success response of the IDP callback + attr_accessor :idp_intent_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_intent_id' => :'idpIntentId', + :'idp_intent_token' => :'idpIntentToken' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp_intent_id' => :'String', + :'idp_intent_token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckIDPIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckIDPIntent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp_intent_id') + self.idp_intent_id = attributes[:'idp_intent_id'] + end + + if attributes.key?(:'idp_intent_token') + self.idp_intent_token = attributes[:'idp_intent_token'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 + invalid_properties.push('invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.') + end + + if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 + invalid_properties.push('invalid value for "idp_intent_id", the character length must be great than or equal to 1.') + end + + if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 + invalid_properties.push('invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.') + end + + if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 + invalid_properties.push('invalid value for "idp_intent_token", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 + return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 + return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 + return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] idp_intent_id Value to be assigned + def idp_intent_id=(idp_intent_id) + if idp_intent_id.nil? + fail ArgumentError, 'idp_intent_id cannot be nil' + end + + if idp_intent_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.' + end + + if idp_intent_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be great than or equal to 1.' + end + + @idp_intent_id = idp_intent_id + end + + # Custom attribute writer method with validation + # @param [Object] idp_intent_token Value to be assigned + def idp_intent_token=(idp_intent_token) + if idp_intent_token.nil? + fail ArgumentError, 'idp_intent_token cannot be nil' + end + + if idp_intent_token.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.' + end + + if idp_intent_token.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be great than or equal to 1.' + end + + @idp_intent_token = idp_intent_token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp_intent_id == o.idp_intent_id && + idp_intent_token == o.idp_intent_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp_intent_id, idp_intent_token].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_check_o_t_p.rb b/lib/zitadel/client/models/session_service_check_o_t_p.rb new file mode 100644 index 00000000..27e0cb01 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_o_t_p.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCheckOTP + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckOTP` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckOTP`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length < 1 + invalid_properties.push('invalid value for "code", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@code.nil? && @code.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + if code.to_s.length < 1 + fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 1.' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_check_password.rb b/lib/zitadel/client/models/session_service_check_password.rb new file mode 100644 index 00000000..c815ab40 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_password.rb @@ -0,0 +1,258 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCheckPassword + attr_accessor :password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'password' => :'password' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'password' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@password.nil? && @password.to_s.length > 200 + invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') + end + + if !@password.nil? && @password.to_s.length < 1 + invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@password.nil? && @password.to_s.length > 200 + return false if !@password.nil? && @password.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + end + + if password.to_s.length > 200 + fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' + end + + if password.to_s.length < 1 + fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' + end + + @password = password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + password == o.password + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [password].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_check_t_o_t_p.rb b/lib/zitadel/client/models/session_service_check_t_o_t_p.rb new file mode 100644 index 00000000..aef73e2d --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_t_o_t_p.rb @@ -0,0 +1,258 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCheckTOTP + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckTOTP` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckTOTP`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@code.nil? && @code.to_s.length > 6 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 6.') + end + + if !@code.nil? && @code.to_s.length < 6 + invalid_properties.push('invalid value for "code", the character length must be great than or equal to 6.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@code.nil? && @code.to_s.length > 6 + return false if !@code.nil? && @code.to_s.length < 6 + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + if code.to_s.length > 6 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 6.' + end + + if code.to_s.length < 6 + fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 6.' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_check_user.rb b/lib/zitadel/client/models/session_service_check_user.rb new file mode 100644 index 00000000..9f275195 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_user.rb @@ -0,0 +1,295 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCheckUser + attr_accessor :user_id + + attr_accessor :login_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'login_name' => :'loginName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'login_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'login_name') + self.login_name = attributes[:'login_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@user_id.nil? && @user_id.to_s.length > 200 + invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') + end + + if !@user_id.nil? && @user_id.to_s.length < 1 + invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') + end + + if !@login_name.nil? && @login_name.to_s.length > 200 + invalid_properties.push('invalid value for "login_name", the character length must be smaller than or equal to 200.') + end + + if !@login_name.nil? && @login_name.to_s.length < 1 + invalid_properties.push('invalid value for "login_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@user_id.nil? && @user_id.to_s.length > 200 + return false if !@user_id.nil? && @user_id.to_s.length < 1 + return false if !@login_name.nil? && @login_name.to_s.length > 200 + return false if !@login_name.nil? && @login_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + if user_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' + end + + if user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [Object] login_name Value to be assigned + def login_name=(login_name) + if login_name.nil? + fail ArgumentError, 'login_name cannot be nil' + end + + if login_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "login_name", the character length must be smaller than or equal to 200.' + end + + if login_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "login_name", the character length must be great than or equal to 1.' + end + + @login_name = login_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + login_name == o.login_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, login_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_check_web_auth_n.rb b/lib/zitadel/client/models/session_service_check_web_auth_n.rb new file mode 100644 index 00000000..0a786577 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_web_auth_n.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCheckWebAuthN + # JSON representation of public key credential issued by the webAuthN client + attr_accessor :credential_assertion_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'credential_assertion_data' => :'credentialAssertionData' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'credential_assertion_data' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCheckWebAuthN` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCheckWebAuthN`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'credential_assertion_data') + self.credential_assertion_data = attributes[:'credential_assertion_data'] + else + self.credential_assertion_data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @credential_assertion_data.nil? + invalid_properties.push('invalid value for "credential_assertion_data", credential_assertion_data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @credential_assertion_data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] credential_assertion_data Value to be assigned + def credential_assertion_data=(credential_assertion_data) + if credential_assertion_data.nil? + fail ArgumentError, 'credential_assertion_data cannot be nil' + end + + @credential_assertion_data = credential_assertion_data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credential_assertion_data == o.credential_assertion_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [credential_assertion_data].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_checks.rb b/lib/zitadel/client/models/session_service_checks.rb new file mode 100644 index 00000000..ad5c6577 --- /dev/null +++ b/lib/zitadel/client/models/session_service_checks.rb @@ -0,0 +1,284 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceChecks + attr_accessor :user + + attr_accessor :password + + attr_accessor :web_auth_n + + attr_accessor :idp_intent + + attr_accessor :totp + + attr_accessor :otp_sms + + attr_accessor :otp_email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user' => :'user', + :'password' => :'password', + :'web_auth_n' => :'webAuthN', + :'idp_intent' => :'idpIntent', + :'totp' => :'totp', + :'otp_sms' => :'otpSms', + :'otp_email' => :'otpEmail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user' => :'SessionServiceCheckUser', + :'password' => :'SessionServiceCheckPassword', + :'web_auth_n' => :'SessionServiceCheckWebAuthN', + :'idp_intent' => :'SessionServiceCheckIDPIntent', + :'totp' => :'SessionServiceCheckTOTP', + :'otp_sms' => :'SessionServiceCheckOTP', + :'otp_email' => :'SessionServiceCheckOTP' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceChecks` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceChecks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'web_auth_n') + self.web_auth_n = attributes[:'web_auth_n'] + end + + if attributes.key?(:'idp_intent') + self.idp_intent = attributes[:'idp_intent'] + end + + if attributes.key?(:'totp') + self.totp = attributes[:'totp'] + end + + if attributes.key?(:'otp_sms') + self.otp_sms = attributes[:'otp_sms'] + end + + if attributes.key?(:'otp_email') + self.otp_email = attributes[:'otp_email'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user == o.user && + password == o.password && + web_auth_n == o.web_auth_n && + idp_intent == o.idp_intent && + totp == o.totp && + otp_sms == o.otp_sms && + otp_email == o.otp_email + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user, password, web_auth_n, idp_intent, totp, otp_sms, otp_email].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_create_session_request.rb b/lib/zitadel/client/models/session_service_create_session_request.rb new file mode 100644 index 00000000..caa4d95e --- /dev/null +++ b/lib/zitadel/client/models/session_service_create_session_request.rb @@ -0,0 +1,270 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCreateSessionRequest + attr_accessor :checks + + # \"custom key value list to be stored on the session\" + attr_accessor :metadata + + attr_accessor :challenges + + attr_accessor :user_agent + + # \"duration (in seconds) after which the session will be automatically invalidated\" + attr_accessor :lifetime + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'checks' => :'checks', + :'metadata' => :'metadata', + :'challenges' => :'challenges', + :'user_agent' => :'userAgent', + :'lifetime' => :'lifetime' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'checks' => :'SessionServiceChecks', + :'metadata' => :'Hash', + :'challenges' => :'SessionServiceRequestChallenges', + :'user_agent' => :'SessionServiceUserAgent', + :'lifetime' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreateSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreateSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'checks') + self.checks = attributes[:'checks'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'challenges') + self.challenges = attributes[:'challenges'] + end + + if attributes.key?(:'user_agent') + self.user_agent = attributes[:'user_agent'] + end + + if attributes.key?(:'lifetime') + self.lifetime = attributes[:'lifetime'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + checks == o.checks && + metadata == o.metadata && + challenges == o.challenges && + user_agent == o.user_agent && + lifetime == o.lifetime + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [checks, metadata, challenges, user_agent, lifetime].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_create_session_response.rb b/lib/zitadel/client/models/session_service_create_session_response.rb new file mode 100644 index 00000000..08b5cdc3 --- /dev/null +++ b/lib/zitadel/client/models/session_service_create_session_response.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCreateSessionResponse + attr_accessor :details + + # \"id of the session\" + attr_accessor :session_id + + # \"The current token of the session, which is required for delete session, get session or the request of other resources.\" + attr_accessor :session_token + + attr_accessor :challenges + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'session_id' => :'sessionId', + :'session_token' => :'sessionToken', + :'challenges' => :'challenges' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SessionServiceDetails', + :'session_id' => :'String', + :'session_token' => :'String', + :'challenges' => :'SessionServiceChallenges' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreateSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreateSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'session_token') + self.session_token = attributes[:'session_token'] + end + + if attributes.key?(:'challenges') + self.challenges = attributes[:'challenges'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + session_id == o.session_id && + session_token == o.session_token && + challenges == o.challenges + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, session_id, session_token, challenges].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_creation_date_query.rb b/lib/zitadel/client/models/session_service_creation_date_query.rb new file mode 100644 index 00000000..d8a83f13 --- /dev/null +++ b/lib/zitadel/client/models/session_service_creation_date_query.rb @@ -0,0 +1,263 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCreationDateQuery + attr_accessor :creation_date + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'creation_date' => :'creationDate', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'creation_date' => :'Time', + :'method' => :'SessionServiceTimestampQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreationDateQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreationDateQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TIMESTAMP_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + creation_date == o.creation_date && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [creation_date, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_creator_query.rb b/lib/zitadel/client/models/session_service_creator_query.rb new file mode 100644 index 00000000..51185823 --- /dev/null +++ b/lib/zitadel/client/models/session_service_creator_query.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceCreatorQuery + # ID of the user who created the session. If empty, the calling user's ID is used. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceCreatorQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceCreatorQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@id.nil? && @id.to_s.length > 200 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@id.nil? && @id.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + if id.to_s.length > 200 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 200.' + end + + @id = id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_delete_session_request.rb b/lib/zitadel/client/models/session_service_delete_session_request.rb new file mode 100644 index 00000000..7bb5d5d7 --- /dev/null +++ b/lib/zitadel/client/models/session_service_delete_session_request.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceDeleteSessionRequest + # \"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.\" + attr_accessor :session_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session_token' => :'sessionToken' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session_token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceDeleteSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceDeleteSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session_token') + self.session_token = attributes[:'session_token'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session_token == o.session_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session_token].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_delete_session_response.rb b/lib/zitadel/client/models/session_service_delete_session_response.rb new file mode 100644 index 00000000..3a73d74a --- /dev/null +++ b/lib/zitadel/client/models/session_service_delete_session_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceDeleteSessionResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SessionServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceDeleteSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceDeleteSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_details.rb b/lib/zitadel/client/models/session_service_details.rb new file mode 100644 index 00000000..bdc7f55b --- /dev/null +++ b/lib/zitadel/client/models/session_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_factors.rb b/lib/zitadel/client/models/session_service_factors.rb new file mode 100644 index 00000000..41c73301 --- /dev/null +++ b/lib/zitadel/client/models/session_service_factors.rb @@ -0,0 +1,284 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceFactors + attr_accessor :user + + attr_accessor :password + + attr_accessor :web_auth_n + + attr_accessor :intent + + attr_accessor :totp + + attr_accessor :otp_sms + + attr_accessor :otp_email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user' => :'user', + :'password' => :'password', + :'web_auth_n' => :'webAuthN', + :'intent' => :'intent', + :'totp' => :'totp', + :'otp_sms' => :'otpSms', + :'otp_email' => :'otpEmail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user' => :'SessionServiceUserFactor', + :'password' => :'SessionServicePasswordFactor', + :'web_auth_n' => :'SessionServiceWebAuthNFactor', + :'intent' => :'SessionServiceIntentFactor', + :'totp' => :'SessionServiceTOTPFactor', + :'otp_sms' => :'SessionServiceOTPFactor', + :'otp_email' => :'SessionServiceOTPFactor' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceFactors` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceFactors`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'web_auth_n') + self.web_auth_n = attributes[:'web_auth_n'] + end + + if attributes.key?(:'intent') + self.intent = attributes[:'intent'] + end + + if attributes.key?(:'totp') + self.totp = attributes[:'totp'] + end + + if attributes.key?(:'otp_sms') + self.otp_sms = attributes[:'otp_sms'] + end + + if attributes.key?(:'otp_email') + self.otp_email = attributes[:'otp_email'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user == o.user && + password == o.password && + web_auth_n == o.web_auth_n && + intent == o.intent && + totp == o.totp && + otp_sms == o.otp_sms && + otp_email == o.otp_email + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user, password, web_auth_n, intent, totp, otp_sms, otp_email].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_get_session_response.rb b/lib/zitadel/client/models/session_service_get_session_response.rb new file mode 100644 index 00000000..697656d8 --- /dev/null +++ b/lib/zitadel/client/models/session_service_get_session_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceGetSessionResponse + attr_accessor :session + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session' => :'session' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session' => :'SessionServiceSession' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceGetSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceGetSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session') + self.session = attributes[:'session'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session == o.session + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_i_ds_query.rb b/lib/zitadel/client/models/session_service_i_ds_query.rb new file mode 100644 index 00000000..13deb1d9 --- /dev/null +++ b/lib/zitadel/client/models/session_service_i_ds_query.rb @@ -0,0 +1,232 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceIDsQuery + attr_accessor :ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids' => :'ids' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceIDsQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceIDsQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ids') + if (value = attributes[:'ids']).is_a?(Array) + self.ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ids == o.ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ids].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_intent_factor.rb b/lib/zitadel/client/models/session_service_intent_factor.rb new file mode 100644 index 00000000..2e7c9a97 --- /dev/null +++ b/lib/zitadel/client/models/session_service_intent_factor.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceIntentFactor + # \"time when an intent was last checked\" + attr_accessor :verified_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verified_at' => :'verifiedAt' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verified_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceIntentFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceIntentFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verified_at') + self.verified_at = attributes[:'verified_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verified_at == o.verified_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verified_at].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_list_details.rb b/lib/zitadel/client/models/session_service_list_details.rb new file mode 100644 index 00000000..2ba8edb3 --- /dev/null +++ b/lib/zitadel/client/models/session_service_list_details.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # the last time the projection got updated + attr_accessor :timestamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_result' => :'totalResult', + :'processed_sequence' => :'processedSequence', + :'timestamp' => :'timestamp' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total_result' => :'String', + :'processed_sequence' => :'String', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total_result') + self.total_result = attributes[:'total_result'] + end + + if attributes.key?(:'processed_sequence') + self.processed_sequence = attributes[:'processed_sequence'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_result == o.total_result && + processed_sequence == o.processed_sequence && + timestamp == o.timestamp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total_result, processed_sequence, timestamp].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_list_query.rb b/lib/zitadel/client/models/session_service_list_query.rb new file mode 100644 index 00000000..474220b8 --- /dev/null +++ b/lib/zitadel/client/models/session_service_list_query.rb @@ -0,0 +1,251 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Object unspecific list filters like offset, limit and asc/desc. + class SessionServiceListQuery + attr_accessor :offset + + # 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. + attr_accessor :limit + + # default is descending + attr_accessor :asc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'offset' => :'offset', + :'limit' => :'limit', + :'asc' => :'asc' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'offset' => :'String', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'asc') + self.asc = attributes[:'asc'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + offset == o.offset && + limit == o.limit && + asc == o.asc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [offset, limit, asc].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_list_sessions_request.rb b/lib/zitadel/client/models/session_service_list_sessions_request.rb new file mode 100644 index 00000000..5ae30ae0 --- /dev/null +++ b/lib/zitadel/client/models/session_service_list_sessions_request.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceListSessionsRequest + attr_accessor :query + + attr_accessor :queries + + attr_accessor :sorting_column + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'query' => :'query', + :'queries' => :'queries', + :'sorting_column' => :'sortingColumn' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'query' => :'SessionServiceListQuery', + :'queries' => :'Array', + :'sorting_column' => :'SessionServiceSessionFieldName' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListSessionsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListSessionsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + + if attributes.key?(:'sorting_column') + self.sorting_column = attributes[:'sorting_column'] + else + self.sorting_column = 'SESSION_FIELD_NAME_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query && + queries == o.queries && + sorting_column == o.sorting_column + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [query, queries, sorting_column].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_list_sessions_response.rb b/lib/zitadel/client/models/session_service_list_sessions_response.rb new file mode 100644 index 00000000..7c7843b6 --- /dev/null +++ b/lib/zitadel/client/models/session_service_list_sessions_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceListSessionsResponse + attr_accessor :details + + attr_accessor :sessions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'sessions' => :'sessions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SessionServiceListDetails', + :'sessions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceListSessionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceListSessionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'sessions') + if (value = attributes[:'sessions']).is_a?(Array) + self.sessions = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + sessions == o.sessions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, sessions].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb b/lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb new file mode 100644 index 00000000..5d961491 --- /dev/null +++ b/lib/zitadel/client/models/session_service_o_t_p_email_send_code.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceOTPEmailSendCode + # 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 + attr_accessor :url_template + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url_template' => :'urlTemplate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url_template' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceOTPEmailSendCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceOTPEmailSendCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url_template') + self.url_template = attributes[:'url_template'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@url_template.nil? && @url_template.to_s.length > 200 + invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') + end + + if !@url_template.nil? && @url_template.to_s.length < 1 + invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@url_template.nil? && @url_template.to_s.length > 200 + return false if !@url_template.nil? && @url_template.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] url_template Value to be assigned + def url_template=(url_template) + if url_template.nil? + fail ArgumentError, 'url_template cannot be nil' + end + + if url_template.to_s.length > 200 + fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' + end + + if url_template.to_s.length < 1 + fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' + end + + @url_template = url_template + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url_template == o.url_template + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url_template].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_o_t_p_factor.rb b/lib/zitadel/client/models/session_service_o_t_p_factor.rb new file mode 100644 index 00000000..4ca3a445 --- /dev/null +++ b/lib/zitadel/client/models/session_service_o_t_p_factor.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceOTPFactor + # \"time when the One-Time Password was last checked\" + attr_accessor :verified_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verified_at' => :'verifiedAt' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verified_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceOTPFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceOTPFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verified_at') + self.verified_at = attributes[:'verified_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verified_at == o.verified_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verified_at].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_password_factor.rb b/lib/zitadel/client/models/session_service_password_factor.rb new file mode 100644 index 00000000..019af5d6 --- /dev/null +++ b/lib/zitadel/client/models/session_service_password_factor.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServicePasswordFactor + # \"time when the password was last checked\" + attr_accessor :verified_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verified_at' => :'verifiedAt' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verified_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServicePasswordFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServicePasswordFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verified_at') + self.verified_at = attributes[:'verified_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verified_at == o.verified_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verified_at].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_protobuf_any.rb b/lib/zitadel/client/models/session_service_protobuf_any.rb new file mode 100644 index 00000000..0d1a4038 --- /dev/null +++ b/lib/zitadel/client/models/session_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_request_challenges.rb b/lib/zitadel/client/models/session_service_request_challenges.rb new file mode 100644 index 00000000..a4b73df2 --- /dev/null +++ b/lib/zitadel/client/models/session_service_request_challenges.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceRequestChallenges + attr_accessor :web_auth_n + + attr_accessor :otp_sms + + attr_accessor :otp_email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'web_auth_n' => :'webAuthN', + :'otp_sms' => :'otpSms', + :'otp_email' => :'otpEmail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'web_auth_n' => :'SessionServiceRequestChallengesWebAuthN', + :'otp_sms' => :'SessionServiceRequestChallengesOTPSMS', + :'otp_email' => :'SessionServiceRequestChallengesOTPEmail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallenges` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallenges`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'web_auth_n') + self.web_auth_n = attributes[:'web_auth_n'] + end + + if attributes.key?(:'otp_sms') + self.otp_sms = attributes[:'otp_sms'] + end + + if attributes.key?(:'otp_email') + self.otp_email = attributes[:'otp_email'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + web_auth_n == o.web_auth_n && + otp_sms == o.otp_sms && + otp_email == o.otp_email + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [web_auth_n, otp_sms, otp_email].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb b/lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb new file mode 100644 index 00000000..4fddc4e2 --- /dev/null +++ b/lib/zitadel/client/models/session_service_request_challenges_o_t_p_email.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceRequestChallengesOTPEmail + attr_accessor :send_code + + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode', + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_code' => :'SessionServiceOTPEmailSendCode', + :'return_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPEmail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_code == o.send_code && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_code, return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb b/lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb new file mode 100644 index 00000000..3ff6f216 --- /dev/null +++ b/lib/zitadel/client/models/session_service_request_challenges_o_t_p_s_m_s.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceRequestChallengesOTPSMS + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'return_code' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPSMS` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallengesOTPSMS`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb b/lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb new file mode 100644 index 00000000..33c7350f --- /dev/null +++ b/lib/zitadel/client/models/session_service_request_challenges_web_auth_n.rb @@ -0,0 +1,296 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceRequestChallengesWebAuthN + # \"Domain on which the session was created. Will be used in the WebAuthN challenge.\" + attr_accessor :domain + + attr_accessor :user_verification_requirement + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'domain', + :'user_verification_requirement' => :'userVerificationRequirement' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String', + :'user_verification_requirement' => :'SessionServiceUserVerificationRequirement' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRequestChallengesWebAuthN` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRequestChallengesWebAuthN`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + else + self.domain = nil + end + + if attributes.key?(:'user_verification_requirement') + self.user_verification_requirement = attributes[:'user_verification_requirement'] + else + self.user_verification_requirement = 'USER_VERIFICATION_REQUIREMENT_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @domain.nil? + invalid_properties.push('invalid value for "domain", domain cannot be nil.') + end + + if @user_verification_requirement.nil? + invalid_properties.push('invalid value for "user_verification_requirement", user_verification_requirement cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @domain.nil? + return false if @user_verification_requirement.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] domain Value to be assigned + def domain=(domain) + if domain.nil? + fail ArgumentError, 'domain cannot be nil' + end + + @domain = domain + end + + # Custom attribute writer method with validation + # @param [Object] user_verification_requirement Value to be assigned + def user_verification_requirement=(user_verification_requirement) + if user_verification_requirement.nil? + fail ArgumentError, 'user_verification_requirement cannot be nil' + end + + @user_verification_requirement = user_verification_requirement + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + user_verification_requirement == o.user_verification_requirement + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain, user_verification_requirement].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_rpc_status.rb b/lib/zitadel/client/models/session_service_rpc_status.rb new file mode 100644 index 00000000..39bc2f5c --- /dev/null +++ b/lib/zitadel/client/models/session_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_search_query.rb b/lib/zitadel/client/models/session_service_search_query.rb new file mode 100644 index 00000000..4b92a5ea --- /dev/null +++ b/lib/zitadel/client/models/session_service_search_query.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceSearchQuery + attr_accessor :ids_query + + attr_accessor :user_id_query + + attr_accessor :creation_date_query + + attr_accessor :creator_query + + attr_accessor :user_agent_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids_query' => :'idsQuery', + :'user_id_query' => :'userIdQuery', + :'creation_date_query' => :'creationDateQuery', + :'creator_query' => :'creatorQuery', + :'user_agent_query' => :'userAgentQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ids_query' => :'SessionServiceIDsQuery', + :'user_id_query' => :'SessionServiceUserIDQuery', + :'creation_date_query' => :'SessionServiceCreationDateQuery', + :'creator_query' => :'SessionServiceCreatorQuery', + :'user_agent_query' => :'SessionServiceUserAgentQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSearchQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSearchQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ids_query') + self.ids_query = attributes[:'ids_query'] + end + + if attributes.key?(:'user_id_query') + self.user_id_query = attributes[:'user_id_query'] + end + + if attributes.key?(:'creation_date_query') + self.creation_date_query = attributes[:'creation_date_query'] + end + + if attributes.key?(:'creator_query') + self.creator_query = attributes[:'creator_query'] + end + + if attributes.key?(:'user_agent_query') + self.user_agent_query = attributes[:'user_agent_query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ids_query == o.ids_query && + user_id_query == o.user_id_query && + creation_date_query == o.creation_date_query && + creator_query == o.creator_query && + user_agent_query == o.user_agent_query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ids_query, user_id_query, creation_date_query, creator_query, user_agent_query].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_session.rb b/lib/zitadel/client/models/session_service_session.rb new file mode 100644 index 00000000..4757ec4c --- /dev/null +++ b/lib/zitadel/client/models/session_service_session.rb @@ -0,0 +1,301 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceSession + # \"id of the session\" + attr_accessor :id + + # \"time when the session was created\" + attr_accessor :creation_date + + # \"time when the session was last updated\" + attr_accessor :change_date + + # \"sequence of the session\" + attr_accessor :sequence + + attr_accessor :factors + + # \"custom key value list\" + attr_accessor :metadata + + attr_accessor :user_agent + + # \"time the session will be automatically invalidated\" + attr_accessor :expiration_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'creation_date' => :'creationDate', + :'change_date' => :'changeDate', + :'sequence' => :'sequence', + :'factors' => :'factors', + :'metadata' => :'metadata', + :'user_agent' => :'userAgent', + :'expiration_date' => :'expirationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'creation_date' => :'Time', + :'change_date' => :'Time', + :'sequence' => :'String', + :'factors' => :'SessionServiceFactors', + :'metadata' => :'Hash', + :'user_agent' => :'SessionServiceUserAgent', + :'expiration_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSession` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'factors') + self.factors = attributes[:'factors'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'user_agent') + self.user_agent = attributes[:'user_agent'] + end + + if attributes.key?(:'expiration_date') + self.expiration_date = attributes[:'expiration_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + creation_date == o.creation_date && + change_date == o.change_date && + sequence == o.sequence && + factors == o.factors && + metadata == o.metadata && + user_agent == o.user_agent && + expiration_date == o.expiration_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, creation_date, change_date, sequence, factors, metadata, user_agent, expiration_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_session_field_name.rb b/lib/zitadel/client/models/session_service_session_field_name.rb new file mode 100644 index 00000000..a3a20fe2 --- /dev/null +++ b/lib/zitadel/client/models/session_service_session_field_name.rb @@ -0,0 +1,41 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceSessionFieldName + SESSION_FIELD_NAME_UNSPECIFIED = "SESSION_FIELD_NAME_UNSPECIFIED".freeze + SESSION_FIELD_NAME_CREATION_DATE = "SESSION_FIELD_NAME_CREATION_DATE".freeze + + def self.all_vars + @all_vars ||= [SESSION_FIELD_NAME_UNSPECIFIED, SESSION_FIELD_NAME_CREATION_DATE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SessionServiceSessionFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SessionServiceSessionFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/session_service_set_session_request.rb b/lib/zitadel/client/models/session_service_set_session_request.rb new file mode 100644 index 00000000..983a19d3 --- /dev/null +++ b/lib/zitadel/client/models/session_service_set_session_request.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceSetSessionRequest + # \"DEPRECATED: this field is ignored.\" + attr_accessor :session_token + + attr_accessor :checks + + # \"custom key value list to be stored on the session\" + attr_accessor :metadata + + attr_accessor :challenges + + # \"duration (in seconds) after which the session will be automatically invalidated\" + attr_accessor :lifetime + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session_token' => :'sessionToken', + :'checks' => :'checks', + :'metadata' => :'metadata', + :'challenges' => :'challenges', + :'lifetime' => :'lifetime' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'session_token' => :'String', + :'checks' => :'SessionServiceChecks', + :'metadata' => :'Hash', + :'challenges' => :'SessionServiceRequestChallenges', + :'lifetime' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSetSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSetSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'session_token') + self.session_token = attributes[:'session_token'] + end + + if attributes.key?(:'checks') + self.checks = attributes[:'checks'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'challenges') + self.challenges = attributes[:'challenges'] + end + + if attributes.key?(:'lifetime') + self.lifetime = attributes[:'lifetime'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@session_token.nil? && @session_token.to_s.length > 200 + invalid_properties.push('invalid value for "session_token", the character length must be smaller than or equal to 200.') + end + + if !@session_token.nil? && @session_token.to_s.length < 1 + invalid_properties.push('invalid value for "session_token", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@session_token.nil? && @session_token.to_s.length > 200 + return false if !@session_token.nil? && @session_token.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] session_token Value to be assigned + def session_token=(session_token) + if session_token.nil? + fail ArgumentError, 'session_token cannot be nil' + end + + if session_token.to_s.length > 200 + fail ArgumentError, 'invalid value for "session_token", the character length must be smaller than or equal to 200.' + end + + if session_token.to_s.length < 1 + fail ArgumentError, 'invalid value for "session_token", the character length must be great than or equal to 1.' + end + + @session_token = session_token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session_token == o.session_token && + checks == o.checks && + metadata == o.metadata && + challenges == o.challenges && + lifetime == o.lifetime + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [session_token, checks, metadata, challenges, lifetime].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_set_session_response.rb b/lib/zitadel/client/models/session_service_set_session_response.rb new file mode 100644 index 00000000..9582fd11 --- /dev/null +++ b/lib/zitadel/client/models/session_service_set_session_response.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceSetSessionResponse + attr_accessor :details + + # \"The current token of the session, which is required for delete session, get session or the request of other resources.\" + attr_accessor :session_token + + attr_accessor :challenges + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'session_token' => :'sessionToken', + :'challenges' => :'challenges' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SessionServiceDetails', + :'session_token' => :'String', + :'challenges' => :'SessionServiceChallenges' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceSetSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceSetSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'session_token') + self.session_token = attributes[:'session_token'] + end + + if attributes.key?(:'challenges') + self.challenges = attributes[:'challenges'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + session_token == o.session_token && + challenges == o.challenges + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, session_token, challenges].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_t_o_t_p_factor.rb b/lib/zitadel/client/models/session_service_t_o_t_p_factor.rb new file mode 100644 index 00000000..c5771e18 --- /dev/null +++ b/lib/zitadel/client/models/session_service_t_o_t_p_factor.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceTOTPFactor + # \"time when the Time-based One-Time Password was last checked\" + attr_accessor :verified_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verified_at' => :'verifiedAt' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verified_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceTOTPFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceTOTPFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verified_at') + self.verified_at = attributes[:'verified_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verified_at == o.verified_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verified_at].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_timestamp_query_method.rb b/lib/zitadel/client/models/session_service_timestamp_query_method.rb new file mode 100644 index 00000000..892460cc --- /dev/null +++ b/lib/zitadel/client/models/session_service_timestamp_query_method.rb @@ -0,0 +1,44 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceTimestampQueryMethod + TIMESTAMP_QUERY_METHOD_EQUALS = "TIMESTAMP_QUERY_METHOD_EQUALS".freeze + TIMESTAMP_QUERY_METHOD_GREATER = "TIMESTAMP_QUERY_METHOD_GREATER".freeze + TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS = "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS".freeze + TIMESTAMP_QUERY_METHOD_LESS = "TIMESTAMP_QUERY_METHOD_LESS".freeze + TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS = "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS".freeze + + def self.all_vars + @all_vars ||= [TIMESTAMP_QUERY_METHOD_EQUALS, TIMESTAMP_QUERY_METHOD_GREATER, TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS, TIMESTAMP_QUERY_METHOD_LESS, TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SessionServiceTimestampQueryMethod.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SessionServiceTimestampQueryMethod" + end + end + +end diff --git a/lib/zitadel/client/models/session_service_user_agent.rb b/lib/zitadel/client/models/session_service_user_agent.rb new file mode 100644 index 00000000..6416fcfd --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_agent.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceUserAgent + attr_accessor :fingerprint_id + + attr_accessor :ip + + attr_accessor :description + + attr_accessor :header + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fingerprint_id' => :'fingerprintId', + :'ip' => :'ip', + :'description' => :'description', + :'header' => :'header' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'fingerprint_id' => :'String', + :'ip' => :'String', + :'description' => :'String', + :'header' => :'Hash' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserAgent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserAgent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fingerprint_id') + self.fingerprint_id = attributes[:'fingerprint_id'] + end + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'header') + if (value = attributes[:'header']).is_a?(Hash) + self.header = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fingerprint_id == o.fingerprint_id && + ip == o.ip && + description == o.description && + header == o.header + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fingerprint_id, ip, description, header].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_user_agent_header_values.rb b/lib/zitadel/client/models/session_service_user_agent_header_values.rb new file mode 100644 index 00000000..8ff13cfb --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_agent_header_values.rb @@ -0,0 +1,233 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme. + class SessionServiceUserAgentHeaderValues + attr_accessor :values + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'values' => :'values' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserAgentHeaderValues` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserAgentHeaderValues`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + values == o.values + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [values].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_user_agent_query.rb b/lib/zitadel/client/models/session_service_user_agent_query.rb new file mode 100644 index 00000000..921105d0 --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_agent_query.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceUserAgentQuery + # 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. + attr_accessor :fingerprint_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fingerprint_id' => :'fingerprintId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'fingerprint_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserAgentQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserAgentQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fingerprint_id') + self.fingerprint_id = attributes[:'fingerprint_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@fingerprint_id.nil? && @fingerprint_id.to_s.length > 200 + invalid_properties.push('invalid value for "fingerprint_id", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@fingerprint_id.nil? && @fingerprint_id.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] fingerprint_id Value to be assigned + def fingerprint_id=(fingerprint_id) + if fingerprint_id.nil? + fail ArgumentError, 'fingerprint_id cannot be nil' + end + + if fingerprint_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "fingerprint_id", the character length must be smaller than or equal to 200.' + end + + @fingerprint_id = fingerprint_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fingerprint_id == o.fingerprint_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fingerprint_id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_user_factor.rb b/lib/zitadel/client/models/session_service_user_factor.rb new file mode 100644 index 00000000..5d97f938 --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_factor.rb @@ -0,0 +1,271 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceUserFactor + # \"time when the user was last checked\" + attr_accessor :verified_at + + # \"id of the checked user\" + attr_accessor :id + + # \"login name of the checked user\" + attr_accessor :login_name + + # \"display name of the checked user\" + attr_accessor :display_name + + # \"organization id of the checked user\" + attr_accessor :organization_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verified_at' => :'verifiedAt', + :'id' => :'id', + :'login_name' => :'loginName', + :'display_name' => :'displayName', + :'organization_id' => :'organizationId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verified_at' => :'Time', + :'id' => :'String', + :'login_name' => :'String', + :'display_name' => :'String', + :'organization_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verified_at') + self.verified_at = attributes[:'verified_at'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'login_name') + self.login_name = attributes[:'login_name'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verified_at == o.verified_at && + id == o.id && + login_name == o.login_name && + display_name == o.display_name && + organization_id == o.organization_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verified_at, id, login_name, display_name, organization_id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_user_i_d_query.rb b/lib/zitadel/client/models/session_service_user_i_d_query.rb new file mode 100644 index 00000000..bdcdad12 --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_i_d_query.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceUserIDQuery + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceUserIDQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceUserIDQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/session_service_user_verification_requirement.rb b/lib/zitadel/client/models/session_service_user_verification_requirement.rb new file mode 100644 index 00000000..66fd0f67 --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_verification_requirement.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceUserVerificationRequirement + USER_VERIFICATION_REQUIREMENT_UNSPECIFIED = "USER_VERIFICATION_REQUIREMENT_UNSPECIFIED".freeze + USER_VERIFICATION_REQUIREMENT_REQUIRED = "USER_VERIFICATION_REQUIREMENT_REQUIRED".freeze + USER_VERIFICATION_REQUIREMENT_PREFERRED = "USER_VERIFICATION_REQUIREMENT_PREFERRED".freeze + USER_VERIFICATION_REQUIREMENT_DISCOURAGED = "USER_VERIFICATION_REQUIREMENT_DISCOURAGED".freeze + + def self.all_vars + @all_vars ||= [USER_VERIFICATION_REQUIREMENT_UNSPECIFIED, USER_VERIFICATION_REQUIREMENT_REQUIRED, USER_VERIFICATION_REQUIREMENT_PREFERRED, USER_VERIFICATION_REQUIREMENT_DISCOURAGED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SessionServiceUserVerificationRequirement.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SessionServiceUserVerificationRequirement" + end + end + +end diff --git a/lib/zitadel/client/models/session_service_web_auth_n_factor.rb b/lib/zitadel/client/models/session_service_web_auth_n_factor.rb new file mode 100644 index 00000000..f438365a --- /dev/null +++ b/lib/zitadel/client/models/session_service_web_auth_n_factor.rb @@ -0,0 +1,240 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SessionServiceWebAuthNFactor + # \"time when the passkey challenge was last checked\" + attr_accessor :verified_at + + attr_accessor :user_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verified_at' => :'verifiedAt', + :'user_verified' => :'userVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verified_at' => :'Time', + :'user_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceWebAuthNFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceWebAuthNFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verified_at') + self.verified_at = attributes[:'verified_at'] + end + + if attributes.key?(:'user_verified') + self.user_verified = attributes[:'user_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verified_at == o.verified_at && + user_verified == o.user_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verified_at, user_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_auto_linking_option.rb b/lib/zitadel/client/models/settings_service_auto_linking_option.rb new file mode 100644 index 00000000..6b389433 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_auto_linking_option.rb @@ -0,0 +1,42 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceAutoLinkingOption + AUTO_LINKING_OPTION_UNSPECIFIED = "AUTO_LINKING_OPTION_UNSPECIFIED".freeze + AUTO_LINKING_OPTION_USERNAME = "AUTO_LINKING_OPTION_USERNAME".freeze + AUTO_LINKING_OPTION_EMAIL = "AUTO_LINKING_OPTION_EMAIL".freeze + + def self.all_vars + @all_vars ||= [AUTO_LINKING_OPTION_UNSPECIFIED, AUTO_LINKING_OPTION_USERNAME, AUTO_LINKING_OPTION_EMAIL].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SettingsServiceAutoLinkingOption.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceAutoLinkingOption" + end + end + +end diff --git a/lib/zitadel/client/models/settings_service_branding_settings.rb b/lib/zitadel/client/models/settings_service_branding_settings.rb new file mode 100644 index 00000000..b0016184 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_branding_settings.rb @@ -0,0 +1,313 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceBrandingSettings + attr_accessor :light_theme + + attr_accessor :dark_theme + + # url to the font used + attr_accessor :font_url + + # hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set + attr_accessor :hide_login_name_suffix + + # boolean to disable the watermark + attr_accessor :disable_watermark + + attr_accessor :resource_owner_type + + attr_accessor :theme_mode + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'light_theme' => :'lightTheme', + :'dark_theme' => :'darkTheme', + :'font_url' => :'fontUrl', + :'hide_login_name_suffix' => :'hideLoginNameSuffix', + :'disable_watermark' => :'disableWatermark', + :'resource_owner_type' => :'resourceOwnerType', + :'theme_mode' => :'themeMode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'light_theme' => :'SettingsServiceTheme', + :'dark_theme' => :'SettingsServiceTheme', + :'font_url' => :'String', + :'hide_login_name_suffix' => :'Boolean', + :'disable_watermark' => :'Boolean', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType', + :'theme_mode' => :'SettingsServiceThemeMode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceBrandingSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceBrandingSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'light_theme') + self.light_theme = attributes[:'light_theme'] + end + + if attributes.key?(:'dark_theme') + self.dark_theme = attributes[:'dark_theme'] + end + + if attributes.key?(:'font_url') + self.font_url = attributes[:'font_url'] + end + + if attributes.key?(:'hide_login_name_suffix') + self.hide_login_name_suffix = attributes[:'hide_login_name_suffix'] + end + + if attributes.key?(:'disable_watermark') + self.disable_watermark = attributes[:'disable_watermark'] + end + + if attributes.key?(:'resource_owner_type') + self.resource_owner_type = attributes[:'resource_owner_type'] + else + self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + end + + if attributes.key?(:'theme_mode') + self.theme_mode = attributes[:'theme_mode'] + else + self.theme_mode = 'THEME_MODE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + light_theme == o.light_theme && + dark_theme == o.dark_theme && + font_url == o.font_url && + hide_login_name_suffix == o.hide_login_name_suffix && + disable_watermark == o.disable_watermark && + resource_owner_type == o.resource_owner_type && + theme_mode == o.theme_mode + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [light_theme, dark_theme, font_url, hide_login_name_suffix, disable_watermark, resource_owner_type, theme_mode].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_details.rb b/lib/zitadel/client/models/settings_service_details.rb new file mode 100644 index 00000000..cefe1357 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_domain_settings.rb b/lib/zitadel/client/models/settings_service_domain_settings.rb new file mode 100644 index 00000000..57999128 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_domain_settings.rb @@ -0,0 +1,284 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceDomainSettings + # the username has to end with the domain of its organization + attr_accessor :login_name_includes_domain + + # defines if organization domains should be verified upon creation, otherwise will be created already verified + attr_accessor :require_org_domain_verification + + # defines if the SMTP sender address domain should match an existing domain on the instance + attr_accessor :smtp_sender_address_matches_instance_domain + + attr_accessor :resource_owner_type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'login_name_includes_domain' => :'loginNameIncludesDomain', + :'require_org_domain_verification' => :'requireOrgDomainVerification', + :'smtp_sender_address_matches_instance_domain' => :'smtpSenderAddressMatchesInstanceDomain', + :'resource_owner_type' => :'resourceOwnerType' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'login_name_includes_domain' => :'Boolean', + :'require_org_domain_verification' => :'Boolean', + :'smtp_sender_address_matches_instance_domain' => :'Boolean', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceDomainSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceDomainSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'login_name_includes_domain') + self.login_name_includes_domain = attributes[:'login_name_includes_domain'] + end + + if attributes.key?(:'require_org_domain_verification') + self.require_org_domain_verification = attributes[:'require_org_domain_verification'] + end + + if attributes.key?(:'smtp_sender_address_matches_instance_domain') + self.smtp_sender_address_matches_instance_domain = attributes[:'smtp_sender_address_matches_instance_domain'] + end + + if attributes.key?(:'resource_owner_type') + self.resource_owner_type = attributes[:'resource_owner_type'] + else + self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + login_name_includes_domain == o.login_name_includes_domain && + require_org_domain_verification == o.require_org_domain_verification && + smtp_sender_address_matches_instance_domain == o.smtp_sender_address_matches_instance_domain && + resource_owner_type == o.resource_owner_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [login_name_includes_domain, require_org_domain_verification, smtp_sender_address_matches_instance_domain, resource_owner_type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb b/lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb new file mode 100644 index 00000000..033a345a --- /dev/null +++ b/lib/zitadel/client/models/settings_service_embedded_iframe_settings.rb @@ -0,0 +1,243 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceEmbeddedIframeSettings + # states if iframe embedding is enabled or disabled + attr_accessor :enabled + + # origins allowed loading ZITADEL in an iframe if enabled. + attr_accessor :allowed_origins + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enabled' => :'enabled', + :'allowed_origins' => :'allowedOrigins' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'enabled' => :'Boolean', + :'allowed_origins' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceEmbeddedIframeSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceEmbeddedIframeSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'allowed_origins') + if (value = attributes[:'allowed_origins']).is_a?(Array) + self.allowed_origins = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + allowed_origins == o.allowed_origins + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enabled, allowed_origins].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb b/lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb new file mode 100644 index 00000000..4f43fc90 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_active_identity_providers_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetActiveIdentityProvidersResponse + attr_accessor :details + + attr_accessor :identity_providers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'identity_providers' => :'identityProviders' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceListDetails', + :'identity_providers' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetActiveIdentityProvidersResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetActiveIdentityProvidersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'identity_providers') + if (value = attributes[:'identity_providers']).is_a?(Array) + self.identity_providers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + identity_providers == o.identity_providers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, identity_providers].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_branding_settings_response.rb b/lib/zitadel/client/models/settings_service_get_branding_settings_response.rb new file mode 100644 index 00000000..4c2a98e8 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_branding_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetBrandingSettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServiceBrandingSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetBrandingSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetBrandingSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_domain_settings_response.rb b/lib/zitadel/client/models/settings_service_get_domain_settings_response.rb new file mode 100644 index 00000000..2742b4cf --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_domain_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetDomainSettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServiceDomainSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetDomainSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetDomainSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_general_settings_response.rb b/lib/zitadel/client/models/settings_service_get_general_settings_response.rb new file mode 100644 index 00000000..24d1fec1 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_general_settings_response.rb @@ -0,0 +1,252 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetGeneralSettingsResponse + # default organization for the current context + attr_accessor :default_org_id + + # default language for the current context + attr_accessor :default_language + + attr_accessor :supported_languages + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'default_org_id' => :'defaultOrgId', + :'default_language' => :'defaultLanguage', + :'supported_languages' => :'supportedLanguages' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'default_org_id' => :'String', + :'default_language' => :'String', + :'supported_languages' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetGeneralSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetGeneralSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'default_org_id') + self.default_org_id = attributes[:'default_org_id'] + end + + if attributes.key?(:'default_language') + self.default_language = attributes[:'default_language'] + end + + if attributes.key?(:'supported_languages') + if (value = attributes[:'supported_languages']).is_a?(Array) + self.supported_languages = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + default_org_id == o.default_org_id && + default_language == o.default_language && + supported_languages == o.supported_languages + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [default_org_id, default_language, supported_languages].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb b/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb new file mode 100644 index 00000000..f4613363 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetLegalAndSupportSettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServiceLegalAndSupportSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLegalAndSupportSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLegalAndSupportSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb b/lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb new file mode 100644 index 00000000..dd32c06b --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_lockout_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetLockoutSettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServiceLockoutSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLockoutSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLockoutSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_login_settings_response.rb b/lib/zitadel/client/models/settings_service_get_login_settings_response.rb new file mode 100644 index 00000000..68373ce9 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_login_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetLoginSettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServiceLoginSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLoginSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLoginSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb b/lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb new file mode 100644 index 00000000..91d4cba0 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_password_complexity_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetPasswordComplexitySettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServicePasswordComplexitySettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetPasswordComplexitySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetPasswordComplexitySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb b/lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb new file mode 100644 index 00000000..0f8fe3b7 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_password_expiry_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetPasswordExpirySettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServicePasswordExpirySettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetPasswordExpirySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetPasswordExpirySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_get_security_settings_response.rb b/lib/zitadel/client/models/settings_service_get_security_settings_response.rb new file mode 100644 index 00000000..94198f21 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_security_settings_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceGetSecuritySettingsResponse + attr_accessor :details + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'settings' => :'settings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails', + :'settings' => :'SettingsServiceSecuritySettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetSecuritySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetSecuritySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, settings].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_identity_provider.rb b/lib/zitadel/client/models/settings_service_identity_provider.rb new file mode 100644 index 00000000..3a5dfaa0 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_identity_provider.rb @@ -0,0 +1,281 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceIdentityProvider + attr_accessor :id + + attr_accessor :name + + attr_accessor :type + + attr_accessor :options + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'type' => :'type', + :'options' => :'options' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'type' => :'SettingsServiceIdentityProviderType', + :'options' => :'SettingsServiceOptions' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceIdentityProvider` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceIdentityProvider`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = 'IDENTITY_PROVIDER_TYPE_UNSPECIFIED' + end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + type == o.type && + options == o.options + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, type, options].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_identity_provider_type.rb b/lib/zitadel/client/models/settings_service_identity_provider_type.rb new file mode 100644 index 00000000..29de3c86 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_identity_provider_type.rb @@ -0,0 +1,52 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceIdentityProviderType + IDENTITY_PROVIDER_TYPE_UNSPECIFIED = "IDENTITY_PROVIDER_TYPE_UNSPECIFIED".freeze + IDENTITY_PROVIDER_TYPE_OIDC = "IDENTITY_PROVIDER_TYPE_OIDC".freeze + IDENTITY_PROVIDER_TYPE_JWT = "IDENTITY_PROVIDER_TYPE_JWT".freeze + IDENTITY_PROVIDER_TYPE_LDAP = "IDENTITY_PROVIDER_TYPE_LDAP".freeze + IDENTITY_PROVIDER_TYPE_OAUTH = "IDENTITY_PROVIDER_TYPE_OAUTH".freeze + IDENTITY_PROVIDER_TYPE_AZURE_AD = "IDENTITY_PROVIDER_TYPE_AZURE_AD".freeze + IDENTITY_PROVIDER_TYPE_GITHUB = "IDENTITY_PROVIDER_TYPE_GITHUB".freeze + IDENTITY_PROVIDER_TYPE_GITHUB_ES = "IDENTITY_PROVIDER_TYPE_GITHUB_ES".freeze + IDENTITY_PROVIDER_TYPE_GITLAB = "IDENTITY_PROVIDER_TYPE_GITLAB".freeze + IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED = "IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED".freeze + IDENTITY_PROVIDER_TYPE_GOOGLE = "IDENTITY_PROVIDER_TYPE_GOOGLE".freeze + IDENTITY_PROVIDER_TYPE_SAML = "IDENTITY_PROVIDER_TYPE_SAML".freeze + IDENTITY_PROVIDER_TYPE_APPLE = "IDENTITY_PROVIDER_TYPE_APPLE".freeze + + def self.all_vars + @all_vars ||= [IDENTITY_PROVIDER_TYPE_UNSPECIFIED, IDENTITY_PROVIDER_TYPE_OIDC, IDENTITY_PROVIDER_TYPE_JWT, IDENTITY_PROVIDER_TYPE_LDAP, IDENTITY_PROVIDER_TYPE_OAUTH, IDENTITY_PROVIDER_TYPE_AZURE_AD, IDENTITY_PROVIDER_TYPE_GITHUB, IDENTITY_PROVIDER_TYPE_GITHUB_ES, IDENTITY_PROVIDER_TYPE_GITLAB, IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED, IDENTITY_PROVIDER_TYPE_GOOGLE, IDENTITY_PROVIDER_TYPE_SAML, IDENTITY_PROVIDER_TYPE_APPLE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SettingsServiceIdentityProviderType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceIdentityProviderType" + end + end + +end diff --git a/lib/zitadel/client/models/settings_service_legal_and_support_settings.rb b/lib/zitadel/client/models/settings_service_legal_and_support_settings.rb new file mode 100644 index 00000000..35a27227 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_legal_and_support_settings.rb @@ -0,0 +1,321 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceLegalAndSupportSettings + attr_accessor :tos_link + + attr_accessor :privacy_policy_link + + attr_accessor :help_link + + # help / support email address. + attr_accessor :support_email + + attr_accessor :resource_owner_type + + # Link to documentation to be shown in the console. + attr_accessor :docs_link + + # Link to an external resource that will be available to users in the console. + attr_accessor :custom_link + + # The button text that would be shown in console pointing to custom link. + attr_accessor :custom_link_text + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tos_link' => :'tosLink', + :'privacy_policy_link' => :'privacyPolicyLink', + :'help_link' => :'helpLink', + :'support_email' => :'supportEmail', + :'resource_owner_type' => :'resourceOwnerType', + :'docs_link' => :'docsLink', + :'custom_link' => :'customLink', + :'custom_link_text' => :'customLinkText' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'tos_link' => :'String', + :'privacy_policy_link' => :'String', + :'help_link' => :'String', + :'support_email' => :'String', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType', + :'docs_link' => :'String', + :'custom_link' => :'String', + :'custom_link_text' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceLegalAndSupportSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceLegalAndSupportSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tos_link') + self.tos_link = attributes[:'tos_link'] + end + + if attributes.key?(:'privacy_policy_link') + self.privacy_policy_link = attributes[:'privacy_policy_link'] + end + + if attributes.key?(:'help_link') + self.help_link = attributes[:'help_link'] + end + + if attributes.key?(:'support_email') + self.support_email = attributes[:'support_email'] + end + + if attributes.key?(:'resource_owner_type') + self.resource_owner_type = attributes[:'resource_owner_type'] + else + self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + end + + if attributes.key?(:'docs_link') + self.docs_link = attributes[:'docs_link'] + end + + if attributes.key?(:'custom_link') + self.custom_link = attributes[:'custom_link'] + end + + if attributes.key?(:'custom_link_text') + self.custom_link_text = attributes[:'custom_link_text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tos_link == o.tos_link && + privacy_policy_link == o.privacy_policy_link && + help_link == o.help_link && + support_email == o.support_email && + resource_owner_type == o.resource_owner_type && + docs_link == o.docs_link && + custom_link == o.custom_link && + custom_link_text == o.custom_link_text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tos_link, privacy_policy_link, help_link, support_email, resource_owner_type, docs_link, custom_link, custom_link_text].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_list_details.rb b/lib/zitadel/client/models/settings_service_list_details.rb new file mode 100644 index 00000000..9ce658f1 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_list_details.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # the last time the projection got updated + attr_accessor :timestamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_result' => :'totalResult', + :'processed_sequence' => :'processedSequence', + :'timestamp' => :'timestamp' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total_result' => :'String', + :'processed_sequence' => :'String', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceListDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total_result') + self.total_result = attributes[:'total_result'] + end + + if attributes.key?(:'processed_sequence') + self.processed_sequence = attributes[:'processed_sequence'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_result == o.total_result && + processed_sequence == o.processed_sequence && + timestamp == o.timestamp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total_result, processed_sequence, timestamp].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_lockout_settings.rb b/lib/zitadel/client/models/settings_service_lockout_settings.rb new file mode 100644 index 00000000..e9962bb2 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_lockout_settings.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceLockoutSettings + # 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. + attr_accessor :max_password_attempts + + attr_accessor :resource_owner_type + + # 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. + attr_accessor :max_otp_attempts + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'max_password_attempts' => :'maxPasswordAttempts', + :'resource_owner_type' => :'resourceOwnerType', + :'max_otp_attempts' => :'maxOtpAttempts' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'max_password_attempts' => :'String', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType', + :'max_otp_attempts' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceLockoutSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceLockoutSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'max_password_attempts') + self.max_password_attempts = attributes[:'max_password_attempts'] + end + + if attributes.key?(:'resource_owner_type') + self.resource_owner_type = attributes[:'resource_owner_type'] + else + self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + end + + if attributes.key?(:'max_otp_attempts') + self.max_otp_attempts = attributes[:'max_otp_attempts'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + max_password_attempts == o.max_password_attempts && + resource_owner_type == o.resource_owner_type && + max_otp_attempts == o.max_otp_attempts + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [max_password_attempts, resource_owner_type, max_otp_attempts].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_login_settings.rb b/lib/zitadel/client/models/settings_service_login_settings.rb new file mode 100644 index 00000000..088100f2 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_login_settings.rb @@ -0,0 +1,447 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceLoginSettings + # defines if a user is allowed to log in with username and password + attr_accessor :allow_username_password + + # defines if a person is allowed to register a user on this organization + attr_accessor :allow_register + + # defines if a user is allowed to add a defined identity provider. E.g. Google auth + attr_accessor :allow_external_idp + + # defines if a user MUST use a multi-factor to log in + attr_accessor :force_mfa + + attr_accessor :passkeys_type + + # defines if password reset link should be shown in the login screen + attr_accessor :hide_password_reset + + # defines if unknown username on login screen directly returns an error or always displays the password screen + attr_accessor :ignore_unknown_usernames + + # defines where the user will be redirected to if the login is started without app context (e.g. from mail) + attr_accessor :default_redirect_uri + + # Defines after how much time the user has to re-authenticate with the password. + attr_accessor :password_check_lifetime + + # Defines after how much time the user has to re-authenticate with an external provider. + attr_accessor :external_login_check_lifetime + + # Defines after how much time the mfa prompt will be shown again. + attr_accessor :mfa_init_skip_lifetime + + # Defines after how long the second factor check is valid. + attr_accessor :second_factor_check_lifetime + + # Defines how long the multi-factor check is valid. + attr_accessor :multi_factor_check_lifetime + + attr_accessor :second_factors + + attr_accessor :multi_factors + + # 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. + attr_accessor :allow_domain_discovery + + # defines if the user can additionally (to the login name) be identified by their verified email address + attr_accessor :disable_login_with_email + + # defines if the user can additionally (to the login name) be identified by their verified phone number + attr_accessor :disable_login_with_phone + + attr_accessor :resource_owner_type + + # if activated, only local authenticated users are forced to use MFA. Authentication through IDPs won't prompt a MFA step in the login. + attr_accessor :force_mfa_local_only + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'allow_username_password' => :'allowUsernamePassword', + :'allow_register' => :'allowRegister', + :'allow_external_idp' => :'allowExternalIdp', + :'force_mfa' => :'forceMfa', + :'passkeys_type' => :'passkeysType', + :'hide_password_reset' => :'hidePasswordReset', + :'ignore_unknown_usernames' => :'ignoreUnknownUsernames', + :'default_redirect_uri' => :'defaultRedirectUri', + :'password_check_lifetime' => :'passwordCheckLifetime', + :'external_login_check_lifetime' => :'externalLoginCheckLifetime', + :'mfa_init_skip_lifetime' => :'mfaInitSkipLifetime', + :'second_factor_check_lifetime' => :'secondFactorCheckLifetime', + :'multi_factor_check_lifetime' => :'multiFactorCheckLifetime', + :'second_factors' => :'secondFactors', + :'multi_factors' => :'multiFactors', + :'allow_domain_discovery' => :'allowDomainDiscovery', + :'disable_login_with_email' => :'disableLoginWithEmail', + :'disable_login_with_phone' => :'disableLoginWithPhone', + :'resource_owner_type' => :'resourceOwnerType', + :'force_mfa_local_only' => :'forceMfaLocalOnly' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'allow_username_password' => :'Boolean', + :'allow_register' => :'Boolean', + :'allow_external_idp' => :'Boolean', + :'force_mfa' => :'Boolean', + :'passkeys_type' => :'SettingsServicePasskeysType', + :'hide_password_reset' => :'Boolean', + :'ignore_unknown_usernames' => :'Boolean', + :'default_redirect_uri' => :'String', + :'password_check_lifetime' => :'String', + :'external_login_check_lifetime' => :'String', + :'mfa_init_skip_lifetime' => :'String', + :'second_factor_check_lifetime' => :'String', + :'multi_factor_check_lifetime' => :'String', + :'second_factors' => :'Array', + :'multi_factors' => :'Array', + :'allow_domain_discovery' => :'Boolean', + :'disable_login_with_email' => :'Boolean', + :'disable_login_with_phone' => :'Boolean', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType', + :'force_mfa_local_only' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceLoginSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceLoginSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'allow_username_password') + self.allow_username_password = attributes[:'allow_username_password'] + end + + if attributes.key?(:'allow_register') + self.allow_register = attributes[:'allow_register'] + end + + if attributes.key?(:'allow_external_idp') + self.allow_external_idp = attributes[:'allow_external_idp'] + end + + if attributes.key?(:'force_mfa') + self.force_mfa = attributes[:'force_mfa'] + end + + if attributes.key?(:'passkeys_type') + self.passkeys_type = attributes[:'passkeys_type'] + else + self.passkeys_type = 'PASSKEYS_TYPE_NOT_ALLOWED' + end + + if attributes.key?(:'hide_password_reset') + self.hide_password_reset = attributes[:'hide_password_reset'] + end + + if attributes.key?(:'ignore_unknown_usernames') + self.ignore_unknown_usernames = attributes[:'ignore_unknown_usernames'] + end + + if attributes.key?(:'default_redirect_uri') + self.default_redirect_uri = attributes[:'default_redirect_uri'] + end + + if attributes.key?(:'password_check_lifetime') + self.password_check_lifetime = attributes[:'password_check_lifetime'] + end + + if attributes.key?(:'external_login_check_lifetime') + self.external_login_check_lifetime = attributes[:'external_login_check_lifetime'] + end + + if attributes.key?(:'mfa_init_skip_lifetime') + self.mfa_init_skip_lifetime = attributes[:'mfa_init_skip_lifetime'] + end + + if attributes.key?(:'second_factor_check_lifetime') + self.second_factor_check_lifetime = attributes[:'second_factor_check_lifetime'] + end + + if attributes.key?(:'multi_factor_check_lifetime') + self.multi_factor_check_lifetime = attributes[:'multi_factor_check_lifetime'] + end + + if attributes.key?(:'second_factors') + if (value = attributes[:'second_factors']).is_a?(Array) + self.second_factors = value + end + end + + if attributes.key?(:'multi_factors') + if (value = attributes[:'multi_factors']).is_a?(Array) + self.multi_factors = value + end + end + + if attributes.key?(:'allow_domain_discovery') + self.allow_domain_discovery = attributes[:'allow_domain_discovery'] + end + + if attributes.key?(:'disable_login_with_email') + self.disable_login_with_email = attributes[:'disable_login_with_email'] + end + + if attributes.key?(:'disable_login_with_phone') + self.disable_login_with_phone = attributes[:'disable_login_with_phone'] + end + + if attributes.key?(:'resource_owner_type') + self.resource_owner_type = attributes[:'resource_owner_type'] + else + self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + end + + if attributes.key?(:'force_mfa_local_only') + self.force_mfa_local_only = attributes[:'force_mfa_local_only'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allow_username_password == o.allow_username_password && + allow_register == o.allow_register && + allow_external_idp == o.allow_external_idp && + force_mfa == o.force_mfa && + passkeys_type == o.passkeys_type && + hide_password_reset == o.hide_password_reset && + ignore_unknown_usernames == o.ignore_unknown_usernames && + default_redirect_uri == o.default_redirect_uri && + password_check_lifetime == o.password_check_lifetime && + external_login_check_lifetime == o.external_login_check_lifetime && + mfa_init_skip_lifetime == o.mfa_init_skip_lifetime && + second_factor_check_lifetime == o.second_factor_check_lifetime && + multi_factor_check_lifetime == o.multi_factor_check_lifetime && + second_factors == o.second_factors && + multi_factors == o.multi_factors && + allow_domain_discovery == o.allow_domain_discovery && + disable_login_with_email == o.disable_login_with_email && + disable_login_with_phone == o.disable_login_with_phone && + resource_owner_type == o.resource_owner_type && + force_mfa_local_only == o.force_mfa_local_only + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [allow_username_password, allow_register, allow_external_idp, force_mfa, passkeys_type, hide_password_reset, ignore_unknown_usernames, default_redirect_uri, password_check_lifetime, external_login_check_lifetime, mfa_init_skip_lifetime, second_factor_check_lifetime, multi_factor_check_lifetime, second_factors, multi_factors, allow_domain_discovery, disable_login_with_email, disable_login_with_phone, resource_owner_type, force_mfa_local_only].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_multi_factor_type.rb b/lib/zitadel/client/models/settings_service_multi_factor_type.rb new file mode 100644 index 00000000..5552e671 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_multi_factor_type.rb @@ -0,0 +1,41 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceMultiFactorType + MULTI_FACTOR_TYPE_UNSPECIFIED = "MULTI_FACTOR_TYPE_UNSPECIFIED".freeze + MULTI_FACTOR_TYPE_U2_F_WITH_VERIFICATION = "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION".freeze + + def self.all_vars + @all_vars ||= [MULTI_FACTOR_TYPE_UNSPECIFIED, MULTI_FACTOR_TYPE_U2_F_WITH_VERIFICATION].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SettingsServiceMultiFactorType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceMultiFactorType" + end + end + +end diff --git a/lib/zitadel/client/models/settings_service_options.rb b/lib/zitadel/client/models/settings_service_options.rb new file mode 100644 index 00000000..7d665fb7 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_options.rb @@ -0,0 +1,294 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceOptions + # Enable if users should be able to link an existing ZITADEL user with an external account. + attr_accessor :is_linking_allowed + + # Enable if users should be able to create a new account in ZITADEL when using an external account. + attr_accessor :is_creation_allowed + + # Enable if a new account in ZITADEL should be created automatically when login with an external account. + attr_accessor :is_auto_creation + + # Enable if a the ZITADEL account fields should be updated automatically on each login. + attr_accessor :is_auto_update + + attr_accessor :auto_linking + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'is_linking_allowed' => :'isLinkingAllowed', + :'is_creation_allowed' => :'isCreationAllowed', + :'is_auto_creation' => :'isAutoCreation', + :'is_auto_update' => :'isAutoUpdate', + :'auto_linking' => :'autoLinking' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'is_linking_allowed' => :'Boolean', + :'is_creation_allowed' => :'Boolean', + :'is_auto_creation' => :'Boolean', + :'is_auto_update' => :'Boolean', + :'auto_linking' => :'SettingsServiceAutoLinkingOption' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceOptions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'is_linking_allowed') + self.is_linking_allowed = attributes[:'is_linking_allowed'] + end + + if attributes.key?(:'is_creation_allowed') + self.is_creation_allowed = attributes[:'is_creation_allowed'] + end + + if attributes.key?(:'is_auto_creation') + self.is_auto_creation = attributes[:'is_auto_creation'] + end + + if attributes.key?(:'is_auto_update') + self.is_auto_update = attributes[:'is_auto_update'] + end + + if attributes.key?(:'auto_linking') + self.auto_linking = attributes[:'auto_linking'] + else + self.auto_linking = 'AUTO_LINKING_OPTION_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_linking_allowed == o.is_linking_allowed && + is_creation_allowed == o.is_creation_allowed && + is_auto_creation == o.is_auto_creation && + is_auto_update == o.is_auto_update && + auto_linking == o.auto_linking + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [is_linking_allowed, is_creation_allowed, is_auto_creation, is_auto_update, auto_linking].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_passkeys_type.rb b/lib/zitadel/client/models/settings_service_passkeys_type.rb new file mode 100644 index 00000000..ae6fbdf8 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_passkeys_type.rb @@ -0,0 +1,41 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServicePasskeysType + PASSKEYS_TYPE_NOT_ALLOWED = "PASSKEYS_TYPE_NOT_ALLOWED".freeze + PASSKEYS_TYPE_ALLOWED = "PASSKEYS_TYPE_ALLOWED".freeze + + def self.all_vars + @all_vars ||= [PASSKEYS_TYPE_NOT_ALLOWED, PASSKEYS_TYPE_ALLOWED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SettingsServicePasskeysType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServicePasskeysType" + end + end + +end diff --git a/lib/zitadel/client/models/settings_service_password_complexity_settings.rb b/lib/zitadel/client/models/settings_service_password_complexity_settings.rb new file mode 100644 index 00000000..ba59b76f --- /dev/null +++ b/lib/zitadel/client/models/settings_service_password_complexity_settings.rb @@ -0,0 +1,304 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServicePasswordComplexitySettings + # Defines the minimum length of a password. + attr_accessor :min_length + + # defines if the password MUST contain an upper case letter + attr_accessor :requires_uppercase + + # defines if the password MUST contain a lowercase letter + attr_accessor :requires_lowercase + + # defines if the password MUST contain a number + attr_accessor :requires_number + + # defines if the password MUST contain a symbol. E.g. \"$\" + attr_accessor :requires_symbol + + attr_accessor :resource_owner_type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'min_length' => :'minLength', + :'requires_uppercase' => :'requiresUppercase', + :'requires_lowercase' => :'requiresLowercase', + :'requires_number' => :'requiresNumber', + :'requires_symbol' => :'requiresSymbol', + :'resource_owner_type' => :'resourceOwnerType' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'min_length' => :'String', + :'requires_uppercase' => :'Boolean', + :'requires_lowercase' => :'Boolean', + :'requires_number' => :'Boolean', + :'requires_symbol' => :'Boolean', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServicePasswordComplexitySettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServicePasswordComplexitySettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'min_length') + self.min_length = attributes[:'min_length'] + end + + if attributes.key?(:'requires_uppercase') + self.requires_uppercase = attributes[:'requires_uppercase'] + end + + if attributes.key?(:'requires_lowercase') + self.requires_lowercase = attributes[:'requires_lowercase'] + end + + if attributes.key?(:'requires_number') + self.requires_number = attributes[:'requires_number'] + end + + if attributes.key?(:'requires_symbol') + self.requires_symbol = attributes[:'requires_symbol'] + end + + if attributes.key?(:'resource_owner_type') + self.resource_owner_type = attributes[:'resource_owner_type'] + else + self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + min_length == o.min_length && + requires_uppercase == o.requires_uppercase && + requires_lowercase == o.requires_lowercase && + requires_number == o.requires_number && + requires_symbol == o.requires_symbol && + resource_owner_type == o.resource_owner_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [min_length, requires_uppercase, requires_lowercase, requires_number, requires_symbol, resource_owner_type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_password_expiry_settings.rb b/lib/zitadel/client/models/settings_service_password_expiry_settings.rb new file mode 100644 index 00000000..b62cd49d --- /dev/null +++ b/lib/zitadel/client/models/settings_service_password_expiry_settings.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServicePasswordExpirySettings + # Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. + attr_accessor :max_age_days + + # Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. + attr_accessor :expire_warn_days + + attr_accessor :resource_owner_type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'max_age_days' => :'maxAgeDays', + :'expire_warn_days' => :'expireWarnDays', + :'resource_owner_type' => :'resourceOwnerType' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'max_age_days' => :'String', + :'expire_warn_days' => :'String', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServicePasswordExpirySettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServicePasswordExpirySettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'max_age_days') + self.max_age_days = attributes[:'max_age_days'] + end + + if attributes.key?(:'expire_warn_days') + self.expire_warn_days = attributes[:'expire_warn_days'] + end + + if attributes.key?(:'resource_owner_type') + self.resource_owner_type = attributes[:'resource_owner_type'] + else + self.resource_owner_type = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + max_age_days == o.max_age_days && + expire_warn_days == o.expire_warn_days && + resource_owner_type == o.resource_owner_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [max_age_days, expire_warn_days, resource_owner_type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_protobuf_any.rb b/lib/zitadel/client/models/settings_service_protobuf_any.rb new file mode 100644 index 00000000..8b94f40c --- /dev/null +++ b/lib/zitadel/client/models/settings_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_resource_owner_type.rb b/lib/zitadel/client/models/settings_service_resource_owner_type.rb new file mode 100644 index 00000000..290be2f5 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_resource_owner_type.rb @@ -0,0 +1,42 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceResourceOwnerType + RESOURCE_OWNER_TYPE_UNSPECIFIED = "RESOURCE_OWNER_TYPE_UNSPECIFIED".freeze + RESOURCE_OWNER_TYPE_INSTANCE = "RESOURCE_OWNER_TYPE_INSTANCE".freeze + RESOURCE_OWNER_TYPE_ORG = "RESOURCE_OWNER_TYPE_ORG".freeze + + def self.all_vars + @all_vars ||= [RESOURCE_OWNER_TYPE_UNSPECIFIED, RESOURCE_OWNER_TYPE_INSTANCE, RESOURCE_OWNER_TYPE_ORG].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SettingsServiceResourceOwnerType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceResourceOwnerType" + end + end + +end diff --git a/lib/zitadel/client/models/settings_service_rpc_status.rb b/lib/zitadel/client/models/settings_service_rpc_status.rb new file mode 100644 index 00000000..0c9e3e3f --- /dev/null +++ b/lib/zitadel/client/models/settings_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_second_factor_type.rb b/lib/zitadel/client/models/settings_service_second_factor_type.rb new file mode 100644 index 00000000..12db1eca --- /dev/null +++ b/lib/zitadel/client/models/settings_service_second_factor_type.rb @@ -0,0 +1,44 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceSecondFactorType + SECOND_FACTOR_TYPE_UNSPECIFIED = "SECOND_FACTOR_TYPE_UNSPECIFIED".freeze + SECOND_FACTOR_TYPE_OTP = "SECOND_FACTOR_TYPE_OTP".freeze + SECOND_FACTOR_TYPE_U2_F = "SECOND_FACTOR_TYPE_U2F".freeze + SECOND_FACTOR_TYPE_OTP_EMAIL = "SECOND_FACTOR_TYPE_OTP_EMAIL".freeze + SECOND_FACTOR_TYPE_OTP_SMS = "SECOND_FACTOR_TYPE_OTP_SMS".freeze + + def self.all_vars + @all_vars ||= [SECOND_FACTOR_TYPE_UNSPECIFIED, SECOND_FACTOR_TYPE_OTP, SECOND_FACTOR_TYPE_U2_F, SECOND_FACTOR_TYPE_OTP_EMAIL, SECOND_FACTOR_TYPE_OTP_SMS].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SettingsServiceSecondFactorType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceSecondFactorType" + end + end + +end diff --git a/lib/zitadel/client/models/settings_service_security_settings.rb b/lib/zitadel/client/models/settings_service_security_settings.rb new file mode 100644 index 00000000..a7bc40ee --- /dev/null +++ b/lib/zitadel/client/models/settings_service_security_settings.rb @@ -0,0 +1,240 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceSecuritySettings + attr_accessor :embedded_iframe + + # default language for the current context + attr_accessor :enable_impersonation + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'embedded_iframe' => :'embeddedIframe', + :'enable_impersonation' => :'enableImpersonation' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'embedded_iframe' => :'SettingsServiceEmbeddedIframeSettings', + :'enable_impersonation' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceSecuritySettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceSecuritySettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'embedded_iframe') + self.embedded_iframe = attributes[:'embedded_iframe'] + end + + if attributes.key?(:'enable_impersonation') + self.enable_impersonation = attributes[:'enable_impersonation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + embedded_iframe == o.embedded_iframe && + enable_impersonation == o.enable_impersonation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [embedded_iframe, enable_impersonation].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_set_security_settings_request.rb b/lib/zitadel/client/models/settings_service_set_security_settings_request.rb new file mode 100644 index 00000000..0316d361 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_set_security_settings_request.rb @@ -0,0 +1,240 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceSetSecuritySettingsRequest + attr_accessor :embedded_iframe + + # allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well + attr_accessor :enable_impersonation + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'embedded_iframe' => :'embeddedIframe', + :'enable_impersonation' => :'enableImpersonation' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'embedded_iframe' => :'SettingsServiceEmbeddedIframeSettings', + :'enable_impersonation' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'embedded_iframe') + self.embedded_iframe = attributes[:'embedded_iframe'] + end + + if attributes.key?(:'enable_impersonation') + self.enable_impersonation = attributes[:'enable_impersonation'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + embedded_iframe == o.embedded_iframe && + enable_impersonation == o.enable_impersonation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [embedded_iframe, enable_impersonation].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_set_security_settings_response.rb b/lib/zitadel/client/models/settings_service_set_security_settings_response.rb new file mode 100644 index 00000000..7354ac4a --- /dev/null +++ b/lib/zitadel/client/models/settings_service_set_security_settings_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceSetSecuritySettingsResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'SettingsServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceSetSecuritySettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_theme.rb b/lib/zitadel/client/models/settings_service_theme.rb new file mode 100644 index 00000000..a85624ee --- /dev/null +++ b/lib/zitadel/client/models/settings_service_theme.rb @@ -0,0 +1,281 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceTheme + # hex value for primary color + attr_accessor :primary_color + + # hex value for background color + attr_accessor :background_color + + # hex value for warn color + attr_accessor :warn_color + + # hex value for font color + attr_accessor :font_color + + # url to the logo + attr_accessor :logo_url + + # url to the icon + attr_accessor :icon_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'primary_color' => :'primaryColor', + :'background_color' => :'backgroundColor', + :'warn_color' => :'warnColor', + :'font_color' => :'fontColor', + :'logo_url' => :'logoUrl', + :'icon_url' => :'iconUrl' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'primary_color' => :'String', + :'background_color' => :'String', + :'warn_color' => :'String', + :'font_color' => :'String', + :'logo_url' => :'String', + :'icon_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceTheme` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceTheme`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'primary_color') + self.primary_color = attributes[:'primary_color'] + end + + if attributes.key?(:'background_color') + self.background_color = attributes[:'background_color'] + end + + if attributes.key?(:'warn_color') + self.warn_color = attributes[:'warn_color'] + end + + if attributes.key?(:'font_color') + self.font_color = attributes[:'font_color'] + end + + if attributes.key?(:'logo_url') + self.logo_url = attributes[:'logo_url'] + end + + if attributes.key?(:'icon_url') + self.icon_url = attributes[:'icon_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + primary_color == o.primary_color && + background_color == o.background_color && + warn_color == o.warn_color && + font_color == o.font_color && + logo_url == o.logo_url && + icon_url == o.icon_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [primary_color, background_color, warn_color, font_color, logo_url, icon_url].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/settings_service_theme_mode.rb b/lib/zitadel/client/models/settings_service_theme_mode.rb new file mode 100644 index 00000000..fe78c972 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_theme_mode.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SettingsServiceThemeMode + THEME_MODE_UNSPECIFIED = "THEME_MODE_UNSPECIFIED".freeze + THEME_MODE_AUTO = "THEME_MODE_AUTO".freeze + THEME_MODE_LIGHT = "THEME_MODE_LIGHT".freeze + THEME_MODE_DARK = "THEME_MODE_DARK".freeze + + def self.all_vars + @all_vars ||= [THEME_MODE_UNSPECIFIED, THEME_MODE_AUTO, THEME_MODE_LIGHT, THEME_MODE_DARK].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SettingsServiceThemeMode.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceThemeMode" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_access_token_type.rb b/lib/zitadel/client/models/user_service_access_token_type.rb new file mode 100644 index 00000000..d3d2154e --- /dev/null +++ b/lib/zitadel/client/models/user_service_access_token_type.rb @@ -0,0 +1,41 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAccessTokenType + ACCESS_TOKEN_TYPE_BEARER = "ACCESS_TOKEN_TYPE_BEARER".freeze + ACCESS_TOKEN_TYPE_JWT = "ACCESS_TOKEN_TYPE_JWT".freeze + + def self.all_vars + @all_vars ||= [ACCESS_TOKEN_TYPE_BEARER, ACCESS_TOKEN_TYPE_JWT].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceAccessTokenType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceAccessTokenType" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_add_human_user_request.rb b/lib/zitadel/client/models/user_service_add_human_user_request.rb new file mode 100644 index 00000000..561c15e9 --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_human_user_request.rb @@ -0,0 +1,445 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddHumanUserRequest + # optionally set your own id unique for the user. + attr_accessor :user_id + + # optionally set a unique username, if none is provided the email will be used. + attr_accessor :username + + attr_accessor :organization + + attr_accessor :profile + + attr_accessor :email + + attr_accessor :phone + + attr_accessor :metadata + + attr_accessor :password + + attr_accessor :hashed_password + + attr_accessor :idp_links + + # 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. + attr_accessor :totp_secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'username' => :'username', + :'organization' => :'organization', + :'profile' => :'profile', + :'email' => :'email', + :'phone' => :'phone', + :'metadata' => :'metadata', + :'password' => :'password', + :'hashed_password' => :'hashedPassword', + :'idp_links' => :'idpLinks', + :'totp_secret' => :'totpSecret' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'username' => :'String', + :'organization' => :'UserServiceOrganization', + :'profile' => :'UserServiceSetHumanProfile', + :'email' => :'UserServiceSetHumanEmail', + :'phone' => :'UserServiceSetHumanPhone', + :'metadata' => :'Array', + :'password' => :'UserServicePassword', + :'hashed_password' => :'UserServiceHashedPassword', + :'idp_links' => :'Array', + :'totp_secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddHumanUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddHumanUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'organization') + self.organization = attributes[:'organization'] + end + + if attributes.key?(:'profile') + self.profile = attributes[:'profile'] + else + self.profile = nil + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + else + self.email = nil + end + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Array) + self.metadata = value + end + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'hashed_password') + self.hashed_password = attributes[:'hashed_password'] + end + + if attributes.key?(:'idp_links') + if (value = attributes[:'idp_links']).is_a?(Array) + self.idp_links = value + end + end + + if attributes.key?(:'totp_secret') + self.totp_secret = attributes[:'totp_secret'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@user_id.nil? && @user_id.to_s.length > 200 + invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') + end + + if !@user_id.nil? && @user_id.to_s.length < 1 + invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') + end + + if !@username.nil? && @username.to_s.length > 200 + invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') + end + + if !@username.nil? && @username.to_s.length < 1 + invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') + end + + if @profile.nil? + invalid_properties.push('invalid value for "profile", profile cannot be nil.') + end + + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if !@totp_secret.nil? && @totp_secret.to_s.length > 200 + invalid_properties.push('invalid value for "totp_secret", the character length must be smaller than or equal to 200.') + end + + if !@totp_secret.nil? && @totp_secret.to_s.length < 1 + invalid_properties.push('invalid value for "totp_secret", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@user_id.nil? && @user_id.to_s.length > 200 + return false if !@user_id.nil? && @user_id.to_s.length < 1 + return false if !@username.nil? && @username.to_s.length > 200 + return false if !@username.nil? && @username.to_s.length < 1 + return false if @profile.nil? + return false if @email.nil? + return false if !@totp_secret.nil? && @totp_secret.to_s.length > 200 + return false if !@totp_secret.nil? && @totp_secret.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + if user_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' + end + + if user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [Object] username Value to be assigned + def username=(username) + if username.nil? + fail ArgumentError, 'username cannot be nil' + end + + if username.to_s.length > 200 + fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' + end + + if username.to_s.length < 1 + fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' + end + + @username = username + end + + # Custom attribute writer method with validation + # @param [Object] profile Value to be assigned + def profile=(profile) + if profile.nil? + fail ArgumentError, 'profile cannot be nil' + end + + @profile = profile + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if email.nil? + fail ArgumentError, 'email cannot be nil' + end + + @email = email + end + + # Custom attribute writer method with validation + # @param [Object] totp_secret Value to be assigned + def totp_secret=(totp_secret) + if totp_secret.nil? + fail ArgumentError, 'totp_secret cannot be nil' + end + + if totp_secret.to_s.length > 200 + fail ArgumentError, 'invalid value for "totp_secret", the character length must be smaller than or equal to 200.' + end + + if totp_secret.to_s.length < 1 + fail ArgumentError, 'invalid value for "totp_secret", the character length must be great than or equal to 1.' + end + + @totp_secret = totp_secret + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + username == o.username && + organization == o.organization && + profile == o.profile && + email == o.email && + phone == o.phone && + metadata == o.metadata && + password == o.password && + hashed_password == o.hashed_password && + idp_links == o.idp_links && + totp_secret == o.totp_secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, username, organization, profile, email, phone, metadata, password, hashed_password, idp_links, totp_secret].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_add_human_user_response.rb b/lib/zitadel/client/models/user_service_add_human_user_response.rb new file mode 100644 index 00000000..28cb54ef --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_human_user_response.rb @@ -0,0 +1,257 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddHumanUserResponse + attr_accessor :user_id + + attr_accessor :details + + attr_accessor :email_code + + attr_accessor :phone_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'details' => :'details', + :'email_code' => :'emailCode', + :'phone_code' => :'phoneCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'details' => :'UserServiceDetails', + :'email_code' => :'String', + :'phone_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddHumanUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddHumanUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'email_code') + self.email_code = attributes[:'email_code'] + end + + if attributes.key?(:'phone_code') + self.phone_code = attributes[:'phone_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + details == o.details && + email_code == o.email_code && + phone_code == o.phone_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, details, email_code, phone_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb b/lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb new file mode 100644 index 00000000..6aef28bf --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddIDPLinkRequest + attr_accessor :idp_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_link' => :'idpLink' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp_link' => :'UserServiceIDPLink' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddIDPLinkRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddIDPLinkRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp_link') + self.idp_link = attributes[:'idp_link'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp_link == o.idp_link + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp_link].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb b/lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb new file mode 100644 index 00000000..587b599a --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_i_d_p_link_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddIDPLinkResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddIDPLinkResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddIDPLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb b/lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb new file mode 100644 index 00000000..8b89ec45 --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_o_t_p_email_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddOTPEmailResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddOTPEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddOTPEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb b/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb new file mode 100644 index 00000000..aae704a0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddOTPSMSResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAddOTPSMSResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddOTPSMSResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_and_query.rb b/lib/zitadel/client/models/user_service_and_query.rb new file mode 100644 index 00000000..111d0bd0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_and_query.rb @@ -0,0 +1,234 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Connect multiple sub-condition with and AND operator. + class UserServiceAndQuery + # the sub queries to 'AND' + attr_accessor :queries + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'queries' => :'queries' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'queries' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAndQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAndQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + queries == o.queries + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [queries].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_auth_factor.rb b/lib/zitadel/client/models/user_service_auth_factor.rb new file mode 100644 index 00000000..1bcc02c4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_auth_factor.rb @@ -0,0 +1,268 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAuthFactor + attr_accessor :state + + attr_accessor :otp + + attr_accessor :u2f + + attr_accessor :otp_sms + + attr_accessor :otp_email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state' => :'state', + :'otp' => :'otp', + :'u2f' => :'u2f', + :'otp_sms' => :'otpSms', + :'otp_email' => :'otpEmail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'state' => :'UserServiceAuthFactorState', + :'otp' => :'Object', + :'u2f' => :'UserServiceAuthFactorU2F', + :'otp_sms' => :'Object', + :'otp_email' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAuthFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAuthFactor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'AUTH_FACTOR_STATE_UNSPECIFIED' + end + + if attributes.key?(:'otp') + self.otp = attributes[:'otp'] + end + + if attributes.key?(:'u2f') + self.u2f = attributes[:'u2f'] + end + + if attributes.key?(:'otp_sms') + self.otp_sms = attributes[:'otp_sms'] + end + + if attributes.key?(:'otp_email') + self.otp_email = attributes[:'otp_email'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + state == o.state && + otp == o.otp && + u2f == o.u2f && + otp_sms == o.otp_sms && + otp_email == o.otp_email + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [state, otp, u2f, otp_sms, otp_email].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_auth_factor_state.rb b/lib/zitadel/client/models/user_service_auth_factor_state.rb new file mode 100644 index 00000000..44348691 --- /dev/null +++ b/lib/zitadel/client/models/user_service_auth_factor_state.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAuthFactorState + AUTH_FACTOR_STATE_UNSPECIFIED = "AUTH_FACTOR_STATE_UNSPECIFIED".freeze + AUTH_FACTOR_STATE_NOT_READY = "AUTH_FACTOR_STATE_NOT_READY".freeze + AUTH_FACTOR_STATE_READY = "AUTH_FACTOR_STATE_READY".freeze + AUTH_FACTOR_STATE_REMOVED = "AUTH_FACTOR_STATE_REMOVED".freeze + + def self.all_vars + @all_vars ||= [AUTH_FACTOR_STATE_UNSPECIFIED, AUTH_FACTOR_STATE_NOT_READY, AUTH_FACTOR_STATE_READY, AUTH_FACTOR_STATE_REMOVED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceAuthFactorState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceAuthFactorState" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_auth_factor_u2_f.rb b/lib/zitadel/client/models/user_service_auth_factor_u2_f.rb new file mode 100644 index 00000000..fa1048a6 --- /dev/null +++ b/lib/zitadel/client/models/user_service_auth_factor_u2_f.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAuthFactorU2F + attr_accessor :id + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceAuthFactorU2F` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAuthFactorU2F`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_authentication_method_type.rb b/lib/zitadel/client/models/user_service_authentication_method_type.rb new file mode 100644 index 00000000..d3e70a79 --- /dev/null +++ b/lib/zitadel/client/models/user_service_authentication_method_type.rb @@ -0,0 +1,47 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAuthenticationMethodType + AUTHENTICATION_METHOD_TYPE_UNSPECIFIED = "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED".freeze + AUTHENTICATION_METHOD_TYPE_PASSWORD = "AUTHENTICATION_METHOD_TYPE_PASSWORD".freeze + AUTHENTICATION_METHOD_TYPE_PASSKEY = "AUTHENTICATION_METHOD_TYPE_PASSKEY".freeze + AUTHENTICATION_METHOD_TYPE_IDP = "AUTHENTICATION_METHOD_TYPE_IDP".freeze + AUTHENTICATION_METHOD_TYPE_TOTP = "AUTHENTICATION_METHOD_TYPE_TOTP".freeze + AUTHENTICATION_METHOD_TYPE_U2_F = "AUTHENTICATION_METHOD_TYPE_U2F".freeze + AUTHENTICATION_METHOD_TYPE_OTP_SMS = "AUTHENTICATION_METHOD_TYPE_OTP_SMS".freeze + AUTHENTICATION_METHOD_TYPE_OTP_EMAIL = "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL".freeze + + def self.all_vars + @all_vars ||= [AUTHENTICATION_METHOD_TYPE_UNSPECIFIED, AUTHENTICATION_METHOD_TYPE_PASSWORD, AUTHENTICATION_METHOD_TYPE_PASSKEY, AUTHENTICATION_METHOD_TYPE_IDP, AUTHENTICATION_METHOD_TYPE_TOTP, AUTHENTICATION_METHOD_TYPE_U2_F, AUTHENTICATION_METHOD_TYPE_OTP_SMS, AUTHENTICATION_METHOD_TYPE_OTP_EMAIL].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceAuthenticationMethodType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceAuthenticationMethodType" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_create_invite_code_request.rb b/lib/zitadel/client/models/user_service_create_invite_code_request.rb new file mode 100644 index 00000000..d691a4c2 --- /dev/null +++ b/lib/zitadel/client/models/user_service_create_invite_code_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceCreateInviteCodeRequest + attr_accessor :send_code + + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode', + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_code' => :'UserServiceSendInviteCode', + :'return_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreateInviteCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreateInviteCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_code == o.send_code && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_code, return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_create_invite_code_response.rb b/lib/zitadel/client/models/user_service_create_invite_code_response.rb new file mode 100644 index 00000000..2ad90a73 --- /dev/null +++ b/lib/zitadel/client/models/user_service_create_invite_code_response.rb @@ -0,0 +1,240 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceCreateInviteCodeResponse + attr_accessor :details + + # The invite code is returned if the verification was set to return_code. + attr_accessor :invite_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'invite_code' => :'inviteCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'invite_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreateInviteCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreateInviteCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'invite_code') + self.invite_code = attributes[:'invite_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + invite_code == o.invite_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, invite_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb b/lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb new file mode 100644 index 00000000..2db10461 --- /dev/null +++ b/lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceCreatePasskeyRegistrationLinkRequest + attr_accessor :send_link + + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_link' => :'sendLink', + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_link' => :'UserServiceSendPasskeyRegistrationLink', + :'return_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_link') + self.send_link = attributes[:'send_link'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_link == o.send_link && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_link, return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb b/lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb new file mode 100644 index 00000000..d3592b03 --- /dev/null +++ b/lib/zitadel/client/models/user_service_create_passkey_registration_link_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceCreatePasskeyRegistrationLinkResponse + attr_accessor :details + + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'code' => :'code' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'code' => :'UserServicePasskeyRegistrationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceCreatePasskeyRegistrationLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_deactivate_user_response.rb b/lib/zitadel/client/models/user_service_deactivate_user_response.rb new file mode 100644 index 00000000..9efb53ab --- /dev/null +++ b/lib/zitadel/client/models/user_service_deactivate_user_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceDeactivateUserResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDeactivateUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDeactivateUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_delete_user_response.rb b/lib/zitadel/client/models/user_service_delete_user_response.rb new file mode 100644 index 00000000..a4254b64 --- /dev/null +++ b/lib/zitadel/client/models/user_service_delete_user_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceDeleteUserResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDeleteUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDeleteUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_details.rb b/lib/zitadel/client/models/user_service_details.rb new file mode 100644 index 00000000..ac688016 --- /dev/null +++ b/lib/zitadel/client/models/user_service_details.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceDetails + # on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :change_date + + attr_accessor :resource_owner + + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sequence' => :'sequence', + :'change_date' => :'changeDate', + :'resource_owner' => :'resourceOwner', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sequence' => :'String', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sequence') + self.sequence = attributes[:'sequence'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'resource_owner') + self.resource_owner = attributes[:'resource_owner'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sequence == o.sequence && + change_date == o.change_date && + resource_owner == o.resource_owner && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sequence, change_date, resource_owner, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_display_name_query.rb b/lib/zitadel/client/models/user_service_display_name_query.rb new file mode 100644 index 00000000..9c3239bf --- /dev/null +++ b/lib/zitadel/client/models/user_service_display_name_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific display name. + class UserServiceDisplayNameQuery + attr_accessor :display_name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'display_name' => :'displayName', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'display_name' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceDisplayNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDisplayNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + else + self.display_name = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @display_name.nil? + invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') + end + + if @display_name.to_s.length > 200 + invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') + end + + if @display_name.to_s.length < 1 + invalid_properties.push('invalid value for "display_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @display_name.nil? + return false if @display_name.to_s.length > 200 + return false if @display_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] display_name Value to be assigned + def display_name=(display_name) + if display_name.nil? + fail ArgumentError, 'display_name cannot be nil' + end + + if display_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' + end + + if display_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "display_name", the character length must be great than or equal to 1.' + end + + @display_name = display_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + display_name == o.display_name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [display_name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_email_query.rb b/lib/zitadel/client/models/user_service_email_query.rb new file mode 100644 index 00000000..f62341f1 --- /dev/null +++ b/lib/zitadel/client/models/user_service_email_query.rb @@ -0,0 +1,291 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific email. + class UserServiceEmailQuery + # email address of the user + attr_accessor :email_address + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email_address' => :'emailAddress', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email_address' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceEmailQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceEmailQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + else + self.email_address = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @email_address.nil? + invalid_properties.push('invalid value for "email_address", email_address cannot be nil.') + end + + if @email_address.to_s.length > 200 + invalid_properties.push('invalid value for "email_address", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @email_address.nil? + return false if @email_address.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + if email_address.to_s.length > 200 + fail ArgumentError, 'invalid value for "email_address", the character length must be smaller than or equal to 200.' + end + + @email_address = email_address + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email_address == o.email_address && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email_address, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_first_name_query.rb b/lib/zitadel/client/models/user_service_first_name_query.rb new file mode 100644 index 00000000..a015372c --- /dev/null +++ b/lib/zitadel/client/models/user_service_first_name_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific first name. + class UserServiceFirstNameQuery + attr_accessor :first_name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'firstName', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'first_name' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceFirstNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceFirstNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'first_name') + self.first_name = attributes[:'first_name'] + else + self.first_name = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @first_name.nil? + invalid_properties.push('invalid value for "first_name", first_name cannot be nil.') + end + + if @first_name.to_s.length > 200 + invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 200.') + end + + if @first_name.to_s.length < 1 + invalid_properties.push('invalid value for "first_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @first_name.nil? + return false if @first_name.to_s.length > 200 + return false if @first_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] first_name Value to be assigned + def first_name=(first_name) + if first_name.nil? + fail ArgumentError, 'first_name cannot be nil' + end + + if first_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 200.' + end + + if first_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "first_name", the character length must be great than or equal to 1.' + end + + @first_name = first_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + first_name == o.first_name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [first_name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_gender.rb b/lib/zitadel/client/models/user_service_gender.rb new file mode 100644 index 00000000..9ad89198 --- /dev/null +++ b/lib/zitadel/client/models/user_service_gender.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceGender + GENDER_UNSPECIFIED = "GENDER_UNSPECIFIED".freeze + GENDER_FEMALE = "GENDER_FEMALE".freeze + GENDER_MALE = "GENDER_MALE".freeze + GENDER_DIVERSE = "GENDER_DIVERSE".freeze + + def self.all_vars + @all_vars ||= [GENDER_UNSPECIFIED, GENDER_FEMALE, GENDER_MALE, GENDER_DIVERSE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceGender.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceGender" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb b/lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb new file mode 100644 index 00000000..6fd54dc1 --- /dev/null +++ b/lib/zitadel/client/models/user_service_get_user_by_i_d_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceGetUserByIDResponse + attr_accessor :details + + attr_accessor :user + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'user' => :'user' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'user' => :'UserServiceUser' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceGetUserByIDResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceGetUserByIDResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + user == o.user + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, user].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_hashed_password.rb b/lib/zitadel/client/models/user_service_hashed_password.rb new file mode 100644 index 00000000..fc033983 --- /dev/null +++ b/lib/zitadel/client/models/user_service_hashed_password.rb @@ -0,0 +1,275 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceHashedPassword + # \"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\" + attr_accessor :hash + + attr_accessor :change_required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'hash' => :'hash', + :'change_required' => :'changeRequired' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'hash' => :'String', + :'change_required' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHashedPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHashedPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'hash') + self.hash = attributes[:'hash'] + else + self.hash = nil + end + + if attributes.key?(:'change_required') + self.change_required = attributes[:'change_required'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @hash.nil? + invalid_properties.push('invalid value for "hash", hash cannot be nil.') + end + + if @hash.to_s.length > 200 + invalid_properties.push('invalid value for "hash", the character length must be smaller than or equal to 200.') + end + + if @hash.to_s.length < 1 + invalid_properties.push('invalid value for "hash", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @hash.nil? + return false if @hash.to_s.length > 200 + return false if @hash.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] hash Value to be assigned + def hash=(hash) + if hash.nil? + fail ArgumentError, 'hash cannot be nil' + end + + if hash.to_s.length > 200 + fail ArgumentError, 'invalid value for "hash", the character length must be smaller than or equal to 200.' + end + + if hash.to_s.length < 1 + fail ArgumentError, 'invalid value for "hash", the character length must be great than or equal to 1.' + end + + @hash = hash + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hash == o.hash && + change_required == o.change_required + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [hash, change_required].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_human_email.rb b/lib/zitadel/client/models/user_service_human_email.rb new file mode 100644 index 00000000..5c088847 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_email.rb @@ -0,0 +1,267 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceHumanEmail + attr_accessor :email + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'String', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanEmail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@email.nil? && @email.to_s.length > 200 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') + end + + if !@email.nil? && @email.to_s.length < 1 + invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@email.nil? && @email.to_s.length > 200 + return false if !@email.nil? && @email.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if email.nil? + fail ArgumentError, 'email cannot be nil' + end + + if email.to_s.length > 200 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' + end + + if email.to_s.length < 1 + fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' + end + + @email = email + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb b/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb new file mode 100644 index 00000000..532c5a95 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceHumanMFAInitSkippedResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanMFAInitSkippedResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanMFAInitSkippedResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_human_phone.rb b/lib/zitadel/client/models/user_service_human_phone.rb new file mode 100644 index 00000000..0c4a4acc --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_phone.rb @@ -0,0 +1,258 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceHumanPhone + attr_accessor :phone + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'phone' => :'phone', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'phone' => :'String', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanPhone` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanPhone`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@phone.nil? && @phone.to_s.length > 200 + invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@phone.nil? && @phone.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] phone Value to be assigned + def phone=(phone) + if phone.nil? + fail ArgumentError, 'phone cannot be nil' + end + + if phone.to_s.length > 200 + fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' + end + + @phone = phone + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + phone == o.phone && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [phone, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_human_profile.rb b/lib/zitadel/client/models/user_service_human_profile.rb new file mode 100644 index 00000000..072c9b81 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_profile.rb @@ -0,0 +1,422 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceHumanProfile + attr_accessor :given_name + + attr_accessor :family_name + + attr_accessor :nick_name + + attr_accessor :display_name + + attr_accessor :preferred_language + + attr_accessor :gender + + # avatar URL of the user + attr_accessor :avatar_url + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'given_name' => :'givenName', + :'family_name' => :'familyName', + :'nick_name' => :'nickName', + :'display_name' => :'displayName', + :'preferred_language' => :'preferredLanguage', + :'gender' => :'gender', + :'avatar_url' => :'avatarUrl' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'given_name' => :'String', + :'family_name' => :'String', + :'nick_name' => :'String', + :'display_name' => :'String', + :'preferred_language' => :'String', + :'gender' => :'UserServiceGender', + :'avatar_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanProfile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'given_name') + self.given_name = attributes[:'given_name'] + end + + if attributes.key?(:'family_name') + self.family_name = attributes[:'family_name'] + end + + if attributes.key?(:'nick_name') + self.nick_name = attributes[:'nick_name'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'preferred_language') + self.preferred_language = attributes[:'preferred_language'] + end + + if attributes.key?(:'gender') + self.gender = attributes[:'gender'] + else + self.gender = 'GENDER_UNSPECIFIED' + end + + if attributes.key?(:'avatar_url') + self.avatar_url = attributes[:'avatar_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@given_name.nil? && @given_name.to_s.length > 200 + invalid_properties.push('invalid value for "given_name", the character length must be smaller than or equal to 200.') + end + + if !@given_name.nil? && @given_name.to_s.length < 1 + invalid_properties.push('invalid value for "given_name", the character length must be great than or equal to 1.') + end + + if !@family_name.nil? && @family_name.to_s.length > 200 + invalid_properties.push('invalid value for "family_name", the character length must be smaller than or equal to 200.') + end + + if !@family_name.nil? && @family_name.to_s.length < 1 + invalid_properties.push('invalid value for "family_name", the character length must be great than or equal to 1.') + end + + if !@nick_name.nil? && @nick_name.to_s.length > 200 + invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') + end + + if !@display_name.nil? && @display_name.to_s.length > 200 + invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') + end + + if !@preferred_language.nil? && @preferred_language.to_s.length > 10 + invalid_properties.push('invalid value for "preferred_language", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@given_name.nil? && @given_name.to_s.length > 200 + return false if !@given_name.nil? && @given_name.to_s.length < 1 + return false if !@family_name.nil? && @family_name.to_s.length > 200 + return false if !@family_name.nil? && @family_name.to_s.length < 1 + return false if !@nick_name.nil? && @nick_name.to_s.length > 200 + return false if !@display_name.nil? && @display_name.to_s.length > 200 + return false if !@preferred_language.nil? && @preferred_language.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] given_name Value to be assigned + def given_name=(given_name) + if given_name.nil? + fail ArgumentError, 'given_name cannot be nil' + end + + if given_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "given_name", the character length must be smaller than or equal to 200.' + end + + if given_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "given_name", the character length must be great than or equal to 1.' + end + + @given_name = given_name + end + + # Custom attribute writer method with validation + # @param [Object] family_name Value to be assigned + def family_name=(family_name) + if family_name.nil? + fail ArgumentError, 'family_name cannot be nil' + end + + if family_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "family_name", the character length must be smaller than or equal to 200.' + end + + if family_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "family_name", the character length must be great than or equal to 1.' + end + + @family_name = family_name + end + + # Custom attribute writer method with validation + # @param [Object] nick_name Value to be assigned + def nick_name=(nick_name) + if nick_name.nil? + fail ArgumentError, 'nick_name cannot be nil' + end + + if nick_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' + end + + @nick_name = nick_name + end + + # Custom attribute writer method with validation + # @param [Object] display_name Value to be assigned + def display_name=(display_name) + if display_name.nil? + fail ArgumentError, 'display_name cannot be nil' + end + + if display_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' + end + + @display_name = display_name + end + + # Custom attribute writer method with validation + # @param [Object] preferred_language Value to be assigned + def preferred_language=(preferred_language) + if preferred_language.nil? + fail ArgumentError, 'preferred_language cannot be nil' + end + + if preferred_language.to_s.length > 10 + fail ArgumentError, 'invalid value for "preferred_language", the character length must be smaller than or equal to 10.' + end + + @preferred_language = preferred_language + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + given_name == o.given_name && + family_name == o.family_name && + nick_name == o.nick_name && + display_name == o.display_name && + preferred_language == o.preferred_language && + gender == o.gender && + avatar_url == o.avatar_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [given_name, family_name, nick_name, display_name, preferred_language, gender, avatar_url].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_human_user.rb b/lib/zitadel/client/models/user_service_human_user.rb new file mode 100644 index 00000000..d9e3a8b0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_user.rb @@ -0,0 +1,353 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceHumanUser + # Unique identifier of the user. + attr_accessor :user_id + + attr_accessor :state + + # Username of the user, which can be globally unique or unique on organization level. + attr_accessor :username + + # Possible usable login names for the user. + attr_accessor :login_names + + # Preferred login name of the user. + attr_accessor :preferred_login_name + + attr_accessor :profile + + attr_accessor :email + + attr_accessor :phone + + # User is required to change the used password on the next login. + attr_accessor :password_change_required + + # The time the user last changed their password. + attr_accessor :password_changed + + # The time the user last skipped MFA initialization. + attr_accessor :mfa_init_skipped + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'state' => :'state', + :'username' => :'username', + :'login_names' => :'loginNames', + :'preferred_login_name' => :'preferredLoginName', + :'profile' => :'profile', + :'email' => :'email', + :'phone' => :'phone', + :'password_change_required' => :'passwordChangeRequired', + :'password_changed' => :'passwordChanged', + :'mfa_init_skipped' => :'mfaInitSkipped' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'state' => :'UserServiceUserState', + :'username' => :'String', + :'login_names' => :'Array', + :'preferred_login_name' => :'String', + :'profile' => :'UserServiceHumanProfile', + :'email' => :'UserServiceHumanEmail', + :'phone' => :'UserServiceHumanPhone', + :'password_change_required' => :'Boolean', + :'password_changed' => :'Time', + :'mfa_init_skipped' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceHumanUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'USER_STATE_UNSPECIFIED' + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'login_names') + if (value = attributes[:'login_names']).is_a?(Array) + self.login_names = value + end + end + + if attributes.key?(:'preferred_login_name') + self.preferred_login_name = attributes[:'preferred_login_name'] + end + + if attributes.key?(:'profile') + self.profile = attributes[:'profile'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'password_change_required') + self.password_change_required = attributes[:'password_change_required'] + end + + if attributes.key?(:'password_changed') + self.password_changed = attributes[:'password_changed'] + end + + if attributes.key?(:'mfa_init_skipped') + self.mfa_init_skipped = attributes[:'mfa_init_skipped'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + state == o.state && + username == o.username && + login_names == o.login_names && + preferred_login_name == o.preferred_login_name && + profile == o.profile && + email == o.email && + phone == o.phone && + password_change_required == o.password_change_required && + password_changed == o.password_changed && + mfa_init_skipped == o.mfa_init_skipped + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, state, username, login_names, preferred_login_name, profile, email, phone, password_change_required, password_changed, mfa_init_skipped].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_i_d_p_information.rb b/lib/zitadel/client/models/user_service_i_d_p_information.rb new file mode 100644 index 00000000..c4b5b7ab --- /dev/null +++ b/lib/zitadel/client/models/user_service_i_d_p_information.rb @@ -0,0 +1,288 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceIDPInformation + attr_accessor :oauth + + attr_accessor :ldap + + attr_accessor :saml + + # ID of the identity provider + attr_accessor :idp_id + + # ID of the user of the identity provider + attr_accessor :user_id + + # username of the user of the identity provider + attr_accessor :user_name + + # complete information returned by the identity provider + attr_accessor :raw_information + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'oauth' => :'oauth', + :'ldap' => :'ldap', + :'saml' => :'saml', + :'idp_id' => :'idpId', + :'user_id' => :'userId', + :'user_name' => :'userName', + :'raw_information' => :'rawInformation' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'oauth' => :'UserServiceIDPOAuthAccessInformation', + :'ldap' => :'UserServiceIDPLDAPAccessInformation', + :'saml' => :'UserServiceIDPSAMLAccessInformation', + :'idp_id' => :'String', + :'user_id' => :'String', + :'user_name' => :'String', + :'raw_information' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPInformation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'oauth') + self.oauth = attributes[:'oauth'] + end + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + end + + if attributes.key?(:'saml') + self.saml = attributes[:'saml'] + end + + if attributes.key?(:'idp_id') + self.idp_id = attributes[:'idp_id'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + + if attributes.key?(:'raw_information') + self.raw_information = attributes[:'raw_information'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + oauth == o.oauth && + ldap == o.ldap && + saml == o.saml && + idp_id == o.idp_id && + user_id == o.user_id && + user_name == o.user_name && + raw_information == o.raw_information + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [oauth, ldap, saml, idp_id, user_id, user_name, raw_information].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_i_d_p_intent.rb b/lib/zitadel/client/models/user_service_i_d_p_intent.rb new file mode 100644 index 00000000..74b4ecf9 --- /dev/null +++ b/lib/zitadel/client/models/user_service_i_d_p_intent.rb @@ -0,0 +1,326 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceIDPIntent + # ID of the IDP intent + attr_accessor :idp_intent_id + + # token of the IDP intent + attr_accessor :idp_intent_token + + # ID of the ZITADEL user if external user already linked + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_intent_id' => :'idpIntentId', + :'idp_intent_token' => :'idpIntentToken', + :'user_id' => :'userId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp_intent_id' => :'String', + :'idp_intent_token' => :'String', + :'user_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPIntent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp_intent_id') + self.idp_intent_id = attributes[:'idp_intent_id'] + end + + if attributes.key?(:'idp_intent_token') + self.idp_intent_token = attributes[:'idp_intent_token'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 + invalid_properties.push('invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.') + end + + if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 + invalid_properties.push('invalid value for "idp_intent_id", the character length must be great than or equal to 1.') + end + + if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 + invalid_properties.push('invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.') + end + + if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 + invalid_properties.push('invalid value for "idp_intent_token", the character length must be great than or equal to 1.') + end + + if !@user_id.nil? && @user_id.to_s.length > 200 + invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length > 200 + return false if !@idp_intent_id.nil? && @idp_intent_id.to_s.length < 1 + return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 + return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 + return false if !@user_id.nil? && @user_id.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] idp_intent_id Value to be assigned + def idp_intent_id=(idp_intent_id) + if idp_intent_id.nil? + fail ArgumentError, 'idp_intent_id cannot be nil' + end + + if idp_intent_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be smaller than or equal to 200.' + end + + if idp_intent_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_intent_id", the character length must be great than or equal to 1.' + end + + @idp_intent_id = idp_intent_id + end + + # Custom attribute writer method with validation + # @param [Object] idp_intent_token Value to be assigned + def idp_intent_token=(idp_intent_token) + if idp_intent_token.nil? + fail ArgumentError, 'idp_intent_token cannot be nil' + end + + if idp_intent_token.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.' + end + + if idp_intent_token.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be great than or equal to 1.' + end + + @idp_intent_token = idp_intent_token + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + if user_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' + end + + @user_id = user_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp_intent_id == o.idp_intent_id && + idp_intent_token == o.idp_intent_token && + user_id == o.user_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp_intent_id, idp_intent_token, user_id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb b/lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb new file mode 100644 index 00000000..d35ecb6d --- /dev/null +++ b/lib/zitadel/client/models/user_service_i_d_p_l_d_a_p_access_information.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceIDPLDAPAccessInformation + attr_accessor :attributes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'attributes' => :'attributes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'attributes' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPLDAPAccessInformation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPLDAPAccessInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [attributes].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_i_d_p_link.rb b/lib/zitadel/client/models/user_service_i_d_p_link.rb new file mode 100644 index 00000000..5bc754ed --- /dev/null +++ b/lib/zitadel/client/models/user_service_i_d_p_link.rb @@ -0,0 +1,335 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceIDPLink + # ID of the identity provider + attr_accessor :idp_id + + # ID of the user of the identity provider + attr_accessor :user_id + + # username of the user of the identity provider + attr_accessor :user_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_id' => :'idpId', + :'user_id' => :'userId', + :'user_name' => :'userName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp_id' => :'String', + :'user_id' => :'String', + :'user_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPLink` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp_id') + self.idp_id = attributes[:'idp_id'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@idp_id.nil? && @idp_id.to_s.length > 200 + invalid_properties.push('invalid value for "idp_id", the character length must be smaller than or equal to 200.') + end + + if !@idp_id.nil? && @idp_id.to_s.length < 1 + invalid_properties.push('invalid value for "idp_id", the character length must be great than or equal to 1.') + end + + if !@user_id.nil? && @user_id.to_s.length > 200 + invalid_properties.push('invalid value for "user_id", the character length must be smaller than or equal to 200.') + end + + if !@user_id.nil? && @user_id.to_s.length < 1 + invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.') + end + + if !@user_name.nil? && @user_name.to_s.length > 200 + invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 200.') + end + + if !@user_name.nil? && @user_name.to_s.length < 1 + invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@idp_id.nil? && @idp_id.to_s.length > 200 + return false if !@idp_id.nil? && @idp_id.to_s.length < 1 + return false if !@user_id.nil? && @user_id.to_s.length > 200 + return false if !@user_id.nil? && @user_id.to_s.length < 1 + return false if !@user_name.nil? && @user_name.to_s.length > 200 + return false if !@user_name.nil? && @user_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] idp_id Value to be assigned + def idp_id=(idp_id) + if idp_id.nil? + fail ArgumentError, 'idp_id cannot be nil' + end + + if idp_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_id", the character length must be smaller than or equal to 200.' + end + + if idp_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_id", the character length must be great than or equal to 1.' + end + + @idp_id = idp_id + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + if user_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_id", the character length must be smaller than or equal to 200.' + end + + if user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [Object] user_name Value to be assigned + def user_name=(user_name) + if user_name.nil? + fail ArgumentError, 'user_name cannot be nil' + end + + if user_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 200.' + end + + if user_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.' + end + + @user_name = user_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp_id == o.idp_id && + user_id == o.user_id && + user_name == o.user_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp_id, user_id, user_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb b/lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb new file mode 100644 index 00000000..5be6b497 --- /dev/null +++ b/lib/zitadel/client/models/user_service_i_d_p_o_auth_access_information.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceIDPOAuthAccessInformation + attr_accessor :access_token + + attr_accessor :id_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'access_token' => :'accessToken', + :'id_token' => :'idToken' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'access_token' => :'String', + :'id_token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPOAuthAccessInformation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPOAuthAccessInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'access_token') + self.access_token = attributes[:'access_token'] + end + + if attributes.key?(:'id_token') + self.id_token = attributes[:'id_token'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + access_token == o.access_token && + id_token == o.id_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [access_token, id_token].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb b/lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb new file mode 100644 index 00000000..6b6f1f67 --- /dev/null +++ b/lib/zitadel/client/models/user_service_i_d_p_s_a_m_l_access_information.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceIDPSAMLAccessInformation + attr_accessor :assertion + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assertion' => :'assertion' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'assertion' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceIDPSAMLAccessInformation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceIDPSAMLAccessInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'assertion') + self.assertion = attributes[:'assertion'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assertion == o.assertion + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [assertion].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_in_user_emails_query.rb b/lib/zitadel/client/models/user_service_in_user_emails_query.rb new file mode 100644 index 00000000..a92f79de --- /dev/null +++ b/lib/zitadel/client/models/user_service_in_user_emails_query.rb @@ -0,0 +1,234 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with email in list of emails. + class UserServiceInUserEmailsQuery + # the emails of the users to include + attr_accessor :user_emails + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_emails' => :'userEmails' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_emails' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceInUserEmailsQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceInUserEmailsQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_emails') + if (value = attributes[:'user_emails']).is_a?(Array) + self.user_emails = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_emails == o.user_emails + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_emails].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_in_user_i_d_query.rb b/lib/zitadel/client/models/user_service_in_user_i_d_query.rb new file mode 100644 index 00000000..f84c0588 --- /dev/null +++ b/lib/zitadel/client/models/user_service_in_user_i_d_query.rb @@ -0,0 +1,234 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with ID in list of IDs. + class UserServiceInUserIDQuery + # the ids of the users to include + attr_accessor :user_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_ids' => :'userIds' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceInUserIDQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceInUserIDQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_ids') + if (value = attributes[:'user_ids']).is_a?(Array) + self.user_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_ids == o.user_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_ids].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb b/lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb new file mode 100644 index 00000000..f8cb8b68 --- /dev/null +++ b/lib/zitadel/client/models/user_service_l_d_a_p_credentials.rb @@ -0,0 +1,297 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceLDAPCredentials + # Username used to login through LDAP + attr_accessor :username + + # Password used to login through LDAP + attr_accessor :password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'username' => :'username', + :'password' => :'password' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'username' => :'String', + :'password' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLDAPCredentials` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLDAPCredentials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@username.nil? && @username.to_s.length > 200 + invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') + end + + if !@username.nil? && @username.to_s.length < 1 + invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') + end + + if !@password.nil? && @password.to_s.length > 200 + invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') + end + + if !@password.nil? && @password.to_s.length < 1 + invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@username.nil? && @username.to_s.length > 200 + return false if !@username.nil? && @username.to_s.length < 1 + return false if !@password.nil? && @password.to_s.length > 200 + return false if !@password.nil? && @password.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] username Value to be assigned + def username=(username) + if username.nil? + fail ArgumentError, 'username cannot be nil' + end + + if username.to_s.length > 200 + fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' + end + + if username.to_s.length < 1 + fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' + end + + @username = username + end + + # Custom attribute writer method with validation + # @param [Object] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + end + + if password.to_s.length > 200 + fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' + end + + if password.to_s.length < 1 + fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' + end + + @password = password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + username == o.username && + password == o.password + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [username, password].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_last_name_query.rb b/lib/zitadel/client/models/user_service_last_name_query.rb new file mode 100644 index 00000000..cc86a387 --- /dev/null +++ b/lib/zitadel/client/models/user_service_last_name_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific last name. + class UserServiceLastNameQuery + attr_accessor :last_name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'last_name' => :'lastName', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'last_name' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLastNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLastNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'last_name') + self.last_name = attributes[:'last_name'] + else + self.last_name = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @last_name.nil? + invalid_properties.push('invalid value for "last_name", last_name cannot be nil.') + end + + if @last_name.to_s.length > 200 + invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 200.') + end + + if @last_name.to_s.length < 1 + invalid_properties.push('invalid value for "last_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @last_name.nil? + return false if @last_name.to_s.length > 200 + return false if @last_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] last_name Value to be assigned + def last_name=(last_name) + if last_name.nil? + fail ArgumentError, 'last_name cannot be nil' + end + + if last_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 200.' + end + + if last_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "last_name", the character length must be great than or equal to 1.' + end + + @last_name = last_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + last_name == o.last_name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [last_name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_authentication_factors_response.rb b/lib/zitadel/client/models/user_service_list_authentication_factors_response.rb new file mode 100644 index 00000000..d4f994bd --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_authentication_factors_response.rb @@ -0,0 +1,232 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListAuthenticationFactorsResponse + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListAuthenticationFactorsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListAuthenticationFactorsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [result].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb b/lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb new file mode 100644 index 00000000..5f741241 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_authentication_method_types_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListAuthenticationMethodTypesResponse + attr_accessor :details + + attr_accessor :auth_method_types + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'auth_method_types' => :'authMethodTypes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceListDetails', + :'auth_method_types' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListAuthenticationMethodTypesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListAuthenticationMethodTypesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'auth_method_types') + if (value = attributes[:'auth_method_types']).is_a?(Array) + self.auth_method_types = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + auth_method_types == o.auth_method_types + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, auth_method_types].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_details.rb b/lib/zitadel/client/models/user_service_list_details.rb new file mode 100644 index 00000000..c2424933 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_details.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # the last time the projection got updated + attr_accessor :timestamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_result' => :'totalResult', + :'processed_sequence' => :'processedSequence', + :'timestamp' => :'timestamp' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total_result' => :'String', + :'processed_sequence' => :'String', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total_result') + self.total_result = attributes[:'total_result'] + end + + if attributes.key?(:'processed_sequence') + self.processed_sequence = attributes[:'processed_sequence'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_result == o.total_result && + processed_sequence == o.processed_sequence && + timestamp == o.timestamp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total_result, processed_sequence, timestamp].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb b/lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb new file mode 100644 index 00000000..44cb5210 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_i_d_p_links_request.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListIDPLinksRequest + attr_accessor :query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'query' => :'query' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'query' => :'UserServiceListQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListIDPLinksRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListIDPLinksRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [query].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb b/lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb new file mode 100644 index 00000000..c5033431 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_i_d_p_links_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListIDPLinksResponse + attr_accessor :details + + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceListDetails', + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListIDPLinksResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListIDPLinksResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, result].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_passkeys_response.rb b/lib/zitadel/client/models/user_service_list_passkeys_response.rb new file mode 100644 index 00000000..d5ffb0de --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_passkeys_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListPasskeysResponse + attr_accessor :details + + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceListDetails', + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListPasskeysResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListPasskeysResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, result].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_query.rb b/lib/zitadel/client/models/user_service_list_query.rb new file mode 100644 index 00000000..3484fe15 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_query.rb @@ -0,0 +1,251 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Object unspecific list filters like offset, limit and asc/desc. + class UserServiceListQuery + attr_accessor :offset + + # 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. + attr_accessor :limit + + # default is descending + attr_accessor :asc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'offset' => :'offset', + :'limit' => :'limit', + :'asc' => :'asc' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'offset' => :'String', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'asc') + self.asc = attributes[:'asc'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + offset == o.offset && + limit == o.limit && + asc == o.asc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [offset, limit, asc].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_users_request.rb b/lib/zitadel/client/models/user_service_list_users_request.rb new file mode 100644 index 00000000..ab8aa922 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_users_request.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListUsersRequest + attr_accessor :query + + attr_accessor :sorting_column + + attr_accessor :queries + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'query' => :'query', + :'sorting_column' => :'sortingColumn', + :'queries' => :'queries' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'query' => :'UserServiceListQuery', + :'sorting_column' => :'UserServiceUserFieldName', + :'queries' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListUsersRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListUsersRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'sorting_column') + self.sorting_column = attributes[:'sorting_column'] + else + self.sorting_column = 'USER_FIELD_NAME_UNSPECIFIED' + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query && + sorting_column == o.sorting_column && + queries == o.queries + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [query, sorting_column, queries].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_list_users_response.rb b/lib/zitadel/client/models/user_service_list_users_response.rb new file mode 100644 index 00000000..04bf87fb --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_users_response.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListUsersResponse + attr_accessor :details + + attr_accessor :sorting_column + + attr_accessor :result + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'sorting_column' => :'sortingColumn', + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceListDetails', + :'sorting_column' => :'UserServiceUserFieldName', + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListUsersResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListUsersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'sorting_column') + self.sorting_column = attributes[:'sorting_column'] + else + self.sorting_column = 'USER_FIELD_NAME_UNSPECIFIED' + end + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + sorting_column == o.sorting_column && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, sorting_column, result].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_lock_user_response.rb b/lib/zitadel/client/models/user_service_lock_user_response.rb new file mode 100644 index 00000000..a75059ad --- /dev/null +++ b/lib/zitadel/client/models/user_service_lock_user_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceLockUserResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLockUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLockUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_login_name_query.rb b/lib/zitadel/client/models/user_service_login_name_query.rb new file mode 100644 index 00000000..e6842159 --- /dev/null +++ b/lib/zitadel/client/models/user_service_login_name_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific state. + class UserServiceLoginNameQuery + attr_accessor :login_name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'login_name' => :'loginName', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'login_name' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceLoginNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLoginNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'login_name') + self.login_name = attributes[:'login_name'] + else + self.login_name = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @login_name.nil? + invalid_properties.push('invalid value for "login_name", login_name cannot be nil.') + end + + if @login_name.to_s.length > 200 + invalid_properties.push('invalid value for "login_name", the character length must be smaller than or equal to 200.') + end + + if @login_name.to_s.length < 1 + invalid_properties.push('invalid value for "login_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @login_name.nil? + return false if @login_name.to_s.length > 200 + return false if @login_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] login_name Value to be assigned + def login_name=(login_name) + if login_name.nil? + fail ArgumentError, 'login_name cannot be nil' + end + + if login_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "login_name", the character length must be smaller than or equal to 200.' + end + + if login_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "login_name", the character length must be great than or equal to 1.' + end + + @login_name = login_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + login_name == o.login_name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [login_name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_machine_user.rb b/lib/zitadel/client/models/user_service_machine_user.rb new file mode 100644 index 00000000..84a9c87c --- /dev/null +++ b/lib/zitadel/client/models/user_service_machine_user.rb @@ -0,0 +1,281 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceMachineUser + attr_accessor :name + + attr_accessor :description + + attr_accessor :has_secret + + attr_accessor :access_token_type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'description' => :'description', + :'has_secret' => :'hasSecret', + :'access_token_type' => :'accessTokenType' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'description' => :'String', + :'has_secret' => :'Boolean', + :'access_token_type' => :'UserServiceAccessTokenType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceMachineUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceMachineUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'has_secret') + self.has_secret = attributes[:'has_secret'] + end + + if attributes.key?(:'access_token_type') + self.access_token_type = attributes[:'access_token_type'] + else + self.access_token_type = 'ACCESS_TOKEN_TYPE_BEARER' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + description == o.description && + has_secret == o.has_secret && + access_token_type == o.access_token_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, description, has_secret, access_token_type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_nick_name_query.rb b/lib/zitadel/client/models/user_service_nick_name_query.rb new file mode 100644 index 00000000..632b2194 --- /dev/null +++ b/lib/zitadel/client/models/user_service_nick_name_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific nickname. + class UserServiceNickNameQuery + attr_accessor :nick_name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'nick_name' => :'nickName', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'nick_name' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceNickNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceNickNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'nick_name') + self.nick_name = attributes[:'nick_name'] + else + self.nick_name = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @nick_name.nil? + invalid_properties.push('invalid value for "nick_name", nick_name cannot be nil.') + end + + if @nick_name.to_s.length > 200 + invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') + end + + if @nick_name.to_s.length < 1 + invalid_properties.push('invalid value for "nick_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @nick_name.nil? + return false if @nick_name.to_s.length > 200 + return false if @nick_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] nick_name Value to be assigned + def nick_name=(nick_name) + if nick_name.nil? + fail ArgumentError, 'nick_name cannot be nil' + end + + if nick_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' + end + + if nick_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "nick_name", the character length must be great than or equal to 1.' + end + + @nick_name = nick_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + nick_name == o.nick_name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [nick_name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_not_query.rb b/lib/zitadel/client/models/user_service_not_query.rb new file mode 100644 index 00000000..1ab607a5 --- /dev/null +++ b/lib/zitadel/client/models/user_service_not_query.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Negate the sub-condition. + class UserServiceNotQuery + attr_accessor :query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'query' => :'query' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'query' => :'UserServiceSearchQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceNotQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceNotQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [query].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_notification_type.rb b/lib/zitadel/client/models/user_service_notification_type.rb new file mode 100644 index 00000000..f09b9130 --- /dev/null +++ b/lib/zitadel/client/models/user_service_notification_type.rb @@ -0,0 +1,42 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceNotificationType + NOTIFICATION_TYPE_UNSPECIFIED = "NOTIFICATION_TYPE_Unspecified".freeze + NOTIFICATION_TYPE_EMAIL = "NOTIFICATION_TYPE_Email".freeze + NOTIFICATION_TYPE_SMS = "NOTIFICATION_TYPE_SMS".freeze + + def self.all_vars + @all_vars ||= [NOTIFICATION_TYPE_UNSPECIFIED, NOTIFICATION_TYPE_EMAIL, NOTIFICATION_TYPE_SMS].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceNotificationType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceNotificationType" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_or_query.rb b/lib/zitadel/client/models/user_service_or_query.rb new file mode 100644 index 00000000..2a00e6d0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_or_query.rb @@ -0,0 +1,234 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Connect multiple sub-condition with and OR operator. + class UserServiceOrQuery + # the sub queries to 'OR' + attr_accessor :queries + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'queries' => :'queries' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'queries' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceOrQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceOrQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + queries == o.queries + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [queries].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_organization.rb b/lib/zitadel/client/models/user_service_organization.rb new file mode 100644 index 00000000..bc6dc577 --- /dev/null +++ b/lib/zitadel/client/models/user_service_organization.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceOrganization + attr_accessor :org_id + + attr_accessor :org_domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'org_id' => :'orgId', + :'org_domain' => :'orgDomain' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'org_id' => :'String', + :'org_domain' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceOrganization` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceOrganization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'org_id') + self.org_id = attributes[:'org_id'] + end + + if attributes.key?(:'org_domain') + self.org_domain = attributes[:'org_domain'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + org_id == o.org_id && + org_domain == o.org_domain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [org_id, org_domain].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_organization_id_query.rb b/lib/zitadel/client/models/user_service_organization_id_query.rb new file mode 100644 index 00000000..f6d330f6 --- /dev/null +++ b/lib/zitadel/client/models/user_service_organization_id_query.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users under a specific organization as resource owner. + class UserServiceOrganizationIdQuery + attr_accessor :organization_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceOrganizationIdQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceOrganizationIdQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + else + self.organization_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @organization_id.to_s.length > 200 + invalid_properties.push('invalid value for "organization_id", the character length must be smaller than or equal to 200.') + end + + if @organization_id.to_s.length < 1 + invalid_properties.push('invalid value for "organization_id", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @organization_id.nil? + return false if @organization_id.to_s.length > 200 + return false if @organization_id.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] organization_id Value to be assigned + def organization_id=(organization_id) + if organization_id.nil? + fail ArgumentError, 'organization_id cannot be nil' + end + + if organization_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "organization_id", the character length must be smaller than or equal to 200.' + end + + if organization_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "organization_id", the character length must be great than or equal to 1.' + end + + @organization_id = organization_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_passkey.rb b/lib/zitadel/client/models/user_service_passkey.rb new file mode 100644 index 00000000..9e720f1b --- /dev/null +++ b/lib/zitadel/client/models/user_service_passkey.rb @@ -0,0 +1,300 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServicePasskey + attr_accessor :id + + attr_accessor :state + + attr_accessor :name + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'state' => :'state', + :'name' => :'name' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'state' => :'UserServiceAuthFactorState', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasskey` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasskey`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'AUTH_FACTOR_STATE_UNSPECIFIED' + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@name.nil? && @name.to_s.length > 200 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.') + end + + if !@name.nil? && @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@name.nil? && @name.to_s.length > 200 + return false if !@name.nil? && @name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 200 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + state == o.state && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, state, name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_passkey_authenticator.rb b/lib/zitadel/client/models/user_service_passkey_authenticator.rb new file mode 100644 index 00000000..3af3e336 --- /dev/null +++ b/lib/zitadel/client/models/user_service_passkey_authenticator.rb @@ -0,0 +1,42 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServicePasskeyAuthenticator + PASSKEY_AUTHENTICATOR_UNSPECIFIED = "PASSKEY_AUTHENTICATOR_UNSPECIFIED".freeze + PASSKEY_AUTHENTICATOR_PLATFORM = "PASSKEY_AUTHENTICATOR_PLATFORM".freeze + PASSKEY_AUTHENTICATOR_CROSS_PLATFORM = "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM".freeze + + def self.all_vars + @all_vars ||= [PASSKEY_AUTHENTICATOR_UNSPECIFIED, PASSKEY_AUTHENTICATOR_PLATFORM, PASSKEY_AUTHENTICATOR_CROSS_PLATFORM].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServicePasskeyAuthenticator.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServicePasskeyAuthenticator" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_passkey_registration_code.rb b/lib/zitadel/client/models/user_service_passkey_registration_code.rb new file mode 100644 index 00000000..8947e2f7 --- /dev/null +++ b/lib/zitadel/client/models/user_service_passkey_registration_code.rb @@ -0,0 +1,293 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServicePasskeyRegistrationCode + # \"id to the one time code generated by ZITADEL\" + attr_accessor :id + + # \"one time code generated by ZITADEL\" + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'code' => :'code' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasskeyRegistrationCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasskeyRegistrationCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @id.to_s.length > 200 + invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 200.') + end + + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @code.to_s.length > 200 + invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @id.to_s.length > 200 + return false if @code.nil? + return false if @code.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + if id.to_s.length > 200 + fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 200.' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + if code.to_s.length > 200 + fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 200.' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_password.rb b/lib/zitadel/client/models/user_service_password.rb new file mode 100644 index 00000000..cea82b92 --- /dev/null +++ b/lib/zitadel/client/models/user_service_password.rb @@ -0,0 +1,274 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServicePassword + attr_accessor :password + + attr_accessor :change_required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'password' => :'password', + :'change_required' => :'changeRequired' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'password' => :'String', + :'change_required' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'password') + self.password = attributes[:'password'] + else + self.password = nil + end + + if attributes.key?(:'change_required') + self.change_required = attributes[:'change_required'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @password.nil? + invalid_properties.push('invalid value for "password", password cannot be nil.') + end + + if @password.to_s.length > 200 + invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 200.') + end + + if @password.to_s.length < 1 + invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @password.nil? + return false if @password.to_s.length > 200 + return false if @password.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + end + + if password.to_s.length > 200 + fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 200.' + end + + if password.to_s.length < 1 + fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.' + end + + @password = password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + password == o.password && + change_required == o.change_required + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [password, change_required].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_password_reset_request.rb b/lib/zitadel/client/models/user_service_password_reset_request.rb new file mode 100644 index 00000000..cc87ec38 --- /dev/null +++ b/lib/zitadel/client/models/user_service_password_reset_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServicePasswordResetRequest + attr_accessor :send_link + + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_link' => :'sendLink', + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_link' => :'UserServiceSendPasswordResetLink', + :'return_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasswordResetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasswordResetRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_link') + self.send_link = attributes[:'send_link'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_link == o.send_link && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_link, return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_password_reset_response.rb b/lib/zitadel/client/models/user_service_password_reset_response.rb new file mode 100644 index 00000000..c314793e --- /dev/null +++ b/lib/zitadel/client/models/user_service_password_reset_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServicePasswordResetResponse + attr_accessor :details + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePasswordResetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePasswordResetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_phone_query.rb b/lib/zitadel/client/models/user_service_phone_query.rb new file mode 100644 index 00000000..01c9f1b4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_phone_query.rb @@ -0,0 +1,300 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific phone. + class UserServicePhoneQuery + # Phone number of the user + attr_accessor :number + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServicePhoneQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServicePhoneQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number') + self.number = attributes[:'number'] + else + self.number = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @number.nil? + invalid_properties.push('invalid value for "number", number cannot be nil.') + end + + if @number.to_s.length > 20 + invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.') + end + + if @number.to_s.length < 1 + invalid_properties.push('invalid value for "number", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @number.nil? + return false if @number.to_s.length > 20 + return false if @number.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + if number.to_s.length > 20 + fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.' + end + + if number.to_s.length < 1 + fail ArgumentError, 'invalid value for "number", the character length must be great than or equal to 1.' + end + + @number = number + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number == o.number && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [number, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_protobuf_any.rb b/lib/zitadel/client/models/user_service_protobuf_any.rb new file mode 100644 index 00000000..f4f105db --- /dev/null +++ b/lib/zitadel/client/models/user_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_reactivate_user_response.rb b/lib/zitadel/client/models/user_service_reactivate_user_response.rb new file mode 100644 index 00000000..ee446655 --- /dev/null +++ b/lib/zitadel/client/models/user_service_reactivate_user_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceReactivateUserResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceReactivateUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceReactivateUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_redirect_u_r_ls.rb b/lib/zitadel/client/models/user_service_redirect_u_r_ls.rb new file mode 100644 index 00000000..b735baac --- /dev/null +++ b/lib/zitadel/client/models/user_service_redirect_u_r_ls.rb @@ -0,0 +1,297 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRedirectURLs + # URL on which the user will be redirected after a successful login + attr_accessor :success_url + + # URL on which the user will be redirected after a failed login + attr_accessor :failure_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'success_url' => :'successUrl', + :'failure_url' => :'failureUrl' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'success_url' => :'String', + :'failure_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRedirectURLs` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRedirectURLs`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'success_url') + self.success_url = attributes[:'success_url'] + end + + if attributes.key?(:'failure_url') + self.failure_url = attributes[:'failure_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@success_url.nil? && @success_url.to_s.length > 2048 + invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 2048.') + end + + if !@success_url.nil? && @success_url.to_s.length < 1 + invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 1.') + end + + if !@failure_url.nil? && @failure_url.to_s.length > 2048 + invalid_properties.push('invalid value for "failure_url", the character length must be smaller than or equal to 2048.') + end + + if !@failure_url.nil? && @failure_url.to_s.length < 1 + invalid_properties.push('invalid value for "failure_url", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@success_url.nil? && @success_url.to_s.length > 2048 + return false if !@success_url.nil? && @success_url.to_s.length < 1 + return false if !@failure_url.nil? && @failure_url.to_s.length > 2048 + return false if !@failure_url.nil? && @failure_url.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] success_url Value to be assigned + def success_url=(success_url) + if success_url.nil? + fail ArgumentError, 'success_url cannot be nil' + end + + if success_url.to_s.length > 2048 + fail ArgumentError, 'invalid value for "success_url", the character length must be smaller than or equal to 2048.' + end + + if success_url.to_s.length < 1 + fail ArgumentError, 'invalid value for "success_url", the character length must be great than or equal to 1.' + end + + @success_url = success_url + end + + # Custom attribute writer method with validation + # @param [Object] failure_url Value to be assigned + def failure_url=(failure_url) + if failure_url.nil? + fail ArgumentError, 'failure_url cannot be nil' + end + + if failure_url.to_s.length > 2048 + fail ArgumentError, 'invalid value for "failure_url", the character length must be smaller than or equal to 2048.' + end + + if failure_url.to_s.length < 1 + fail ArgumentError, 'invalid value for "failure_url", the character length must be great than or equal to 1.' + end + + @failure_url = failure_url + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + success_url == o.success_url && + failure_url == o.failure_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [success_url, failure_url].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_register_passkey_request.rb b/lib/zitadel/client/models/user_service_register_passkey_request.rb new file mode 100644 index 00000000..9989822d --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_passkey_request.rb @@ -0,0 +1,273 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRegisterPasskeyRequest + attr_accessor :code + + attr_accessor :authenticator + + # \"Domain on which the user is authenticated.\" + attr_accessor :domain + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'authenticator' => :'authenticator', + :'domain' => :'domain' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'UserServicePasskeyRegistrationCode', + :'authenticator' => :'UserServicePasskeyAuthenticator', + :'domain' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterPasskeyRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterPasskeyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'authenticator') + self.authenticator = attributes[:'authenticator'] + else + self.authenticator = 'PASSKEY_AUTHENTICATOR_UNSPECIFIED' + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + authenticator == o.authenticator && + domain == o.domain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, authenticator, domain].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_register_passkey_response.rb b/lib/zitadel/client/models/user_service_register_passkey_response.rb new file mode 100644 index 00000000..cf29deb4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_passkey_response.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRegisterPasskeyResponse + attr_accessor :details + + attr_accessor :passkey_id + + # 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 + attr_accessor :public_key_credential_creation_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'passkey_id' => :'passkeyId', + :'public_key_credential_creation_options' => :'publicKeyCredentialCreationOptions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'passkey_id' => :'String', + :'public_key_credential_creation_options' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterPasskeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterPasskeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'passkey_id') + self.passkey_id = attributes[:'passkey_id'] + end + + if attributes.key?(:'public_key_credential_creation_options') + self.public_key_credential_creation_options = attributes[:'public_key_credential_creation_options'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + passkey_id == o.passkey_id && + public_key_credential_creation_options == o.public_key_credential_creation_options + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, passkey_id, public_key_credential_creation_options].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb b/lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb new file mode 100644 index 00000000..828ad8bf --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_t_o_t_p_response.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRegisterTOTPResponse + attr_accessor :details + + attr_accessor :uri + + attr_accessor :secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'uri' => :'uri', + :'secret' => :'secret' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'uri' => :'String', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterTOTPResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterTOTPResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'uri') + self.uri = attributes[:'uri'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + uri == o.uri && + secret == o.secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, uri, secret].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_register_u2_f_request.rb b/lib/zitadel/client/models/user_service_register_u2_f_request.rb new file mode 100644 index 00000000..6f4da41f --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_u2_f_request.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRegisterU2FRequest + # \"Domain on which the user is authenticated.\" + attr_accessor :domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'domain' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterU2FRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterU2FRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_register_u2_f_response.rb b/lib/zitadel/client/models/user_service_register_u2_f_response.rb new file mode 100644 index 00000000..57637f21 --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_u2_f_response.rb @@ -0,0 +1,249 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRegisterU2FResponse + attr_accessor :details + + attr_accessor :u2f_id + + # 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 + attr_accessor :public_key_credential_creation_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'u2f_id' => :'u2fId', + :'public_key_credential_creation_options' => :'publicKeyCredentialCreationOptions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'u2f_id' => :'String', + :'public_key_credential_creation_options' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRegisterU2FResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterU2FResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'u2f_id') + self.u2f_id = attributes[:'u2f_id'] + end + + if attributes.key?(:'public_key_credential_creation_options') + self.public_key_credential_creation_options = attributes[:'public_key_credential_creation_options'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + u2f_id == o.u2f_id && + public_key_credential_creation_options == o.public_key_credential_creation_options + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, u2f_id, public_key_credential_creation_options].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb b/lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb new file mode 100644 index 00000000..ec2a938a --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_i_d_p_link_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveIDPLinkResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveIDPLinkResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveIDPLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb b/lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb new file mode 100644 index 00000000..40a78f7f --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_o_t_p_email_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveOTPEmailResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveOTPEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveOTPEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb b/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb new file mode 100644 index 00000000..06fd6379 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveOTPSMSResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveOTPSMSResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveOTPSMSResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_remove_passkey_response.rb b/lib/zitadel/client/models/user_service_remove_passkey_response.rb new file mode 100644 index 00000000..c42a24a7 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_passkey_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemovePasskeyResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemovePasskeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemovePasskeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_remove_phone_response.rb b/lib/zitadel/client/models/user_service_remove_phone_response.rb new file mode 100644 index 00000000..d8148a7f --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_phone_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemovePhoneResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemovePhoneResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemovePhoneResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb b/lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb new file mode 100644 index 00000000..f43f2869 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_t_o_t_p_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveTOTPResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveTOTPResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveTOTPResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_remove_u2_f_response.rb b/lib/zitadel/client/models/user_service_remove_u2_f_response.rb new file mode 100644 index 00000000..c3323f40 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_u2_f_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveU2FResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRemoveU2FResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveU2FResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_resend_email_code_request.rb b/lib/zitadel/client/models/user_service_resend_email_code_request.rb new file mode 100644 index 00000000..0a93585b --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_email_code_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceResendEmailCodeRequest + attr_accessor :send_code + + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode', + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_code' => :'UserServiceSendEmailVerificationCode', + :'return_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendEmailCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendEmailCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_code == o.send_code && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_code, return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_resend_email_code_response.rb b/lib/zitadel/client/models/user_service_resend_email_code_response.rb new file mode 100644 index 00000000..3f66585e --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_email_code_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceResendEmailCodeResponse + attr_accessor :details + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendEmailCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendEmailCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_resend_invite_code_response.rb b/lib/zitadel/client/models/user_service_resend_invite_code_response.rb new file mode 100644 index 00000000..c2106d48 --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_invite_code_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceResendInviteCodeResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendInviteCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendInviteCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_resend_phone_code_request.rb b/lib/zitadel/client/models/user_service_resend_phone_code_request.rb new file mode 100644 index 00000000..4f529081 --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_phone_code_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceResendPhoneCodeRequest + attr_accessor :send_code + + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode', + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_code' => :'Object', + :'return_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendPhoneCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendPhoneCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_code == o.send_code && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_code, return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_resend_phone_code_response.rb b/lib/zitadel/client/models/user_service_resend_phone_code_response.rb new file mode 100644 index 00000000..56d7eb45 --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_phone_code_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceResendPhoneCodeResponse + attr_accessor :details + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceResendPhoneCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendPhoneCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb new file mode 100644 index 00000000..7a8d45c8 --- /dev/null +++ b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_request.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRetrieveIdentityProviderIntentRequest + # token of the idp intent, previously returned on the success response of the IDP callback + attr_accessor :idp_intent_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_intent_token' => :'idpIntentToken' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp_intent_token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp_intent_token') + self.idp_intent_token = attributes[:'idp_intent_token'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 + invalid_properties.push('invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.') + end + + if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 + invalid_properties.push('invalid value for "idp_intent_token", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length > 200 + return false if !@idp_intent_token.nil? && @idp_intent_token.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] idp_intent_token Value to be assigned + def idp_intent_token=(idp_intent_token) + if idp_intent_token.nil? + fail ArgumentError, 'idp_intent_token cannot be nil' + end + + if idp_intent_token.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be smaller than or equal to 200.' + end + + if idp_intent_token.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_intent_token", the character length must be great than or equal to 1.' + end + + @idp_intent_token = idp_intent_token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp_intent_token == o.idp_intent_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp_intent_token].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb new file mode 100644 index 00000000..8827b956 --- /dev/null +++ b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_response.rb @@ -0,0 +1,258 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRetrieveIdentityProviderIntentResponse + attr_accessor :details + + attr_accessor :idp_information + + # ID of the user in ZITADEL if external user is linked + attr_accessor :user_id + + attr_accessor :add_human_user + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'idp_information' => :'idpInformation', + :'user_id' => :'userId', + :'add_human_user' => :'addHumanUser' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'idp_information' => :'UserServiceIDPInformation', + :'user_id' => :'String', + :'add_human_user' => :'UserServiceAddHumanUserRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRetrieveIdentityProviderIntentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'idp_information') + self.idp_information = attributes[:'idp_information'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'add_human_user') + self.add_human_user = attributes[:'add_human_user'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + idp_information == o.idp_information && + user_id == o.user_id && + add_human_user == o.add_human_user + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, idp_information, user_id, add_human_user].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_rpc_status.rb b/lib/zitadel/client/models/user_service_rpc_status.rb new file mode 100644 index 00000000..c518c004 --- /dev/null +++ b/lib/zitadel/client/models/user_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_search_query.rb b/lib/zitadel/client/models/user_service_search_query.rb new file mode 100644 index 00000000..84ec646d --- /dev/null +++ b/lib/zitadel/client/models/user_service_search_query.rb @@ -0,0 +1,365 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSearchQuery + attr_accessor :user_name_query + + attr_accessor :first_name_query + + attr_accessor :last_name_query + + attr_accessor :nick_name_query + + attr_accessor :display_name_query + + attr_accessor :email_query + + attr_accessor :state_query + + attr_accessor :type_query + + attr_accessor :login_name_query + + attr_accessor :in_user_ids_query + + attr_accessor :or_query + + attr_accessor :and_query + + attr_accessor :not_query + + attr_accessor :in_user_emails_query + + attr_accessor :organization_id_query + + attr_accessor :phone_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_name_query' => :'userNameQuery', + :'first_name_query' => :'firstNameQuery', + :'last_name_query' => :'lastNameQuery', + :'nick_name_query' => :'nickNameQuery', + :'display_name_query' => :'displayNameQuery', + :'email_query' => :'emailQuery', + :'state_query' => :'stateQuery', + :'type_query' => :'typeQuery', + :'login_name_query' => :'loginNameQuery', + :'in_user_ids_query' => :'inUserIdsQuery', + :'or_query' => :'orQuery', + :'and_query' => :'andQuery', + :'not_query' => :'notQuery', + :'in_user_emails_query' => :'inUserEmailsQuery', + :'organization_id_query' => :'organizationIdQuery', + :'phone_query' => :'phoneQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_name_query' => :'UserServiceUserNameQuery', + :'first_name_query' => :'UserServiceFirstNameQuery', + :'last_name_query' => :'UserServiceLastNameQuery', + :'nick_name_query' => :'UserServiceNickNameQuery', + :'display_name_query' => :'UserServiceDisplayNameQuery', + :'email_query' => :'UserServiceEmailQuery', + :'state_query' => :'UserServiceStateQuery', + :'type_query' => :'UserServiceTypeQuery', + :'login_name_query' => :'UserServiceLoginNameQuery', + :'in_user_ids_query' => :'UserServiceInUserIDQuery', + :'or_query' => :'UserServiceOrQuery', + :'and_query' => :'UserServiceAndQuery', + :'not_query' => :'UserServiceNotQuery', + :'in_user_emails_query' => :'UserServiceInUserEmailsQuery', + :'organization_id_query' => :'UserServiceOrganizationIdQuery', + :'phone_query' => :'UserServicePhoneQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSearchQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSearchQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_name_query') + self.user_name_query = attributes[:'user_name_query'] + end + + if attributes.key?(:'first_name_query') + self.first_name_query = attributes[:'first_name_query'] + end + + if attributes.key?(:'last_name_query') + self.last_name_query = attributes[:'last_name_query'] + end + + if attributes.key?(:'nick_name_query') + self.nick_name_query = attributes[:'nick_name_query'] + end + + if attributes.key?(:'display_name_query') + self.display_name_query = attributes[:'display_name_query'] + end + + if attributes.key?(:'email_query') + self.email_query = attributes[:'email_query'] + end + + if attributes.key?(:'state_query') + self.state_query = attributes[:'state_query'] + end + + if attributes.key?(:'type_query') + self.type_query = attributes[:'type_query'] + end + + if attributes.key?(:'login_name_query') + self.login_name_query = attributes[:'login_name_query'] + end + + if attributes.key?(:'in_user_ids_query') + self.in_user_ids_query = attributes[:'in_user_ids_query'] + end + + if attributes.key?(:'or_query') + self.or_query = attributes[:'or_query'] + end + + if attributes.key?(:'and_query') + self.and_query = attributes[:'and_query'] + end + + if attributes.key?(:'not_query') + self.not_query = attributes[:'not_query'] + end + + if attributes.key?(:'in_user_emails_query') + self.in_user_emails_query = attributes[:'in_user_emails_query'] + end + + if attributes.key?(:'organization_id_query') + self.organization_id_query = attributes[:'organization_id_query'] + end + + if attributes.key?(:'phone_query') + self.phone_query = attributes[:'phone_query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_name_query == o.user_name_query && + first_name_query == o.first_name_query && + last_name_query == o.last_name_query && + nick_name_query == o.nick_name_query && + display_name_query == o.display_name_query && + email_query == o.email_query && + state_query == o.state_query && + type_query == o.type_query && + login_name_query == o.login_name_query && + in_user_ids_query == o.in_user_ids_query && + or_query == o.or_query && + and_query == o.and_query && + not_query == o.not_query && + in_user_emails_query == o.in_user_emails_query && + organization_id_query == o.organization_id_query && + phone_query == o.phone_query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_name_query, first_name_query, last_name_query, nick_name_query, display_name_query, email_query, state_query, type_query, login_name_query, in_user_ids_query, or_query, and_query, not_query, in_user_emails_query, organization_id_query, phone_query].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_send_email_code_request.rb b/lib/zitadel/client/models/user_service_send_email_code_request.rb new file mode 100644 index 00000000..5d24f6ad --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_email_code_request.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSendEmailCodeRequest + attr_accessor :send_code + + attr_accessor :return_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode', + :'return_code' => :'returnCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_code' => :'UserServiceSendEmailVerificationCode', + :'return_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendEmailCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendEmailCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_code == o.send_code && + return_code == o.return_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_code, return_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_send_email_code_response.rb b/lib/zitadel/client/models/user_service_send_email_code_response.rb new file mode 100644 index 00000000..7f6f3cec --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_email_code_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSendEmailCodeResponse + attr_accessor :details + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendEmailCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendEmailCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_send_email_verification_code.rb b/lib/zitadel/client/models/user_service_send_email_verification_code.rb new file mode 100644 index 00000000..320d5d09 --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_email_verification_code.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSendEmailVerificationCode + # 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 + attr_accessor :url_template + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url_template' => :'urlTemplate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url_template' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendEmailVerificationCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendEmailVerificationCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url_template') + self.url_template = attributes[:'url_template'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@url_template.nil? && @url_template.to_s.length > 200 + invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') + end + + if !@url_template.nil? && @url_template.to_s.length < 1 + invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@url_template.nil? && @url_template.to_s.length > 200 + return false if !@url_template.nil? && @url_template.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] url_template Value to be assigned + def url_template=(url_template) + if url_template.nil? + fail ArgumentError, 'url_template cannot be nil' + end + + if url_template.to_s.length > 200 + fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' + end + + if url_template.to_s.length < 1 + fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' + end + + @url_template = url_template + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url_template == o.url_template + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url_template].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_send_invite_code.rb b/lib/zitadel/client/models/user_service_send_invite_code.rb new file mode 100644 index 00000000..2c785487 --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_invite_code.rb @@ -0,0 +1,297 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSendInviteCode + # 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 + attr_accessor :url_template + + # 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. + attr_accessor :application_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url_template' => :'urlTemplate', + :'application_name' => :'applicationName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url_template' => :'String', + :'application_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendInviteCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendInviteCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url_template') + self.url_template = attributes[:'url_template'] + end + + if attributes.key?(:'application_name') + self.application_name = attributes[:'application_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@url_template.nil? && @url_template.to_s.length > 200 + invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') + end + + if !@url_template.nil? && @url_template.to_s.length < 1 + invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') + end + + if !@application_name.nil? && @application_name.to_s.length > 200 + invalid_properties.push('invalid value for "application_name", the character length must be smaller than or equal to 200.') + end + + if !@application_name.nil? && @application_name.to_s.length < 1 + invalid_properties.push('invalid value for "application_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@url_template.nil? && @url_template.to_s.length > 200 + return false if !@url_template.nil? && @url_template.to_s.length < 1 + return false if !@application_name.nil? && @application_name.to_s.length > 200 + return false if !@application_name.nil? && @application_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] url_template Value to be assigned + def url_template=(url_template) + if url_template.nil? + fail ArgumentError, 'url_template cannot be nil' + end + + if url_template.to_s.length > 200 + fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' + end + + if url_template.to_s.length < 1 + fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' + end + + @url_template = url_template + end + + # Custom attribute writer method with validation + # @param [Object] application_name Value to be assigned + def application_name=(application_name) + if application_name.nil? + fail ArgumentError, 'application_name cannot be nil' + end + + if application_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "application_name", the character length must be smaller than or equal to 200.' + end + + if application_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "application_name", the character length must be great than or equal to 1.' + end + + @application_name = application_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url_template == o.url_template && + application_name == o.application_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url_template, application_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_send_passkey_registration_link.rb b/lib/zitadel/client/models/user_service_send_passkey_registration_link.rb new file mode 100644 index 00000000..1e330b68 --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_passkey_registration_link.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSendPasskeyRegistrationLink + # 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 + attr_accessor :url_template + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url_template' => :'urlTemplate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url_template' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendPasskeyRegistrationLink` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendPasskeyRegistrationLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url_template') + self.url_template = attributes[:'url_template'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@url_template.nil? && @url_template.to_s.length > 200 + invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') + end + + if !@url_template.nil? && @url_template.to_s.length < 1 + invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@url_template.nil? && @url_template.to_s.length > 200 + return false if !@url_template.nil? && @url_template.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] url_template Value to be assigned + def url_template=(url_template) + if url_template.nil? + fail ArgumentError, 'url_template cannot be nil' + end + + if url_template.to_s.length > 200 + fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' + end + + if url_template.to_s.length < 1 + fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' + end + + @url_template = url_template + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url_template == o.url_template + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url_template].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_send_password_reset_link.rb b/lib/zitadel/client/models/user_service_send_password_reset_link.rb new file mode 100644 index 00000000..b8a50d97 --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_password_reset_link.rb @@ -0,0 +1,292 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSendPasswordResetLink + attr_accessor :notification_type + + # 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 + attr_accessor :url_template + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'notification_type' => :'notificationType', + :'url_template' => :'urlTemplate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'notification_type' => :'UserServiceNotificationType', + :'url_template' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSendPasswordResetLink` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSendPasswordResetLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'notification_type') + self.notification_type = attributes[:'notification_type'] + else + self.notification_type = 'NOTIFICATION_TYPE_Unspecified' + end + + if attributes.key?(:'url_template') + self.url_template = attributes[:'url_template'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@url_template.nil? && @url_template.to_s.length > 200 + invalid_properties.push('invalid value for "url_template", the character length must be smaller than or equal to 200.') + end + + if !@url_template.nil? && @url_template.to_s.length < 1 + invalid_properties.push('invalid value for "url_template", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@url_template.nil? && @url_template.to_s.length > 200 + return false if !@url_template.nil? && @url_template.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] url_template Value to be assigned + def url_template=(url_template) + if url_template.nil? + fail ArgumentError, 'url_template cannot be nil' + end + + if url_template.to_s.length > 200 + fail ArgumentError, 'invalid value for "url_template", the character length must be smaller than or equal to 200.' + end + + if url_template.to_s.length < 1 + fail ArgumentError, 'invalid value for "url_template", the character length must be great than or equal to 1.' + end + + @url_template = url_template + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + notification_type == o.notification_type && + url_template == o.url_template + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [notification_type, url_template].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_email_request.rb b/lib/zitadel/client/models/user_service_set_email_request.rb new file mode 100644 index 00000000..df755e8d --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_email_request.rb @@ -0,0 +1,292 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetEmailRequest + attr_accessor :email + + attr_accessor :send_code + + attr_accessor :return_code + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'send_code' => :'sendCode', + :'return_code' => :'returnCode', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'String', + :'send_code' => :'UserServiceSendEmailVerificationCode', + :'return_code' => :'Object', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetEmailRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + else + self.email = nil + end + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if @email.to_s.length > 200 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') + end + + if @email.to_s.length < 1 + invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @email.nil? + return false if @email.to_s.length > 200 + return false if @email.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if email.nil? + fail ArgumentError, 'email cannot be nil' + end + + if email.to_s.length > 200 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' + end + + if email.to_s.length < 1 + fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' + end + + @email = email + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + send_code == o.send_code && + return_code == o.return_code && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, send_code, return_code, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_email_response.rb b/lib/zitadel/client/models/user_service_set_email_response.rb new file mode 100644 index 00000000..124d0afe --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_email_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetEmailResponse + attr_accessor :details + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_human_email.rb b/lib/zitadel/client/models/user_service_set_human_email.rb new file mode 100644 index 00000000..52a15ac5 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_human_email.rb @@ -0,0 +1,292 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetHumanEmail + attr_accessor :email + + attr_accessor :send_code + + attr_accessor :return_code + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'send_code' => :'sendCode', + :'return_code' => :'returnCode', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'String', + :'send_code' => :'UserServiceSendEmailVerificationCode', + :'return_code' => :'Object', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetHumanEmail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetHumanEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + else + self.email = nil + end + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if @email.to_s.length > 200 + invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 200.') + end + + if @email.to_s.length < 1 + invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @email.nil? + return false if @email.to_s.length > 200 + return false if @email.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if email.nil? + fail ArgumentError, 'email cannot be nil' + end + + if email.to_s.length > 200 + fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 200.' + end + + if email.to_s.length < 1 + fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.' + end + + @email = email + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + send_code == o.send_code && + return_code == o.return_code && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, send_code, return_code, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_human_phone.rb b/lib/zitadel/client/models/user_service_set_human_phone.rb new file mode 100644 index 00000000..31662441 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_human_phone.rb @@ -0,0 +1,276 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetHumanPhone + attr_accessor :phone + + attr_accessor :send_code + + attr_accessor :return_code + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'phone' => :'phone', + :'send_code' => :'sendCode', + :'return_code' => :'returnCode', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'phone' => :'String', + :'send_code' => :'Object', + :'return_code' => :'Object', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetHumanPhone` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetHumanPhone`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@phone.nil? && @phone.to_s.length > 200 + invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@phone.nil? && @phone.to_s.length > 200 + true + end + + # Custom attribute writer method with validation + # @param [Object] phone Value to be assigned + def phone=(phone) + if phone.nil? + fail ArgumentError, 'phone cannot be nil' + end + + if phone.to_s.length > 200 + fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' + end + + @phone = phone + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + phone == o.phone && + send_code == o.send_code && + return_code == o.return_code && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [phone, send_code, return_code, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_human_profile.rb b/lib/zitadel/client/models/user_service_set_human_profile.rb new file mode 100644 index 00000000..9f023728 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_human_profile.rb @@ -0,0 +1,426 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetHumanProfile + attr_accessor :given_name + + attr_accessor :family_name + + attr_accessor :nick_name + + attr_accessor :display_name + + attr_accessor :preferred_language + + attr_accessor :gender + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'given_name' => :'givenName', + :'family_name' => :'familyName', + :'nick_name' => :'nickName', + :'display_name' => :'displayName', + :'preferred_language' => :'preferredLanguage', + :'gender' => :'gender' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'given_name' => :'String', + :'family_name' => :'String', + :'nick_name' => :'String', + :'display_name' => :'String', + :'preferred_language' => :'String', + :'gender' => :'UserServiceGender' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetHumanProfile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetHumanProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'given_name') + self.given_name = attributes[:'given_name'] + else + self.given_name = nil + end + + if attributes.key?(:'family_name') + self.family_name = attributes[:'family_name'] + else + self.family_name = nil + end + + if attributes.key?(:'nick_name') + self.nick_name = attributes[:'nick_name'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'preferred_language') + self.preferred_language = attributes[:'preferred_language'] + end + + if attributes.key?(:'gender') + self.gender = attributes[:'gender'] + else + self.gender = 'GENDER_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @given_name.nil? + invalid_properties.push('invalid value for "given_name", given_name cannot be nil.') + end + + if @given_name.to_s.length > 200 + invalid_properties.push('invalid value for "given_name", the character length must be smaller than or equal to 200.') + end + + if @given_name.to_s.length < 1 + invalid_properties.push('invalid value for "given_name", the character length must be great than or equal to 1.') + end + + if @family_name.nil? + invalid_properties.push('invalid value for "family_name", family_name cannot be nil.') + end + + if @family_name.to_s.length > 200 + invalid_properties.push('invalid value for "family_name", the character length must be smaller than or equal to 200.') + end + + if @family_name.to_s.length < 1 + invalid_properties.push('invalid value for "family_name", the character length must be great than or equal to 1.') + end + + if !@nick_name.nil? && @nick_name.to_s.length > 200 + invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 200.') + end + + if !@display_name.nil? && @display_name.to_s.length > 200 + invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 200.') + end + + if !@preferred_language.nil? && @preferred_language.to_s.length > 10 + invalid_properties.push('invalid value for "preferred_language", the character length must be smaller than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @given_name.nil? + return false if @given_name.to_s.length > 200 + return false if @given_name.to_s.length < 1 + return false if @family_name.nil? + return false if @family_name.to_s.length > 200 + return false if @family_name.to_s.length < 1 + return false if !@nick_name.nil? && @nick_name.to_s.length > 200 + return false if !@display_name.nil? && @display_name.to_s.length > 200 + return false if !@preferred_language.nil? && @preferred_language.to_s.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] given_name Value to be assigned + def given_name=(given_name) + if given_name.nil? + fail ArgumentError, 'given_name cannot be nil' + end + + if given_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "given_name", the character length must be smaller than or equal to 200.' + end + + if given_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "given_name", the character length must be great than or equal to 1.' + end + + @given_name = given_name + end + + # Custom attribute writer method with validation + # @param [Object] family_name Value to be assigned + def family_name=(family_name) + if family_name.nil? + fail ArgumentError, 'family_name cannot be nil' + end + + if family_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "family_name", the character length must be smaller than or equal to 200.' + end + + if family_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "family_name", the character length must be great than or equal to 1.' + end + + @family_name = family_name + end + + # Custom attribute writer method with validation + # @param [Object] nick_name Value to be assigned + def nick_name=(nick_name) + if nick_name.nil? + fail ArgumentError, 'nick_name cannot be nil' + end + + if nick_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 200.' + end + + @nick_name = nick_name + end + + # Custom attribute writer method with validation + # @param [Object] display_name Value to be assigned + def display_name=(display_name) + if display_name.nil? + fail ArgumentError, 'display_name cannot be nil' + end + + if display_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 200.' + end + + @display_name = display_name + end + + # Custom attribute writer method with validation + # @param [Object] preferred_language Value to be assigned + def preferred_language=(preferred_language) + if preferred_language.nil? + fail ArgumentError, 'preferred_language cannot be nil' + end + + if preferred_language.to_s.length > 10 + fail ArgumentError, 'invalid value for "preferred_language", the character length must be smaller than or equal to 10.' + end + + @preferred_language = preferred_language + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + given_name == o.given_name && + family_name == o.family_name && + nick_name == o.nick_name && + display_name == o.display_name && + preferred_language == o.preferred_language && + gender == o.gender + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [given_name, family_name, nick_name, display_name, preferred_language, gender].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_metadata_entry.rb b/lib/zitadel/client/models/user_service_set_metadata_entry.rb new file mode 100644 index 00000000..a2be6e20 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_metadata_entry.rb @@ -0,0 +1,310 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetMetadataEntry + attr_accessor :key + + # The value has to be base64 encoded. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'key' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetMetadataEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetMetadataEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'key') + self.key = attributes[:'key'] + else + self.key = nil + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + else + self.value = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @key.nil? + invalid_properties.push('invalid value for "key", key cannot be nil.') + end + + if @key.to_s.length > 200 + invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 200.') + end + + if @key.to_s.length < 1 + invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + if @value.to_s.length > 500000 + invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 500000.') + end + + if @value.to_s.length < 1 + invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @key.nil? + return false if @key.to_s.length > 200 + return false if @key.to_s.length < 1 + return false if @value.nil? + return false if @value.to_s.length > 500000 + return false if @value.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] key Value to be assigned + def key=(key) + if key.nil? + fail ArgumentError, 'key cannot be nil' + end + + if key.to_s.length > 200 + fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 200.' + end + + if key.to_s.length < 1 + fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.' + end + + @key = key + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + if value.nil? + fail ArgumentError, 'value cannot be nil' + end + + if value.to_s.length > 500000 + fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 500000.' + end + + if value.to_s.length < 1 + fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.' + end + + @value = value + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + key == o.key && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [key, value].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_password.rb b/lib/zitadel/client/models/user_service_set_password.rb new file mode 100644 index 00000000..80b40dfb --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_password.rb @@ -0,0 +1,328 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetPassword + attr_accessor :password + + attr_accessor :hashed_password + + attr_accessor :current_password + + # \"the verification code generated during password reset request\" + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'password' => :'password', + :'hashed_password' => :'hashedPassword', + :'current_password' => :'currentPassword', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'password' => :'UserServicePassword', + :'hashed_password' => :'UserServiceHashedPassword', + :'current_password' => :'String', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'hashed_password') + self.hashed_password = attributes[:'hashed_password'] + end + + if attributes.key?(:'current_password') + self.current_password = attributes[:'current_password'] + else + self.current_password = nil + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + else + self.verification_code = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @current_password.nil? + invalid_properties.push('invalid value for "current_password", current_password cannot be nil.') + end + + if @current_password.to_s.length > 200 + invalid_properties.push('invalid value for "current_password", the character length must be smaller than or equal to 200.') + end + + if @current_password.to_s.length < 1 + invalid_properties.push('invalid value for "current_password", the character length must be great than or equal to 1.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') + end + + if @verification_code.to_s.length > 20 + invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') + end + + if @verification_code.to_s.length < 1 + invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @current_password.nil? + return false if @current_password.to_s.length > 200 + return false if @current_password.to_s.length < 1 + return false if @verification_code.nil? + return false if @verification_code.to_s.length > 20 + return false if @verification_code.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] current_password Value to be assigned + def current_password=(current_password) + if current_password.nil? + fail ArgumentError, 'current_password cannot be nil' + end + + if current_password.to_s.length > 200 + fail ArgumentError, 'invalid value for "current_password", the character length must be smaller than or equal to 200.' + end + + if current_password.to_s.length < 1 + fail ArgumentError, 'invalid value for "current_password", the character length must be great than or equal to 1.' + end + + @current_password = current_password + end + + # Custom attribute writer method with validation + # @param [Object] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + end + + if verification_code.to_s.length > 20 + fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' + end + + if verification_code.to_s.length < 1 + fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' + end + + @verification_code = verification_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + password == o.password && + hashed_password == o.hashed_password && + current_password == o.current_password && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [password, hashed_password, current_password, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_password_request.rb b/lib/zitadel/client/models/user_service_set_password_request.rb new file mode 100644 index 00000000..5311477f --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_password_request.rb @@ -0,0 +1,319 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetPasswordRequest + attr_accessor :new_password + + attr_accessor :current_password + + # \"the verification code generated during password reset request\" + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'new_password' => :'newPassword', + :'current_password' => :'currentPassword', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'new_password' => :'UserServicePassword', + :'current_password' => :'String', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPasswordRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPasswordRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'new_password') + self.new_password = attributes[:'new_password'] + end + + if attributes.key?(:'current_password') + self.current_password = attributes[:'current_password'] + else + self.current_password = nil + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + else + self.verification_code = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @current_password.nil? + invalid_properties.push('invalid value for "current_password", current_password cannot be nil.') + end + + if @current_password.to_s.length > 200 + invalid_properties.push('invalid value for "current_password", the character length must be smaller than or equal to 200.') + end + + if @current_password.to_s.length < 1 + invalid_properties.push('invalid value for "current_password", the character length must be great than or equal to 1.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') + end + + if @verification_code.to_s.length > 20 + invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') + end + + if @verification_code.to_s.length < 1 + invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @current_password.nil? + return false if @current_password.to_s.length > 200 + return false if @current_password.to_s.length < 1 + return false if @verification_code.nil? + return false if @verification_code.to_s.length > 20 + return false if @verification_code.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] current_password Value to be assigned + def current_password=(current_password) + if current_password.nil? + fail ArgumentError, 'current_password cannot be nil' + end + + if current_password.to_s.length > 200 + fail ArgumentError, 'invalid value for "current_password", the character length must be smaller than or equal to 200.' + end + + if current_password.to_s.length < 1 + fail ArgumentError, 'invalid value for "current_password", the character length must be great than or equal to 1.' + end + + @current_password = current_password + end + + # Custom attribute writer method with validation + # @param [Object] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + end + + if verification_code.to_s.length > 20 + fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' + end + + if verification_code.to_s.length < 1 + fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' + end + + @verification_code = verification_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + new_password == o.new_password && + current_password == o.current_password && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [new_password, current_password, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_password_response.rb b/lib/zitadel/client/models/user_service_set_password_response.rb new file mode 100644 index 00000000..75f9114d --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_password_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetPasswordResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPasswordResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPasswordResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_phone_request.rb b/lib/zitadel/client/models/user_service_set_phone_request.rb new file mode 100644 index 00000000..321ea1f4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_phone_request.rb @@ -0,0 +1,292 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetPhoneRequest + attr_accessor :phone + + attr_accessor :send_code + + attr_accessor :return_code + + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'phone' => :'phone', + :'send_code' => :'sendCode', + :'return_code' => :'returnCode', + :'is_verified' => :'isVerified' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'phone' => :'String', + :'send_code' => :'Object', + :'return_code' => :'Object', + :'is_verified' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPhoneRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPhoneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + else + self.phone = nil + end + + if attributes.key?(:'send_code') + self.send_code = attributes[:'send_code'] + end + + if attributes.key?(:'return_code') + self.return_code = attributes[:'return_code'] + end + + if attributes.key?(:'is_verified') + self.is_verified = attributes[:'is_verified'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @phone.nil? + invalid_properties.push('invalid value for "phone", phone cannot be nil.') + end + + if @phone.to_s.length > 200 + invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 200.') + end + + if @phone.to_s.length < 1 + invalid_properties.push('invalid value for "phone", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @phone.nil? + return false if @phone.to_s.length > 200 + return false if @phone.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] phone Value to be assigned + def phone=(phone) + if phone.nil? + fail ArgumentError, 'phone cannot be nil' + end + + if phone.to_s.length > 200 + fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 200.' + end + + if phone.to_s.length < 1 + fail ArgumentError, 'invalid value for "phone", the character length must be great than or equal to 1.' + end + + @phone = phone + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + phone == o.phone && + send_code == o.send_code && + return_code == o.return_code && + is_verified == o.is_verified + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [phone, send_code, return_code, is_verified].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_set_phone_response.rb b/lib/zitadel/client/models/user_service_set_phone_response.rb new file mode 100644 index 00000000..7538b765 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_phone_response.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceSetPhoneResponse + attr_accessor :details + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceSetPhoneResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceSetPhoneResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb b/lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb new file mode 100644 index 00000000..e1a29887 --- /dev/null +++ b/lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb @@ -0,0 +1,277 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceStartIdentityProviderIntentRequest + # ID for existing identity provider + attr_accessor :idp_id + + attr_accessor :urls + + attr_accessor :ldap + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_id' => :'idpId', + :'urls' => :'urls', + :'ldap' => :'ldap' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'idp_id' => :'String', + :'urls' => :'UserServiceRedirectURLs', + :'ldap' => :'UserServiceLDAPCredentials' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'idp_id') + self.idp_id = attributes[:'idp_id'] + end + + if attributes.key?(:'urls') + self.urls = attributes[:'urls'] + end + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@idp_id.nil? && @idp_id.to_s.length > 200 + invalid_properties.push('invalid value for "idp_id", the character length must be smaller than or equal to 200.') + end + + if !@idp_id.nil? && @idp_id.to_s.length < 1 + invalid_properties.push('invalid value for "idp_id", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@idp_id.nil? && @idp_id.to_s.length > 200 + return false if !@idp_id.nil? && @idp_id.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] idp_id Value to be assigned + def idp_id=(idp_id) + if idp_id.nil? + fail ArgumentError, 'idp_id cannot be nil' + end + + if idp_id.to_s.length > 200 + fail ArgumentError, 'invalid value for "idp_id", the character length must be smaller than or equal to 200.' + end + + if idp_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "idp_id", the character length must be great than or equal to 1.' + end + + @idp_id = idp_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + idp_id == o.idp_id && + urls == o.urls && + ldap == o.ldap + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [idp_id, urls, ldap].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb b/lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb new file mode 100644 index 00000000..85f784b7 --- /dev/null +++ b/lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb @@ -0,0 +1,259 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceStartIdentityProviderIntentResponse + attr_accessor :details + + # URL to which the client should redirect + attr_accessor :auth_url + + attr_accessor :idp_intent + + # POST call information + attr_accessor :post_form + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'auth_url' => :'authUrl', + :'idp_intent' => :'idpIntent', + :'post_form' => :'postForm' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'auth_url' => :'String', + :'idp_intent' => :'UserServiceIDPIntent', + :'post_form' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceStartIdentityProviderIntentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'auth_url') + self.auth_url = attributes[:'auth_url'] + end + + if attributes.key?(:'idp_intent') + self.idp_intent = attributes[:'idp_intent'] + end + + if attributes.key?(:'post_form') + self.post_form = attributes[:'post_form'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + auth_url == o.auth_url && + idp_intent == o.idp_intent && + post_form == o.post_form + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, auth_url, idp_intent, post_form].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_state_query.rb b/lib/zitadel/client/models/user_service_state_query.rb new file mode 100644 index 00000000..e81039e0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_state_query.rb @@ -0,0 +1,270 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific state. + class UserServiceStateQuery + attr_accessor :state + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state' => :'state' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'state' => :'UserServiceUserState' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceStateQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceStateQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'USER_STATE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @state.nil? + invalid_properties.push('invalid value for "state", state cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @state.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] state Value to be assigned + def state=(state) + if state.nil? + fail ArgumentError, 'state cannot be nil' + end + + @state = state + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + state == o.state + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [state].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_text_query_method.rb b/lib/zitadel/client/models/user_service_text_query_method.rb new file mode 100644 index 00000000..52a96305 --- /dev/null +++ b/lib/zitadel/client/models/user_service_text_query_method.rb @@ -0,0 +1,47 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceTextQueryMethod + TEXT_QUERY_METHOD_EQUALS = "TEXT_QUERY_METHOD_EQUALS".freeze + TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE".freeze + TEXT_QUERY_METHOD_STARTS_WITH = "TEXT_QUERY_METHOD_STARTS_WITH".freeze + TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE".freeze + TEXT_QUERY_METHOD_CONTAINS = "TEXT_QUERY_METHOD_CONTAINS".freeze + TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE".freeze + TEXT_QUERY_METHOD_ENDS_WITH = "TEXT_QUERY_METHOD_ENDS_WITH".freeze + TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE".freeze + + def self.all_vars + @all_vars ||= [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceTextQueryMethod.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceTextQueryMethod" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_type.rb b/lib/zitadel/client/models/user_service_type.rb new file mode 100644 index 00000000..3810ec4b --- /dev/null +++ b/lib/zitadel/client/models/user_service_type.rb @@ -0,0 +1,42 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceType + TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED".freeze + TYPE_HUMAN = "TYPE_HUMAN".freeze + TYPE_MACHINE = "TYPE_MACHINE".freeze + + def self.all_vars + @all_vars ||= [TYPE_UNSPECIFIED, TYPE_HUMAN, TYPE_MACHINE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceType" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_type_query.rb b/lib/zitadel/client/models/user_service_type_query.rb new file mode 100644 index 00000000..ba61c5b3 --- /dev/null +++ b/lib/zitadel/client/models/user_service_type_query.rb @@ -0,0 +1,270 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific type. + class UserServiceTypeQuery + attr_accessor :type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'UserServiceType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceTypeQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceTypeQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = 'TYPE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_unlock_user_response.rb b/lib/zitadel/client/models/user_service_unlock_user_response.rb new file mode 100644 index 00000000..02b59081 --- /dev/null +++ b/lib/zitadel/client/models/user_service_unlock_user_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceUnlockUserResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUnlockUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUnlockUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_update_human_user_request.rb b/lib/zitadel/client/models/user_service_update_human_user_request.rb new file mode 100644 index 00000000..11618e09 --- /dev/null +++ b/lib/zitadel/client/models/user_service_update_human_user_request.rb @@ -0,0 +1,294 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceUpdateHumanUserRequest + attr_accessor :username + + attr_accessor :profile + + attr_accessor :email + + attr_accessor :phone + + attr_accessor :password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'username' => :'username', + :'profile' => :'profile', + :'email' => :'email', + :'phone' => :'phone', + :'password' => :'password' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'username' => :'String', + :'profile' => :'UserServiceSetHumanProfile', + :'email' => :'UserServiceSetHumanEmail', + :'phone' => :'UserServiceSetHumanPhone', + :'password' => :'UserServiceSetPassword' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUpdateHumanUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUpdateHumanUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'profile') + self.profile = attributes[:'profile'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@username.nil? && @username.to_s.length > 200 + invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 200.') + end + + if !@username.nil? && @username.to_s.length < 1 + invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@username.nil? && @username.to_s.length > 200 + return false if !@username.nil? && @username.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] username Value to be assigned + def username=(username) + if username.nil? + fail ArgumentError, 'username cannot be nil' + end + + if username.to_s.length > 200 + fail ArgumentError, 'invalid value for "username", the character length must be smaller than or equal to 200.' + end + + if username.to_s.length < 1 + fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.' + end + + @username = username + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + username == o.username && + profile == o.profile && + email == o.email && + phone == o.phone && + password == o.password + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [username, profile, email, phone, password].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_update_human_user_response.rb b/lib/zitadel/client/models/user_service_update_human_user_response.rb new file mode 100644 index 00000000..f026d4bf --- /dev/null +++ b/lib/zitadel/client/models/user_service_update_human_user_response.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceUpdateHumanUserResponse + attr_accessor :details + + attr_accessor :email_code + + attr_accessor :phone_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'email_code' => :'emailCode', + :'phone_code' => :'phoneCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails', + :'email_code' => :'String', + :'phone_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUpdateHumanUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUpdateHumanUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'email_code') + self.email_code = attributes[:'email_code'] + end + + if attributes.key?(:'phone_code') + self.phone_code = attributes[:'phone_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details && + email_code == o.email_code && + phone_code == o.phone_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details, email_code, phone_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_user.rb b/lib/zitadel/client/models/user_service_user.rb new file mode 100644 index 00000000..c03797de --- /dev/null +++ b/lib/zitadel/client/models/user_service_user.rb @@ -0,0 +1,297 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceUser + attr_accessor :user_id + + attr_accessor :details + + attr_accessor :state + + attr_accessor :username + + attr_accessor :login_names + + attr_accessor :preferred_login_name + + attr_accessor :human + + attr_accessor :machine + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'details' => :'details', + :'state' => :'state', + :'username' => :'username', + :'login_names' => :'loginNames', + :'preferred_login_name' => :'preferredLoginName', + :'human' => :'human', + :'machine' => :'machine' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_id' => :'String', + :'details' => :'UserServiceDetails', + :'state' => :'UserServiceUserState', + :'username' => :'String', + :'login_names' => :'Array', + :'preferred_login_name' => :'String', + :'human' => :'UserServiceHumanUser', + :'machine' => :'UserServiceMachineUser' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUser` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'USER_STATE_UNSPECIFIED' + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + + if attributes.key?(:'login_names') + if (value = attributes[:'login_names']).is_a?(Array) + self.login_names = value + end + end + + if attributes.key?(:'preferred_login_name') + self.preferred_login_name = attributes[:'preferred_login_name'] + end + + if attributes.key?(:'human') + self.human = attributes[:'human'] + end + + if attributes.key?(:'machine') + self.machine = attributes[:'machine'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_id == o.user_id && + details == o.details && + state == o.state && + username == o.username && + login_names == o.login_names && + preferred_login_name == o.preferred_login_name && + human == o.human && + machine == o.machine + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_id, details, state, username, login_names, preferred_login_name, human, machine].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_user_field_name.rb b/lib/zitadel/client/models/user_service_user_field_name.rb new file mode 100644 index 00000000..fd907e9e --- /dev/null +++ b/lib/zitadel/client/models/user_service_user_field_name.rb @@ -0,0 +1,49 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceUserFieldName + USER_FIELD_NAME_UNSPECIFIED = "USER_FIELD_NAME_UNSPECIFIED".freeze + USER_FIELD_NAME_USER_NAME = "USER_FIELD_NAME_USER_NAME".freeze + USER_FIELD_NAME_FIRST_NAME = "USER_FIELD_NAME_FIRST_NAME".freeze + USER_FIELD_NAME_LAST_NAME = "USER_FIELD_NAME_LAST_NAME".freeze + USER_FIELD_NAME_NICK_NAME = "USER_FIELD_NAME_NICK_NAME".freeze + USER_FIELD_NAME_DISPLAY_NAME = "USER_FIELD_NAME_DISPLAY_NAME".freeze + USER_FIELD_NAME_EMAIL = "USER_FIELD_NAME_EMAIL".freeze + USER_FIELD_NAME_STATE = "USER_FIELD_NAME_STATE".freeze + USER_FIELD_NAME_TYPE = "USER_FIELD_NAME_TYPE".freeze + USER_FIELD_NAME_CREATION_DATE = "USER_FIELD_NAME_CREATION_DATE".freeze + + def self.all_vars + @all_vars ||= [USER_FIELD_NAME_UNSPECIFIED, USER_FIELD_NAME_USER_NAME, USER_FIELD_NAME_FIRST_NAME, USER_FIELD_NAME_LAST_NAME, USER_FIELD_NAME_NICK_NAME, USER_FIELD_NAME_DISPLAY_NAME, USER_FIELD_NAME_EMAIL, USER_FIELD_NAME_STATE, USER_FIELD_NAME_TYPE, USER_FIELD_NAME_CREATION_DATE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceUserFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceUserFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_user_name_query.rb b/lib/zitadel/client/models/user_service_user_name_query.rb new file mode 100644 index 00000000..3e83519a --- /dev/null +++ b/lib/zitadel/client/models/user_service_user_name_query.rb @@ -0,0 +1,299 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Query for users with a specific user name. + class UserServiceUserNameQuery + attr_accessor :user_name + + attr_accessor :method + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_name' => :'userName', + :'method' => :'method' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'user_name' => :'String', + :'method' => :'UserServiceTextQueryMethod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceUserNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUserNameQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'user_name') + self.user_name = attributes[:'user_name'] + else + self.user_name = nil + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + else + self.method = 'TEXT_QUERY_METHOD_EQUALS' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @user_name.nil? + invalid_properties.push('invalid value for "user_name", user_name cannot be nil.') + end + + if @user_name.to_s.length > 200 + invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 200.') + end + + if @user_name.to_s.length < 1 + invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @user_name.nil? + return false if @user_name.to_s.length > 200 + return false if @user_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] user_name Value to be assigned + def user_name=(user_name) + if user_name.nil? + fail ArgumentError, 'user_name cannot be nil' + end + + if user_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 200.' + end + + if user_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.' + end + + @user_name = user_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + user_name == o.user_name && + method == o.method + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [user_name, method].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_user_state.rb b/lib/zitadel/client/models/user_service_user_state.rb new file mode 100644 index 00000000..69ca26c5 --- /dev/null +++ b/lib/zitadel/client/models/user_service_user_state.rb @@ -0,0 +1,45 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceUserState + USER_STATE_UNSPECIFIED = "USER_STATE_UNSPECIFIED".freeze + USER_STATE_ACTIVE = "USER_STATE_ACTIVE".freeze + USER_STATE_INACTIVE = "USER_STATE_INACTIVE".freeze + USER_STATE_DELETED = "USER_STATE_DELETED".freeze + USER_STATE_LOCKED = "USER_STATE_LOCKED".freeze + USER_STATE_INITIAL = "USER_STATE_INITIAL".freeze + + def self.all_vars + @all_vars ||= [USER_STATE_UNSPECIFIED, USER_STATE_ACTIVE, USER_STATE_INACTIVE, USER_STATE_DELETED, USER_STATE_LOCKED, USER_STATE_INITIAL].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UserServiceUserState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceUserState" + end + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_email_request.rb b/lib/zitadel/client/models/user_service_verify_email_request.rb new file mode 100644 index 00000000..1dd96760 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_email_request.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyEmailRequest + # \"the verification code generated during the set email request\" + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyEmailRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + else + self.verification_code = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') + end + + if @verification_code.to_s.length > 20 + invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') + end + + if @verification_code.to_s.length < 1 + invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @verification_code.nil? + return false if @verification_code.to_s.length > 20 + return false if @verification_code.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + end + + if verification_code.to_s.length > 20 + fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' + end + + if verification_code.to_s.length < 1 + fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' + end + + @verification_code = verification_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_email_response.rb b/lib/zitadel/client/models/user_service_verify_email_response.rb new file mode 100644 index 00000000..dcc059f7 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_email_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyEmailResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyEmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_invite_code_request.rb b/lib/zitadel/client/models/user_service_verify_invite_code_request.rb new file mode 100644 index 00000000..4f6dd1b0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_invite_code_request.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyInviteCodeRequest + # \"the verification code generated during the invite code request\" + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyInviteCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyInviteCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + else + self.verification_code = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') + end + + if @verification_code.to_s.length > 20 + invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') + end + + if @verification_code.to_s.length < 1 + invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @verification_code.nil? + return false if @verification_code.to_s.length > 20 + return false if @verification_code.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + end + + if verification_code.to_s.length > 20 + fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' + end + + if verification_code.to_s.length < 1 + fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' + end + + @verification_code = verification_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_invite_code_response.rb b/lib/zitadel/client/models/user_service_verify_invite_code_response.rb new file mode 100644 index 00000000..f52dd29a --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_invite_code_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyInviteCodeResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyInviteCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyInviteCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb b/lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb new file mode 100644 index 00000000..59b65487 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_passkey_registration_request.rb @@ -0,0 +1,292 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyPasskeyRegistrationRequest + # PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential + attr_accessor :public_key_credential + + attr_accessor :passkey_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'public_key_credential' => :'publicKeyCredential', + :'passkey_name' => :'passkeyName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'public_key_credential' => :'Object', + :'passkey_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'public_key_credential') + self.public_key_credential = attributes[:'public_key_credential'] + else + self.public_key_credential = nil + end + + if attributes.key?(:'passkey_name') + self.passkey_name = attributes[:'passkey_name'] + else + self.passkey_name = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @public_key_credential.nil? + invalid_properties.push('invalid value for "public_key_credential", public_key_credential cannot be nil.') + end + + if @passkey_name.nil? + invalid_properties.push('invalid value for "passkey_name", passkey_name cannot be nil.') + end + + if @passkey_name.to_s.length > 200 + invalid_properties.push('invalid value for "passkey_name", the character length must be smaller than or equal to 200.') + end + + if @passkey_name.to_s.length < 1 + invalid_properties.push('invalid value for "passkey_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @public_key_credential.nil? + return false if @passkey_name.nil? + return false if @passkey_name.to_s.length > 200 + return false if @passkey_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] public_key_credential Value to be assigned + def public_key_credential=(public_key_credential) + if public_key_credential.nil? + fail ArgumentError, 'public_key_credential cannot be nil' + end + + @public_key_credential = public_key_credential + end + + # Custom attribute writer method with validation + # @param [Object] passkey_name Value to be assigned + def passkey_name=(passkey_name) + if passkey_name.nil? + fail ArgumentError, 'passkey_name cannot be nil' + end + + if passkey_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "passkey_name", the character length must be smaller than or equal to 200.' + end + + if passkey_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "passkey_name", the character length must be great than or equal to 1.' + end + + @passkey_name = passkey_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key_credential == o.public_key_credential && + passkey_name == o.passkey_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [public_key_credential, passkey_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb b/lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb new file mode 100644 index 00000000..bf7c42d9 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_passkey_registration_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyPasskeyRegistrationResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPasskeyRegistrationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_phone_request.rb b/lib/zitadel/client/models/user_service_verify_phone_request.rb new file mode 100644 index 00000000..3ca9780d --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_phone_request.rb @@ -0,0 +1,266 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyPhoneRequest + # \"the verification code generated during the set phone request\" + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verification_code' => :'verificationCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPhoneRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPhoneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verification_code') + self.verification_code = attributes[:'verification_code'] + else + self.verification_code = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_code cannot be nil.') + end + + if @verification_code.to_s.length > 20 + invalid_properties.push('invalid value for "verification_code", the character length must be smaller than or equal to 20.') + end + + if @verification_code.to_s.length < 1 + invalid_properties.push('invalid value for "verification_code", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @verification_code.nil? + return false if @verification_code.to_s.length > 20 + return false if @verification_code.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + end + + if verification_code.to_s.length > 20 + fail ArgumentError, 'invalid value for "verification_code", the character length must be smaller than or equal to 20.' + end + + if verification_code.to_s.length < 1 + fail ArgumentError, 'invalid value for "verification_code", the character length must be great than or equal to 1.' + end + + @verification_code = verification_code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verification_code == o.verification_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verification_code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_phone_response.rb b/lib/zitadel/client/models/user_service_verify_phone_response.rb new file mode 100644 index 00000000..c61c681b --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_phone_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyPhoneResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyPhoneResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyPhoneResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb b/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb new file mode 100644 index 00000000..f1774297 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_request.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyTOTPRegistrationRequest + # Code generated by TOTP app or device + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @code.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb b/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb new file mode 100644 index 00000000..6e822258 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyTOTPRegistrationResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyTOTPRegistrationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb b/lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb new file mode 100644 index 00000000..22acce0a --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_u2_f_registration_request.rb @@ -0,0 +1,292 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyU2FRegistrationRequest + # PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential + attr_accessor :public_key_credential + + attr_accessor :token_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'public_key_credential' => :'publicKeyCredential', + :'token_name' => :'tokenName' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'public_key_credential' => :'Object', + :'token_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'public_key_credential') + self.public_key_credential = attributes[:'public_key_credential'] + else + self.public_key_credential = nil + end + + if attributes.key?(:'token_name') + self.token_name = attributes[:'token_name'] + else + self.token_name = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @public_key_credential.nil? + invalid_properties.push('invalid value for "public_key_credential", public_key_credential cannot be nil.') + end + + if @token_name.nil? + invalid_properties.push('invalid value for "token_name", token_name cannot be nil.') + end + + if @token_name.to_s.length > 200 + invalid_properties.push('invalid value for "token_name", the character length must be smaller than or equal to 200.') + end + + if @token_name.to_s.length < 1 + invalid_properties.push('invalid value for "token_name", the character length must be great than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @public_key_credential.nil? + return false if @token_name.nil? + return false if @token_name.to_s.length > 200 + return false if @token_name.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] public_key_credential Value to be assigned + def public_key_credential=(public_key_credential) + if public_key_credential.nil? + fail ArgumentError, 'public_key_credential cannot be nil' + end + + @public_key_credential = public_key_credential + end + + # Custom attribute writer method with validation + # @param [Object] token_name Value to be assigned + def token_name=(token_name) + if token_name.nil? + fail ArgumentError, 'token_name cannot be nil' + end + + if token_name.to_s.length > 200 + fail ArgumentError, 'invalid value for "token_name", the character length must be smaller than or equal to 200.' + end + + if token_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "token_name", the character length must be great than or equal to 1.' + end + + @token_name = token_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key_credential == o.public_key_credential && + token_name == o.token_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [public_key_credential, token_name].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb b/lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb new file mode 100644 index 00000000..72793fd1 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_u2_f_registration_response.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceVerifyU2FRegistrationResponse + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'details' => :'UserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceVerifyU2FRegistrationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_activate_web_key_response.rb b/lib/zitadel/client/models/web_key_service_beta_activate_web_key_response.rb new file mode 100644 index 00000000..3f3c8a5b --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_activate_web_key_response.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaActivateWebKeyResponse + # The timestamp of the activation of the key. + attr_accessor :change_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'change_date' => :'changeDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'change_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceBetaActivateWebKeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceBetaActivateWebKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + change_date == o.change_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [change_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_create_web_key_response.rb b/lib/zitadel/client/models/web_key_service_beta_create_web_key_response.rb new file mode 100644 index 00000000..01bcd248 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_create_web_key_response.rb @@ -0,0 +1,241 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaCreateWebKeyResponse + # The unique identifier of the newly created key. + attr_accessor :id + + # The timestamp of the key creation. + attr_accessor :creation_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'creation_date' => :'creationDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceBetaCreateWebKeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceBetaCreateWebKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + creation_date == o.creation_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, creation_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_delete_web_key_response.rb b/lib/zitadel/client/models/web_key_service_beta_delete_web_key_response.rb new file mode 100644 index 00000000..d70be513 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_delete_web_key_response.rb @@ -0,0 +1,231 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaDeleteWebKeyResponse + # 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. + attr_accessor :deletion_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deletion_date' => :'deletionDate' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'deletion_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceBetaDeleteWebKeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceBetaDeleteWebKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deletion_date') + self.deletion_date = attributes[:'deletion_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deletion_date == o.deletion_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deletion_date].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a.rb b/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a.rb new file mode 100644 index 00000000..00f8cf5d --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a.rb @@ -0,0 +1,254 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaECDSA + attr_accessor :curve + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'curve' => :'curve' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'curve' => :'WebKeyServiceBetaECDSACurve' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceBetaECDSA` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceBetaECDSA`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'curve') + self.curve = attributes[:'curve'] + else + self.curve = 'ECDSA_CURVE_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + curve == o.curve + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [curve].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a_curve.rb b/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a_curve.rb new file mode 100644 index 00000000..c43309f3 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a_curve.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaECDSACurve + ECDSA_CURVE_UNSPECIFIED = "ECDSA_CURVE_UNSPECIFIED".freeze + ECDSA_CURVE_P256 = "ECDSA_CURVE_P256".freeze + ECDSA_CURVE_P384 = "ECDSA_CURVE_P384".freeze + ECDSA_CURVE_P512 = "ECDSA_CURVE_P512".freeze + + def self.all_vars + @all_vars ||= [ECDSA_CURVE_UNSPECIFIED, ECDSA_CURVE_P256, ECDSA_CURVE_P384, ECDSA_CURVE_P512].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if WebKeyServiceBetaECDSACurve.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::WebKeyServiceBetaECDSACurve" + end + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_list_web_keys_response.rb b/lib/zitadel/client/models/web_key_service_beta_list_web_keys_response.rb new file mode 100644 index 00000000..839e2c5d --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_list_web_keys_response.rb @@ -0,0 +1,232 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaListWebKeysResponse + attr_accessor :web_keys + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'web_keys' => :'webKeys' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'web_keys' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceBetaListWebKeysResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceBetaListWebKeysResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'web_keys') + if (value = attributes[:'web_keys']).is_a?(Array) + self.web_keys = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + web_keys == o.web_keys + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [web_keys].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_r_s_a.rb b/lib/zitadel/client/models/web_key_service_beta_r_s_a.rb new file mode 100644 index 00000000..21eb5539 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_r_s_a.rb @@ -0,0 +1,265 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaRSA + attr_accessor :bits + + attr_accessor :hasher + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bits' => :'bits', + :'hasher' => :'hasher' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'bits' => :'WebKeyServiceBetaRSABits', + :'hasher' => :'WebKeyServiceBetaRSAHasher' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceBetaRSA` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceBetaRSA`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'bits') + self.bits = attributes[:'bits'] + else + self.bits = 'RSA_BITS_UNSPECIFIED' + end + + if attributes.key?(:'hasher') + self.hasher = attributes[:'hasher'] + else + self.hasher = 'RSA_HASHER_UNSPECIFIED' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bits == o.bits && + hasher == o.hasher + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [bits, hasher].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_r_s_a_bits.rb b/lib/zitadel/client/models/web_key_service_beta_r_s_a_bits.rb new file mode 100644 index 00000000..1bfe8682 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_r_s_a_bits.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaRSABits + RSA_BITS_UNSPECIFIED = "RSA_BITS_UNSPECIFIED".freeze + RSA_BITS_2048 = "RSA_BITS_2048".freeze + RSA_BITS_3072 = "RSA_BITS_3072".freeze + RSA_BITS_4096 = "RSA_BITS_4096".freeze + + def self.all_vars + @all_vars ||= [RSA_BITS_UNSPECIFIED, RSA_BITS_2048, RSA_BITS_3072, RSA_BITS_4096].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if WebKeyServiceBetaRSABits.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::WebKeyServiceBetaRSABits" + end + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_r_s_a_hasher.rb b/lib/zitadel/client/models/web_key_service_beta_r_s_a_hasher.rb new file mode 100644 index 00000000..69c484f8 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_r_s_a_hasher.rb @@ -0,0 +1,43 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaRSAHasher + RSA_HASHER_UNSPECIFIED = "RSA_HASHER_UNSPECIFIED".freeze + RSA_HASHER_SHA256 = "RSA_HASHER_SHA256".freeze + RSA_HASHER_SHA384 = "RSA_HASHER_SHA384".freeze + RSA_HASHER_SHA512 = "RSA_HASHER_SHA512".freeze + + def self.all_vars + @all_vars ||= [RSA_HASHER_UNSPECIFIED, RSA_HASHER_SHA256, RSA_HASHER_SHA384, RSA_HASHER_SHA512].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if WebKeyServiceBetaRSAHasher.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::WebKeyServiceBetaRSAHasher" + end + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_state.rb b/lib/zitadel/client/models/web_key_service_beta_state.rb new file mode 100644 index 00000000..c659505e --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_state.rb @@ -0,0 +1,44 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaState + STATE_UNSPECIFIED = "STATE_UNSPECIFIED".freeze + STATE_INITIAL = "STATE_INITIAL".freeze + STATE_ACTIVE = "STATE_ACTIVE".freeze + STATE_INACTIVE = "STATE_INACTIVE".freeze + STATE_REMOVED = "STATE_REMOVED".freeze + + def self.all_vars + @all_vars ||= [STATE_UNSPECIFIED, STATE_INITIAL, STATE_ACTIVE, STATE_INACTIVE, STATE_REMOVED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if WebKeyServiceBetaState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::WebKeyServiceBetaState" + end + end + +end diff --git a/lib/zitadel/client/models/web_key_service_beta_web_key.rb b/lib/zitadel/client/models/web_key_service_beta_web_key.rb new file mode 100644 index 00000000..8f4e4ce5 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_beta_web_key.rb @@ -0,0 +1,289 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceBetaWebKey + # The unique identifier of the key. + attr_accessor :id + + # The timestamp of the key creation. + attr_accessor :creation_date + + # The timestamp of the last change to the key (e.g. creation, activation, deactivation). + attr_accessor :change_date + + attr_accessor :state + + attr_accessor :rsa + + attr_accessor :ecdsa + + attr_accessor :ed25519 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'creation_date' => :'creationDate', + :'change_date' => :'changeDate', + :'state' => :'state', + :'rsa' => :'rsa', + :'ecdsa' => :'ecdsa', + :'ed25519' => :'ed25519' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'creation_date' => :'Time', + :'change_date' => :'Time', + :'state' => :'WebKeyServiceBetaState', + :'rsa' => :'WebKeyServiceBetaRSA', + :'ecdsa' => :'WebKeyServiceBetaECDSA', + :'ed25519' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceBetaWebKey` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceBetaWebKey`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'change_date') + self.change_date = attributes[:'change_date'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'STATE_UNSPECIFIED' + end + + if attributes.key?(:'rsa') + self.rsa = attributes[:'rsa'] + end + + if attributes.key?(:'ecdsa') + self.ecdsa = attributes[:'ecdsa'] + end + + if attributes.key?(:'ed25519') + self.ed25519 = attributes[:'ed25519'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + creation_date == o.creation_date && + change_date == o.change_date && + state == o.state && + rsa == o.rsa && + ecdsa == o.ecdsa && + ed25519 == o.ed25519 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, creation_date, change_date, state, rsa, ecdsa, ed25519].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_create_web_key_request.rb b/lib/zitadel/client/models/web_key_service_create_web_key_request.rb new file mode 100644 index 00000000..ac528743 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_create_web_key_request.rb @@ -0,0 +1,248 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceCreateWebKeyRequest + attr_accessor :rsa + + attr_accessor :ecdsa + + attr_accessor :ed25519 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rsa' => :'rsa', + :'ecdsa' => :'ecdsa', + :'ed25519' => :'ed25519' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'rsa' => :'WebKeyServiceBetaRSA', + :'ecdsa' => :'WebKeyServiceBetaECDSA', + :'ed25519' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceCreateWebKeyRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceCreateWebKeyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'rsa') + self.rsa = attributes[:'rsa'] + end + + if attributes.key?(:'ecdsa') + self.ecdsa = attributes[:'ecdsa'] + end + + if attributes.key?(:'ed25519') + self.ed25519 = attributes[:'ed25519'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rsa == o.rsa && + ecdsa == o.ecdsa && + ed25519 == o.ed25519 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [rsa, ecdsa, ed25519].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_protobuf_any.rb b/lib/zitadel/client/models/web_key_service_protobuf_any.rb new file mode 100644 index 00000000..d3264035 --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_protobuf_any.rb @@ -0,0 +1,230 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceProtobufAny + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'@type' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceProtobufAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceProtobufAny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/web_key_service_rpc_status.rb b/lib/zitadel/client/models/web_key_service_rpc_status.rb new file mode 100644 index 00000000..dea0591d --- /dev/null +++ b/lib/zitadel/client/models/web_key_service_rpc_status.rb @@ -0,0 +1,250 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class WebKeyServiceRpcStatus + attr_accessor :code + + attr_accessor :message + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'details' => :'details' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'message' => :'String', + :'details' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::WebKeyServiceRpcStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::WebKeyServiceRpcStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message && + details == o.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, details].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/zitadelobjectv2_organization.rb b/lib/zitadel/client/models/zitadelobjectv2_organization.rb new file mode 100644 index 00000000..1e58f140 --- /dev/null +++ b/lib/zitadel/client/models/zitadelobjectv2_organization.rb @@ -0,0 +1,239 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Zitadelobjectv2Organization + attr_accessor :org_id + + attr_accessor :org_domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'org_id' => :'orgId', + :'org_domain' => :'orgDomain' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'org_id' => :'String', + :'org_domain' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Zitadelobjectv2Organization` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Zitadelobjectv2Organization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'org_id') + self.org_id = attributes[:'org_id'] + end + + if attributes.key?(:'org_domain') + self.org_domain = attributes[:'org_domain'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + org_id == o.org_id && + org_domain == o.org_domain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [org_id, org_domain].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/zitadelorgv2_organization.rb b/lib/zitadel/client/models/zitadelorgv2_organization.rb new file mode 100644 index 00000000..f8727a95 --- /dev/null +++ b/lib/zitadel/client/models/zitadelorgv2_organization.rb @@ -0,0 +1,293 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Zitadelorgv2Organization + # Unique identifier of the organization. + attr_accessor :id + + attr_accessor :details + + attr_accessor :state + + # Name of the organization. + attr_accessor :name + + # Primary domain used in the organization. + attr_accessor :primary_domain + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'details' => :'details', + :'state' => :'state', + :'name' => :'name', + :'primary_domain' => :'primaryDomain' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'details' => :'OrganizationServiceDetails', + :'state' => :'OrganizationServiceOrganizationState', + :'name' => :'String', + :'primary_domain' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Zitadelorgv2Organization` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Zitadelorgv2Organization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = 'ORGANIZATION_STATE_UNSPECIFIED' + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'primary_domain') + self.primary_domain = attributes[:'primary_domain'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + details == o.details && + state == o.state && + name == o.name && + primary_domain == o.primary_domain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, details, state, name, primary_domain].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end