From 9d1fa38f36f808a7390448b6b05d0cac56cb54e0 Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Tue, 3 Jun 2025 16:16:40 +0300 Subject: [PATCH 1/3] 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 -- .../client/api/settings_service_api.rb | 720 ---- 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 -- .../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 | 356 -- ...vice_get_organization_features_response.rb | 230 -- ...re_service_get_system_features_response.rb | 329 -- ...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 | 362 -- ..._service_set_instance_features_response.rb | 230 -- ...vice_set_organization_features_response.rb | 230 -- ...ure_service_set_system_features_request.rb | 332 -- ...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 | 305 -- ...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 -- 375 files changed, 93595 deletions(-) delete mode 100644 lib/zitadel/client/api/action_service_api.rb 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_service_api.rb delete mode 100644 lib/zitadel/client/api/user_service_api.rb delete mode 100644 lib/zitadel/client/api/web_key_service_api.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_condition.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_create_target_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_delete_target_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_event_execution.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_execution.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_function_execution.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_get_target_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_in_target_i_ds_filter.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_list_execution_functions_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_list_execution_methods_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_list_execution_services_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_list_executions_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_list_targets_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_pagination_request.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_pagination_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_r_e_s_t_call.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_r_e_s_t_webhook.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_request_execution.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_response_execution.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_set_execution_response.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_target.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_target_field_name.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_target_name_filter.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_target_search_filter.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_text_filter_method.rb delete mode 100644 lib/zitadel/client/models/action_service_beta_update_target_response.rb delete mode 100644 lib/zitadel/client/models/action_service_create_target_request.rb delete mode 100644 lib/zitadel/client/models/action_service_list_targets_request.rb delete mode 100644 lib/zitadel/client/models/action_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/action_service_rpc_status.rb delete mode 100644 lib/zitadel/client/models/action_service_set_execution_request.rb delete mode 100644 lib/zitadel/client/models/action_service_update_target_request.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/web_key_service_beta_activate_web_key_response.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_create_web_key_response.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_delete_web_key_response.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a_curve.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_list_web_keys_response.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_r_s_a.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_r_s_a_bits.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_r_s_a_hasher.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_state.rb delete mode 100644 lib/zitadel/client/models/web_key_service_beta_web_key.rb delete mode 100644 lib/zitadel/client/models/web_key_service_create_web_key_request.rb delete mode 100644 lib/zitadel/client/models/web_key_service_protobuf_any.rb delete mode 100644 lib/zitadel/client/models/web_key_service_rpc_status.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/action_service_api.rb b/lib/zitadel/client/api/action_service_api.rb deleted file mode 100644 index 87aaa3a1..00000000 --- a/lib/zitadel/client/api/action_service_api.rb +++ /dev/null @@ -1,670 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 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_service_api.rb b/lib/zitadel/client/api/settings_service_api.rb deleted file mode 100644 index 4cc7b6c1..00000000 --- a/lib/zitadel/client/api/settings_service_api.rb +++ /dev/null @@ -1,720 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 - - # 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::SettingsServiceApi.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::SettingsServiceApi.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::SettingsServiceApi#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::SettingsServiceApi.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::SettingsServiceApi.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::SettingsServiceApi.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::SettingsServiceApi#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/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/api/web_key_service_api.rb b/lib/zitadel/client/api/web_key_service_api.rb deleted file mode 100644 index d915ea69..00000000 --- a/lib/zitadel/client/api/web_key_service_api.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 '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 deleted file mode 100644 index 00189813..00000000 --- a/lib/zitadel/client/models/action_service_beta_condition.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 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 deleted file mode 100644 index bd5ecf14..00000000 --- a/lib/zitadel/client/models/action_service_beta_create_target_response.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 - 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 deleted file mode 100644 index d86214ef..00000000 --- a/lib/zitadel/client/models/action_service_beta_delete_target_response.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 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 deleted file mode 100644 index b199abc7..00000000 --- a/lib/zitadel/client/models/action_service_beta_event_execution.rb +++ /dev/null @@ -1,307 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 deleted file mode 100644 index e85cd986..00000000 --- a/lib/zitadel/client/models/action_service_beta_execution.rb +++ /dev/null @@ -1,262 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 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_function_execution.rb b/lib/zitadel/client/models/action_service_beta_function_execution.rb deleted file mode 100644 index 51c5e384..00000000 --- a/lib/zitadel/client/models/action_service_beta_function_execution.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 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 deleted file mode 100644 index 5e3227a9..00000000 --- a/lib/zitadel/client/models/action_service_beta_get_target_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 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 deleted file mode 100644 index 4522325d..00000000 --- a/lib/zitadel/client/models/action_service_beta_in_target_i_ds_filter.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 - 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 deleted file mode 100644 index 469086e5..00000000 --- a/lib/zitadel/client/models/action_service_beta_list_execution_functions_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 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 deleted file mode 100644 index 3e6fb174..00000000 --- a/lib/zitadel/client/models/action_service_beta_list_execution_methods_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 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 deleted file mode 100644 index a00b995a..00000000 --- a/lib/zitadel/client/models/action_service_beta_list_execution_services_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 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 deleted file mode 100644 index b8972fa2..00000000 --- a/lib/zitadel/client/models/action_service_beta_list_executions_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 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 deleted file mode 100644 index 980c2bc0..00000000 --- a/lib/zitadel/client/models/action_service_beta_list_targets_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 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 deleted file mode 100644 index c0c7142e..00000000 --- a/lib/zitadel/client/models/action_service_beta_pagination_request.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 - 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 deleted file mode 100644 index 1cbd0f72..00000000 --- a/lib/zitadel/client/models/action_service_beta_pagination_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 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 deleted file mode 100644 index 1e035b0b..00000000 --- a/lib/zitadel/client/models/action_service_beta_r_e_s_t_call.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 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 deleted file mode 100644 index b240b3ff..00000000 --- a/lib/zitadel/client/models/action_service_beta_r_e_s_t_webhook.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 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 deleted file mode 100644 index 6ad3094d..00000000 --- a/lib/zitadel/client/models/action_service_beta_request_execution.rb +++ /dev/null @@ -1,307 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 deleted file mode 100644 index f360a029..00000000 --- a/lib/zitadel/client/models/action_service_beta_response_execution.rb +++ /dev/null @@ -1,307 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 deleted file mode 100644 index f1ce19ba..00000000 --- a/lib/zitadel/client/models/action_service_beta_set_execution_response.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 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 deleted file mode 100644 index 03d8a74a..00000000 --- a/lib/zitadel/client/models/action_service_beta_target.rb +++ /dev/null @@ -1,315 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 deleted file mode 100644 index e2a98ce4..00000000 --- a/lib/zitadel/client/models/action_service_beta_target_field_name.rb +++ /dev/null @@ -1,48 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 deleted file mode 100644 index 3b6d0565..00000000 --- a/lib/zitadel/client/models/action_service_beta_target_name_filter.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 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 deleted file mode 100644 index 5c7a9841..00000000 --- a/lib/zitadel/client/models/action_service_beta_target_search_filter.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 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 deleted file mode 100644 index e4dfe39c..00000000 --- a/lib/zitadel/client/models/action_service_beta_text_filter_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 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 deleted file mode 100644 index 5d92e82d..00000000 --- a/lib/zitadel/client/models/action_service_beta_update_target_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 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 deleted file mode 100644 index d546bb8c..00000000 --- a/lib/zitadel/client/models/action_service_create_target_request.rb +++ /dev/null @@ -1,332 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 deleted file mode 100644 index bfd900d3..00000000 --- a/lib/zitadel/client/models/action_service_list_targets_request.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 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 deleted file mode 100644 index 6d6c2ac2..00000000 --- a/lib/zitadel/client/models/action_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 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 deleted file mode 100644 index 869834b9..00000000 --- a/lib/zitadel/client/models/action_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 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 deleted file mode 100644 index 7d51e6c2..00000000 --- a/lib/zitadel/client/models/action_service_set_execution_request.rb +++ /dev/null @@ -1,242 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 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 deleted file mode 100644 index efec5a09..00000000 --- a/lib/zitadel/client/models/action_service_update_target_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 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 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 44a7f246..00000000 --- a/lib/zitadel/client/models/feature_service_get_instance_features_response.rb +++ /dev/null @@ -1,356 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 :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', - :'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', - :'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?(:'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 && - 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, 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 399d5204..00000000 --- a/lib/zitadel/client/models/feature_service_get_system_features_response.rb +++ /dev/null @@ -1,329 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 :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', - :'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', - :'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?(:'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 && - 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, 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 c009abef..00000000 --- a/lib/zitadel/client/models/feature_service_set_instance_features_request.rb +++ /dev/null @@ -1,362 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 - - # 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', - :'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', - :'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?(:'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 && - 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, 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 aba2bc8a..00000000 --- a/lib/zitadel/client/models/feature_service_set_system_features_request.rb +++ /dev/null @@ -1,332 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 - - # 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', - :'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', - :'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?(:'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 && - 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, 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 f5fe83ac..00000000 --- a/lib/zitadel/client/models/identity_provider_service_s_a_m_l_config.rb +++ /dev/null @@ -1,305 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 - - # Boolean weather federated logout is enabled. If enabled, ZITADEL will send a logout request to the identity provider, if the user terminates the session in ZITADEL. Be sure to provide a SLO endpoint as part of the metadata. - attr_accessor :federated_logout_enabled - - 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', - :'federated_logout_enabled' => :'federatedLogoutEnabled' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns 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', - :'federated_logout_enabled' => :'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::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 - - if attributes.key?(:'federated_logout_enabled') - self.federated_logout_enabled = attributes[:'federated_logout_enabled'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - true - end - - # 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 && - federated_logout_enabled == o.federated_logout_enabled - end - - # @see the `==` method - # @param [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, federated_logout_enabled].hash - end - -# Builds the object from hash -# @param [Hash] attributes Models attributes in the form of hash -# @return [Object] Returns the model itself -def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) # `new` will call the initialize method of the specific model class. -end - -# Deserializes the data based on type -# @param string type Data type -# @param string value Value to be deserialized -# @return [Object] Deserialized data -def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name - # MODIFIED: Ensure model is looked up in the Models namespace - # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") - klass = Zitadel::Client::Models.const_get(type) - # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) - # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) - if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) - klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method - else - klass.build_from_hash(value) # For regular models - end - end -end - -# Returns the string representation of the object -# @return [String] String presentation of the object -def to_s - to_hash.to_s -end - -# to_body is an alias to to_hash (backward compatibility) -# @return [Hash] Returns the object in the form of hash -def to_body - to_hash -end - -# Returns the object in the form of hash -# @return [Hash] Returns the object in the form of hash -def to_hash - hash = {} # Calls super.to_hash if parent exists - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash -end - -# Outputs non-array value in the form of hash -# For object, use to_hash. Otherwise, just return the value -# @param [Object] value Any valid value -# @return [Hash] Returns the value in the form of hash -def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(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/web_key_service_beta_activate_web_key_response.rb b/lib/zitadel/client/models/web_key_service_beta_activate_web_key_response.rb deleted file mode 100644 index 3f3c8a5b..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_activate_web_key_response.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 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 deleted file mode 100644 index 01bcd248..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_create_web_key_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 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 deleted file mode 100644 index d70be513..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_delete_web_key_response.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 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 deleted file mode 100644 index 00f8cf5d..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a.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 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 deleted file mode 100644 index c43309f3..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_e_c_d_s_a_curve.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 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 deleted file mode 100644 index 839e2c5d..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_list_web_keys_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 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 deleted file mode 100644 index 21eb5539..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_r_s_a.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 - 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 deleted file mode 100644 index 1bfe8682..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_r_s_a_bits.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 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 deleted file mode 100644 index 69c484f8..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_r_s_a_hasher.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 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 deleted file mode 100644 index c659505e..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_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 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 deleted file mode 100644 index 8f4e4ce5..00000000 --- a/lib/zitadel/client/models/web_key_service_beta_web_key.rb +++ /dev/null @@ -1,289 +0,0 @@ -=begin -#Zitadel SDK - -#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - -The version of the OpenAPI document: 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 deleted file mode 100644 index ac528743..00000000 --- a/lib/zitadel/client/models/web_key_service_create_web_key_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 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 deleted file mode 100644 index d3264035..00000000 --- a/lib/zitadel/client/models/web_key_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 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 deleted file mode 100644 index dea0591d..00000000 --- a/lib/zitadel/client/models/web_key_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 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 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 657cb0283395da62953bcc1c16635069d2cbdaa3 Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Tue, 3 Jun 2025 16:16:55 +0300 Subject: [PATCH 2/3] chore: update generated output under .openapi markers --- .../client/api/beta_action_service_api.rb | 702 ++++ .../client/api/beta_feature_service_api.rb | 814 +++++ .../client/api/beta_o_i_d_c_service_api.rb | 154 + .../api/beta_organization_service_api.rb | 90 + .../client/api/beta_session_service_api.rb | 362 ++ .../client/api/beta_settings_service_api.rb | 770 +++++ .../client/api/beta_user_service_api.rb | 2334 +++++++++++++ .../client/api/beta_web_key_service_api.rb | 294 ++ lib/zitadel/client/api/feature_service_api.rb | 838 +++++ .../api/identity_provider_service_api.rb | 90 + lib/zitadel/client/api/o_i_d_c_service_api.rb | 290 ++ .../client/api/organization_service_api.rb | 158 + lib/zitadel/client/api/s_a_m_l_service_api.rb | 154 + lib/zitadel/client/api/session_service_api.rb | 362 ++ .../client/api/settings_service_api.rb | 770 +++++ lib/zitadel/client/api/user_service_api.rb | 3080 +++++++++++++++++ lib/zitadel/client/models/and_query.rb | 247 ++ lib/zitadel/client/models/and_query1.rb | 247 ++ lib/zitadel/client/models/apple.rb | 247 ++ lib/zitadel/client/models/auth_url.rb | 247 ++ lib/zitadel/client/models/azure_ad.rb | 247 ++ .../client/models/beta_action_service_any.rb | 251 ++ .../models/beta_action_service_condition.rb | 112 + .../beta_action_service_connect_error.rb | 285 ++ ...ta_action_service_create_target_request.rb | 111 + ...a_action_service_create_target_response.rb | 251 ++ ...ta_action_service_delete_target_request.rb | 247 ++ ...a_action_service_delete_target_response.rb | 231 ++ .../models/beta_action_service_execution.rb | 262 ++ ...eta_action_service_execution_field_name.rb | 43 + ..._action_service_execution_search_filter.rb | 111 + .../beta_action_service_get_target_request.rb | 230 ++ ...beta_action_service_get_target_response.rb | 230 ++ ...rvice_list_execution_functions_response.rb | 233 ++ ...service_list_execution_methods_response.rb | 233 ++ ...ervice_list_execution_services_response.rb | 233 ++ ..._action_service_list_executions_request.rb | 273 ++ ...action_service_list_executions_response.rb | 241 ++ ...eta_action_service_list_targets_request.rb | 273 ++ ...ta_action_service_list_targets_response.rb | 241 ++ .../beta_action_service_pagination_request.rb | 252 ++ ...beta_action_service_pagination_response.rb | 243 ++ ...ta_action_service_set_execution_request.rb | 242 ++ ...a_action_service_set_execution_response.rb | 231 ++ .../models/beta_action_service_target.rb | 111 + .../beta_action_service_target_field_name.rb | 48 + ...eta_action_service_target_search_filter.rb | 110 + ...ta_action_service_update_target_request.rb | 111 + ...a_action_service_update_target_response.rb | 242 ++ .../client/models/beta_feature_service_any.rb | 251 ++ .../beta_feature_service_connect_error.rb | 285 ++ .../models/beta_feature_service_details.rb | 262 ++ .../beta_feature_service_feature_flag.rb | 262 ++ ...e_service_get_instance_features_request.rb | 230 ++ ..._service_get_instance_features_response.rb | 311 ++ ...rvice_get_organization_features_request.rb | 239 ++ ...vice_get_organization_features_response.rb | 230 ++ ...re_service_get_system_features_response.rb | 293 ++ ...ature_service_get_user_features_request.rb | 239 ++ ...ture_service_get_user_features_response.rb | 230 ++ ...ta_feature_service_improved_performance.rb | 45 + ...rvice_improved_performance_feature_flag.rb | 263 ++ ...ervice_reset_instance_features_response.rb | 230 ++ ...ice_reset_organization_features_request.rb | 230 ++ ...ce_reset_organization_features_response.rb | 230 ++ ..._service_reset_system_features_response.rb | 230 ++ ...ure_service_reset_user_features_request.rb | 230 ++ ...re_service_reset_user_features_response.rb | 230 ++ ...e_service_set_instance_features_request.rb | 312 ++ ..._service_set_instance_features_response.rb | 230 ++ ...rvice_set_organization_features_request.rb | 230 ++ ...vice_set_organization_features_response.rb | 230 ++ ...ure_service_set_system_features_request.rb | 292 ++ ...re_service_set_system_features_response.rb | 230 ++ ...eature_service_set_user_feature_request.rb | 230 ++ ...ture_service_set_user_features_response.rb | 230 ++ .../models/beta_feature_service_source.rb | 46 + .../client/models/beta_o_i_d_c_service_any.rb | 251 ++ .../beta_o_i_d_c_service_auth_request.rb | 321 ++ .../beta_o_i_d_c_service_connect_error.rb | 285 ++ ..._i_d_c_service_create_callback_response.rb | 239 ++ .../models/beta_o_i_d_c_service_details.rb | 262 ++ ..._i_d_c_service_get_auth_request_request.rb | 230 ++ ...i_d_c_service_get_auth_request_response.rb | 230 ++ .../models/beta_o_i_d_c_service_prompt.rb | 45 + ...ta_oidc_service_create_callback_request.rb | 110 + ...zation_service_add_organization_request.rb | 258 ++ ...ation_service_add_organization_response.rb | 250 ++ .../models/beta_organization_service_admin.rb | 110 + .../models/beta_organization_service_any.rb | 251 ++ ...beta_organization_service_connect_error.rb | 285 ++ ...beta_organization_service_created_admin.rb | 250 ++ .../beta_organization_service_details.rb | 262 ++ .../client/models/beta_session_service_any.rb | 251 ++ .../models/beta_session_service_challenges.rb | 250 ++ ...beta_session_service_check_i_d_p_intent.rb | 239 ++ .../beta_session_service_check_o_t_p.rb | 230 ++ .../beta_session_service_check_password.rb | 230 ++ .../beta_session_service_check_t_o_t_p.rb | 230 ++ .../models/beta_session_service_check_user.rb | 110 + .../beta_session_service_check_web_auth_n.rb | 250 ++ .../models/beta_session_service_checks.rb | 284 ++ .../beta_session_service_connect_error.rb | 285 ++ ..._session_service_create_session_request.rb | 269 ++ ...session_service_create_session_response.rb | 257 ++ ..._session_service_delete_session_request.rb | 240 ++ ...session_service_delete_session_response.rb | 230 ++ .../models/beta_session_service_details.rb | 262 ++ .../models/beta_session_service_factors.rb | 284 ++ ...eta_session_service_get_session_request.rb | 240 ++ ...ta_session_service_get_session_response.rb | 230 ++ .../beta_session_service_header_values.rb | 233 ++ .../beta_session_service_intent_factor.rb | 231 ++ .../beta_session_service_list_details.rb | 251 ++ .../models/beta_session_service_list_query.rb | 249 ++ ...a_session_service_list_sessions_request.rb | 272 ++ ..._session_service_list_sessions_response.rb | 241 ++ .../beta_session_service_o_t_p_factor.rb | 231 ++ .../beta_session_service_o_t_p_s_m_s.rb | 230 ++ .../models/beta_session_service_otp_email.rb | 110 + .../beta_session_service_password_factor.rb | 231 ++ ...beta_session_service_request_challenges.rb | 248 ++ .../beta_session_service_search_query.rb | 111 + .../models/beta_session_service_session.rb | 299 ++ ...beta_session_service_session_field_name.rb | 41 + ...eta_session_service_set_session_request.rb | 278 ++ ...ta_session_service_set_session_response.rb | 248 ++ .../beta_session_service_t_o_t_p_factor.rb | 231 ++ .../models/beta_session_service_user_agent.rb | 262 ++ .../beta_session_service_user_factor.rb | 267 ++ ...n_service_user_verification_requirement.rb | 43 + .../models/beta_session_service_value.rb | 114 + .../models/beta_session_service_web_auth_n.rb | 295 ++ .../beta_session_service_web_auth_n_factor.rb | 240 ++ .../models/beta_settings_service_any.rb | 251 ++ ...beta_settings_service_branding_settings.rb | 307 ++ .../beta_settings_service_connect_error.rb | 285 ++ .../models/beta_settings_service_details.rb | 262 ++ .../beta_settings_service_domain_settings.rb | 279 ++ ...ttings_service_embedded_iframe_settings.rb | 241 ++ ...e_get_active_identity_providers_request.rb | 230 ++ ..._get_active_identity_providers_response.rb | 241 ++ ...s_service_get_branding_settings_request.rb | 230 ++ ..._service_get_branding_settings_response.rb | 239 ++ ...ngs_service_get_domain_settings_request.rb | 230 ++ ...gs_service_get_domain_settings_response.rb | 239 ++ ...s_service_get_general_settings_response.rb | 250 ++ ..._get_legal_and_support_settings_request.rb | 230 ++ ...get_legal_and_support_settings_response.rb | 239 ++ ...gs_service_get_lockout_settings_request.rb | 230 ++ ...s_service_get_lockout_settings_response.rb | 239 ++ ...ings_service_get_login_settings_request.rb | 230 ++ ...ngs_service_get_login_settings_response.rb | 239 ++ ...et_password_complexity_settings_request.rb | 230 ++ ...t_password_complexity_settings_response.rb | 239 ++ ...ce_get_password_expiry_settings_request.rb | 230 ++ ...e_get_password_expiry_settings_response.rb | 239 ++ ..._service_get_security_settings_response.rb | 239 ++ ...beta_settings_service_identity_provider.rb | 270 ++ ...settings_service_identity_provider_type.rb | 51 + ...ings_service_legal_and_support_settings.rb | 315 ++ .../beta_settings_service_list_details.rb | 251 ++ .../beta_settings_service_lockout_settings.rb | 272 ++ .../beta_settings_service_login_settings.rb | 433 +++ ...beta_settings_service_multi_factor_type.rb | 41 + .../beta_settings_service_passkeys_type.rb | 41 + ...gs_service_password_complexity_settings.rb | 298 ++ ...ttings_service_password_expiry_settings.rb | 274 ++ .../beta_settings_service_request_context.rb | 110 + ...ta_settings_service_resource_owner_type.rb | 42 + ...eta_settings_service_second_factor_type.rb | 44 + ...beta_settings_service_security_settings.rb | 239 ++ ...s_service_set_security_settings_request.rb | 239 ++ ..._service_set_security_settings_response.rb | 230 ++ .../models/beta_settings_service_theme.rb | 281 ++ .../beta_settings_service_theme_mode.rb | 43 + ...eta_user_service_add_human_user_request.rb | 110 + ...ta_user_service_add_human_user_response.rb | 259 ++ ...eta_user_service_add_i_d_p_link_request.rb | 256 ++ ...ta_user_service_add_i_d_p_link_response.rb | 230 ++ ...ta_user_service_add_o_t_p_email_request.rb | 247 ++ ...a_user_service_add_o_t_p_email_response.rb | 230 ++ ...ta_user_service_add_o_t_p_s_m_s_request.rb | 247 ++ ...a_user_service_add_o_t_p_s_m_s_response.rb | 230 ++ .../client/models/beta_user_service_any.rb | 251 ++ ...user_service_authentication_method_type.rb | 47 + .../models/beta_user_service_connect_error.rb | 285 ++ ...reate_passkey_registration_link_request.rb | 110 + ...eate_passkey_registration_link_response.rb | 239 ++ ...ta_user_service_deactivate_user_request.rb | 247 ++ ...a_user_service_deactivate_user_response.rb | 230 ++ .../beta_user_service_delete_user_request.rb | 247 ++ .../beta_user_service_delete_user_response.rb | 230 ++ .../models/beta_user_service_details.rb | 262 ++ .../client/models/beta_user_service_gender.rb | 43 + ...ta_user_service_get_user_by_i_d_request.rb | 247 ++ ...a_user_service_get_user_by_i_d_response.rb | 239 ++ .../beta_user_service_hashed_password.rb | 256 ++ .../models/beta_user_service_i_d_p_link.rb | 248 ++ .../beta_user_service_idp_information.rb | 111 + ...ist_authentication_method_types_request.rb | 247 ++ ...st_authentication_method_types_response.rb | 241 ++ .../models/beta_user_service_list_details.rb | 251 ++ .../models/beta_user_service_list_query.rb | 249 ++ .../beta_user_service_list_users_request.rb | 273 ++ .../beta_user_service_list_users_response.rb | 272 ++ .../beta_user_service_lock_user_request.rb | 247 ++ .../beta_user_service_lock_user_response.rb | 230 ++ .../models/beta_user_service_organization.rb | 110 + ...beta_user_service_passkey_authenticator.rb | 42 + ..._user_service_passkey_registration_code.rb | 273 ++ .../models/beta_user_service_password.rb | 256 ++ ...eta_user_service_password_reset_request.rb | 110 + ...ta_user_service_password_reset_response.rb | 241 ++ ...ta_user_service_reactivate_user_request.rb | 247 ++ ...a_user_service_reactivate_user_response.rb | 230 ++ ...a_user_service_register_passkey_request.rb | 296 ++ ..._user_service_register_passkey_response.rb | 251 ++ ...a_user_service_register_t_o_t_p_request.rb | 247 ++ ..._user_service_register_t_o_t_p_response.rb | 248 ++ ...beta_user_service_register_u2_f_request.rb | 256 ++ ...eta_user_service_register_u2_f_response.rb | 251 ++ ...user_service_remove_o_t_p_email_request.rb | 247 ++ ...ser_service_remove_o_t_p_email_response.rb | 230 ++ ...user_service_remove_o_t_p_s_m_s_request.rb | 247 ++ ...ser_service_remove_o_t_p_s_m_s_response.rb | 230 ++ .../beta_user_service_remove_phone_request.rb | 247 ++ ...beta_user_service_remove_phone_response.rb | 230 ++ ...eta_user_service_remove_t_o_t_p_request.rb | 247 ++ ...ta_user_service_remove_t_o_t_p_response.rb | 230 ++ ..._user_service_resend_email_code_request.rb | 110 + ...user_service_resend_email_code_response.rb | 241 ++ ..._user_service_resend_phone_code_request.rb | 110 + ...user_service_resend_phone_code_response.rb | 241 ++ ...trieve_identity_provider_intent_request.rb | 239 ++ ...rieve_identity_provider_intent_response.rb | 248 ++ .../models/beta_user_service_search_query.rb | 124 + .../beta_user_service_set_email_request.rb | 111 + .../beta_user_service_set_email_response.rb | 241 ++ .../beta_user_service_set_human_email.rb | 111 + .../beta_user_service_set_human_phone.rb | 111 + .../beta_user_service_set_human_profile.rb | 334 ++ .../beta_user_service_set_metadata_entry.rb | 273 ++ .../models/beta_user_service_set_password.rb | 325 ++ .../beta_user_service_set_password_request.rb | 110 + ...beta_user_service_set_password_response.rb | 230 ++ .../beta_user_service_set_phone_request.rb | 111 + .../beta_user_service_set_phone_response.rb | 241 ++ ..._start_identity_provider_intent_request.rb | 110 + ...start_identity_provider_intent_response.rb | 111 + .../beta_user_service_unlock_user_request.rb | 247 ++ .../beta_user_service_unlock_user_response.rb | 230 ++ ..._user_service_update_human_user_request.rb | 276 ++ ...user_service_update_human_user_response.rb | 250 ++ .../client/models/beta_user_service_user.rb | 110 + .../beta_user_service_user_field_name.rb | 49 + .../models/beta_user_service_user_state.rb | 45 + .../client/models/beta_user_service_value.rb | 114 + .../beta_user_service_verify_email_request.rb | 273 ++ ...beta_user_service_verify_email_response.rb | 230 ++ ...ice_verify_passkey_registration_request.rb | 328 ++ ...ce_verify_passkey_registration_response.rb | 230 ++ .../beta_user_service_verify_phone_request.rb | 273 ++ ...beta_user_service_verify_phone_response.rb | 230 ++ ...ice_verify_t_o_t_p_registration_request.rb | 273 ++ ...ce_verify_t_o_t_p_registration_response.rb | 230 ++ ...ervice_verify_u2_f_registration_request.rb | 328 ++ ...rvice_verify_u2_f_registration_response.rb | 230 ++ ...eb_key_service_activate_web_key_request.rb | 247 ++ ...b_key_service_activate_web_key_response.rb | 231 ++ .../client/models/beta_web_key_service_any.rb | 251 ++ .../beta_web_key_service_connect_error.rb | 285 ++ ..._web_key_service_create_web_key_request.rb | 111 + ...web_key_service_create_web_key_response.rb | 241 ++ ..._web_key_service_delete_web_key_request.rb | 247 ++ ...web_key_service_delete_web_key_response.rb | 231 ++ ..._web_key_service_list_web_keys_response.rb | 232 ++ .../models/beta_web_key_service_state.rb | 44 + .../models/beta_web_key_service_web_key.rb | 111 + .../client/models/creation_date_query.rb | 247 ++ .../client/models/creation_date_query1.rb | 247 ++ lib/zitadel/client/models/creator_query.rb | 247 ++ lib/zitadel/client/models/current_password.rb | 247 ++ lib/zitadel/client/models/default_query.rb | 247 ++ lib/zitadel/client/models/deny.rb | 247 ++ .../client/models/display_name_query.rb | 247 ++ .../client/models/display_name_query1.rb | 247 ++ lib/zitadel/client/models/domain_query.rb | 247 ++ lib/zitadel/client/models/ecdsa.rb | 247 ++ lib/zitadel/client/models/ed25519.rb | 247 ++ lib/zitadel/client/models/email_query.rb | 247 ++ lib/zitadel/client/models/email_query1.rb | 247 ++ lib/zitadel/client/models/error.rb | 247 ++ lib/zitadel/client/models/error1.rb | 247 ++ lib/zitadel/client/models/error2.rb | 247 ++ lib/zitadel/client/models/event.rb | 247 ++ .../client/models/execution_type_filter.rb | 247 ++ .../client/models/feature_service_any.rb | 251 ++ .../models/feature_service_connect_error.rb | 285 ++ .../client/models/feature_service_details.rb | 262 ++ .../models/feature_service_feature_flag.rb | 262 ++ ...e_service_get_instance_features_request.rb | 230 ++ ..._service_get_instance_features_response.rb | 356 ++ ...rvice_get_organization_features_request.rb | 239 ++ ...vice_get_organization_features_response.rb | 230 ++ ...re_service_get_system_features_response.rb | 329 ++ ...ature_service_get_user_features_request.rb | 239 ++ ...ture_service_get_user_features_response.rb | 230 ++ .../feature_service_improved_performance.rb | 45 + ...rvice_improved_performance_feature_flag.rb | 263 ++ .../client/models/feature_service_login_v2.rb | 242 ++ .../feature_service_login_v2_feature_flag.rb | 271 ++ ...ervice_reset_instance_features_response.rb | 230 ++ ...ice_reset_organization_features_request.rb | 230 ++ ...ce_reset_organization_features_response.rb | 230 ++ ..._service_reset_system_features_response.rb | 230 ++ ...ure_service_reset_user_features_request.rb | 230 ++ ...re_service_reset_user_features_response.rb | 230 ++ ...e_service_set_instance_features_request.rb | 361 ++ ..._service_set_instance_features_response.rb | 230 ++ ...rvice_set_organization_features_request.rb | 230 ++ ...vice_set_organization_features_response.rb | 230 ++ ...ure_service_set_system_features_request.rb | 331 ++ ...re_service_set_system_features_response.rb | 230 ++ ...eature_service_set_user_feature_request.rb | 230 ++ ...ture_service_set_user_features_response.rb | 230 ++ .../client/models/feature_service_source.rb | 46 + lib/zitadel/client/models/first_name_query.rb | 247 ++ .../client/models/first_name_query1.rb | 247 ++ lib/zitadel/client/models/function.rb | 247 ++ lib/zitadel/client/models/github.rb | 247 ++ lib/zitadel/client/models/github_es.rb | 247 ++ lib/zitadel/client/models/gitlab.rb | 247 ++ .../client/models/gitlab_self_hosted.rb | 247 ++ lib/zitadel/client/models/google.rb | 247 ++ lib/zitadel/client/models/hashed_password.rb | 247 ++ lib/zitadel/client/models/hashed_password1.rb | 247 ++ lib/zitadel/client/models/human.rb | 247 ++ lib/zitadel/client/models/human1.rb | 247 ++ lib/zitadel/client/models/human2.rb | 247 ++ lib/zitadel/client/models/id_query.rb | 247 ++ .../models/identity_provider_service_any.rb | 251 ++ ...ty_provider_service_auto_linking_option.rb | 42 + ...identity_provider_service_connect_error.rb | 285 ++ .../identity_provider_service_details.rb | 262 ++ ...ovider_service_get_i_d_p_by_i_d_request.rb | 230 ++ ...vider_service_get_i_d_p_by_i_d_response.rb | 230 ++ .../models/identity_provider_service_i_d_p.rb | 298 ++ .../identity_provider_service_i_d_p_state.rb | 44 + .../identity_provider_service_i_d_p_type.rb | 52 + .../identity_provider_service_idp_config.rb | 120 + .../identity_provider_service_options.rb | 292 ++ lib/zitadel/client/models/idp_intent.rb | 247 ++ lib/zitadel/client/models/idp_intent1.rb | 247 ++ lib/zitadel/client/models/ids_query.rb | 247 ++ lib/zitadel/client/models/ids_query1.rb | 247 ++ .../client/models/in_conditions_filter.rb | 247 ++ .../client/models/in_target_ids_filter.rb | 247 ++ .../client/models/in_user_emails_query.rb | 247 ++ .../client/models/in_user_emails_query1.rb | 247 ++ .../client/models/in_user_ids_query.rb | 247 ++ .../client/models/in_user_ids_query1.rb | 247 ++ lib/zitadel/client/models/instance.rb | 247 ++ lib/zitadel/client/models/is_verified.rb | 247 ++ lib/zitadel/client/models/jwt.rb | 247 ++ lib/zitadel/client/models/last_name_query.rb | 247 ++ lib/zitadel/client/models/last_name_query1.rb | 247 ++ lib/zitadel/client/models/ldap.rb | 247 ++ lib/zitadel/client/models/ldap1.rb | 247 ++ lib/zitadel/client/models/ldap2.rb | 247 ++ lib/zitadel/client/models/ldap3.rb | 247 ++ lib/zitadel/client/models/ldap4.rb | 247 ++ lib/zitadel/client/models/login_name.rb | 247 ++ lib/zitadel/client/models/login_name_query.rb | 247 ++ .../client/models/login_name_query1.rb | 247 ++ lib/zitadel/client/models/machine.rb | 247 ++ lib/zitadel/client/models/name_query.rb | 247 ++ lib/zitadel/client/models/nick_name_query.rb | 247 ++ lib/zitadel/client/models/nick_name_query1.rb | 247 ++ lib/zitadel/client/models/not_query.rb | 247 ++ lib/zitadel/client/models/not_query1.rb | 247 ++ .../client/models/o_i_d_c_service_any.rb | 251 ++ .../models/o_i_d_c_service_auth_request.rb | 321 ++ .../models/o_i_d_c_service_connect_error.rb | 285 ++ ..._i_d_c_service_create_callback_response.rb | 239 ++ .../client/models/o_i_d_c_service_details.rb | 262 ++ ..._c_service_device_authorization_request.rb | 273 ++ ..._i_d_c_service_get_auth_request_request.rb | 230 ++ ...i_d_c_service_get_auth_request_response.rb | 230 ++ ...et_device_authorization_request_request.rb | 231 ++ ...t_device_authorization_request_response.rb | 230 ++ .../client/models/o_i_d_c_service_prompt.rb | 45 + lib/zitadel/client/models/oauth.rb | 247 ++ lib/zitadel/client/models/oauth1.rb | 247 ++ lib/zitadel/client/models/oauth2.rb | 247 ++ lib/zitadel/client/models/oidc.rb | 247 ++ ...ze_or_deny_device_authorization_request.rb | 110 + .../oidc_service_create_callback_request.rb | 110 + lib/zitadel/client/models/or_query.rb | 247 ++ lib/zitadel/client/models/or_query1.rb | 247 ++ lib/zitadel/client/models/org_domain.rb | 247 ++ lib/zitadel/client/models/org_id.rb | 247 ++ .../client/models/organization_id_query.rb | 247 ++ .../client/models/organization_id_query1.rb | 247 ++ ...zation_service_add_organization_request.rb | 258 ++ ...ation_service_add_organization_response.rb | 250 ++ .../models/organization_service_admin.rb | 110 + .../client/models/organization_service_any.rb | 251 ++ .../organization_service_connect_error.rb | 285 ++ .../organization_service_created_admin.rb | 250 ++ .../models/organization_service_details.rb | 262 ++ .../organization_service_list_details.rb | 251 ++ ...tion_service_list_organizations_request.rb | 273 ++ ...ion_service_list_organizations_response.rb | 272 ++ .../models/organization_service_list_query.rb | 249 ++ .../organization_service_organization.rb | 291 ++ ...ization_service_organization_field_name.rb | 41 + ...organization_service_organization_state.rb | 43 + .../organization_service_search_query.rb | 113 + lib/zitadel/client/models/otp.rb | 247 ++ lib/zitadel/client/models/otp_email.rb | 247 ++ lib/zitadel/client/models/otp_sms.rb | 247 ++ lib/zitadel/client/models/password.rb | 247 ++ lib/zitadel/client/models/password1.rb | 247 ++ lib/zitadel/client/models/phone_query.rb | 247 ++ lib/zitadel/client/models/phone_query1.rb | 247 ++ lib/zitadel/client/models/post.rb | 247 ++ lib/zitadel/client/models/post_form.rb | 247 ++ lib/zitadel/client/models/redirect.rb | 247 ++ lib/zitadel/client/models/request.rb | 247 ++ lib/zitadel/client/models/response.rb | 247 ++ lib/zitadel/client/models/rest_async.rb | 247 ++ lib/zitadel/client/models/rest_call.rb | 247 ++ lib/zitadel/client/models/rest_webhook.rb | 247 ++ lib/zitadel/client/models/return_code.rb | 247 ++ lib/zitadel/client/models/return_code1.rb | 247 ++ lib/zitadel/client/models/return_code10.rb | 247 ++ lib/zitadel/client/models/return_code2.rb | 247 ++ lib/zitadel/client/models/return_code3.rb | 247 ++ lib/zitadel/client/models/return_code4.rb | 247 ++ lib/zitadel/client/models/return_code5.rb | 247 ++ lib/zitadel/client/models/return_code6.rb | 247 ++ lib/zitadel/client/models/return_code7.rb | 247 ++ lib/zitadel/client/models/return_code8.rb | 247 ++ lib/zitadel/client/models/return_code9.rb | 247 ++ lib/zitadel/client/models/rsa.rb | 247 ++ .../client/models/s_a_m_l_service_any.rb | 251 ++ .../models/s_a_m_l_service_connect_error.rb | 285 ++ .../client/models/s_a_m_l_service_details.rb | 262 ++ ...m_l_service_get_s_a_m_l_request_request.rb | 231 ++ ..._l_service_get_s_a_m_l_request_response.rb | 230 ++ .../models/s_a_m_l_service_s_a_m_l_request.rb | 276 ++ lib/zitadel/client/models/saml.rb | 247 ++ lib/zitadel/client/models/saml1.rb | 247 ++ lib/zitadel/client/models/saml2.rb | 247 ++ .../saml_service_create_response_request.rb | 110 + .../saml_service_create_response_response.rb | 110 + lib/zitadel/client/models/send_code.rb | 247 ++ lib/zitadel/client/models/send_code1.rb | 247 ++ lib/zitadel/client/models/send_code2.rb | 247 ++ lib/zitadel/client/models/send_code3.rb | 247 ++ lib/zitadel/client/models/send_code4.rb | 247 ++ lib/zitadel/client/models/send_code5.rb | 247 ++ lib/zitadel/client/models/send_code6.rb | 247 ++ lib/zitadel/client/models/send_link.rb | 247 ++ lib/zitadel/client/models/send_link1.rb | 247 ++ lib/zitadel/client/models/send_link2.rb | 247 ++ lib/zitadel/client/models/send_link3.rb | 247 ++ lib/zitadel/client/models/session.rb | 247 ++ lib/zitadel/client/models/session1.rb | 247 ++ lib/zitadel/client/models/session2.rb | 247 ++ .../client/models/session_service_any.rb | 251 ++ .../models/session_service_challenges.rb | 250 ++ .../session_service_check_i_d_p_intent.rb | 239 ++ .../models/session_service_check_o_t_p.rb | 230 ++ .../models/session_service_check_password.rb | 230 ++ .../models/session_service_check_t_o_t_p.rb | 230 ++ .../models/session_service_check_user.rb | 110 + .../session_service_check_web_auth_n.rb | 250 ++ .../client/models/session_service_checks.rb | 284 ++ .../models/session_service_connect_error.rb | 285 ++ .../session_service_create_session_request.rb | 269 ++ ...session_service_create_session_response.rb | 257 ++ .../session_service_delete_session_request.rb | 240 ++ ...session_service_delete_session_response.rb | 230 ++ .../client/models/session_service_details.rb | 262 ++ .../client/models/session_service_factors.rb | 284 ++ .../session_service_get_session_request.rb | 240 ++ .../session_service_get_session_response.rb | 230 ++ .../models/session_service_header_values.rb | 233 ++ .../models/session_service_intent_factor.rb | 231 ++ .../models/session_service_list_details.rb | 251 ++ .../models/session_service_list_query.rb | 249 ++ .../session_service_list_sessions_request.rb | 272 ++ .../session_service_list_sessions_response.rb | 241 ++ .../models/session_service_o_t_p_factor.rb | 231 ++ .../models/session_service_o_t_p_s_m_s.rb | 230 ++ .../models/session_service_otp_email.rb | 110 + .../models/session_service_password_factor.rb | 231 ++ .../session_service_request_challenges.rb | 248 ++ .../models/session_service_search_query.rb | 113 + .../client/models/session_service_session.rb | 299 ++ .../session_service_session_field_name.rb | 41 + .../session_service_set_session_request.rb | 278 ++ .../session_service_set_session_response.rb | 248 ++ .../models/session_service_t_o_t_p_factor.rb | 231 ++ .../models/session_service_user_agent.rb | 262 ++ .../models/session_service_user_factor.rb | 267 ++ ...n_service_user_verification_requirement.rb | 43 + .../client/models/session_service_value.rb | 114 + .../models/session_service_web_auth_n.rb | 295 ++ .../session_service_web_auth_n_factor.rb | 240 ++ .../client/models/settings_service_any.rb | 251 ++ .../settings_service_auto_linking_option.rb | 42 + .../settings_service_branding_settings.rb | 307 ++ .../models/settings_service_connect_error.rb | 285 ++ .../client/models/settings_service_details.rb | 262 ++ .../settings_service_domain_settings.rb | 279 ++ ...ttings_service_embedded_iframe_settings.rb | 241 ++ ...e_get_active_identity_providers_request.rb | 270 ++ ..._get_active_identity_providers_response.rb | 241 ++ ...s_service_get_branding_settings_request.rb | 230 ++ ..._service_get_branding_settings_response.rb | 239 ++ ...ngs_service_get_domain_settings_request.rb | 230 ++ ...gs_service_get_domain_settings_response.rb | 239 ++ ...s_service_get_general_settings_response.rb | 250 ++ ..._get_legal_and_support_settings_request.rb | 230 ++ ...get_legal_and_support_settings_response.rb | 239 ++ ...gs_service_get_lockout_settings_request.rb | 230 ++ ...s_service_get_lockout_settings_response.rb | 239 ++ ...ings_service_get_login_settings_request.rb | 230 ++ ...ngs_service_get_login_settings_response.rb | 239 ++ ...et_password_complexity_settings_request.rb | 230 ++ ...t_password_complexity_settings_response.rb | 239 ++ ...ce_get_password_expiry_settings_request.rb | 230 ++ ...e_get_password_expiry_settings_response.rb | 239 ++ ..._service_get_security_settings_response.rb | 239 ++ .../settings_service_identity_provider.rb | 279 ++ ...settings_service_identity_provider_type.rb | 52 + ...ings_service_legal_and_support_settings.rb | 315 ++ .../models/settings_service_list_details.rb | 251 ++ .../settings_service_lockout_settings.rb | 272 ++ .../models/settings_service_login_settings.rb | 433 +++ .../settings_service_multi_factor_type.rb | 41 + .../client/models/settings_service_options.rb | 292 ++ .../models/settings_service_passkeys_type.rb | 41 + ...gs_service_password_complexity_settings.rb | 298 ++ ...ttings_service_password_expiry_settings.rb | 274 ++ .../settings_service_request_context.rb | 110 + .../settings_service_resource_owner_type.rb | 42 + .../settings_service_second_factor_type.rb | 44 + .../settings_service_security_settings.rb | 239 ++ ...s_service_set_security_settings_request.rb | 239 ++ ..._service_set_security_settings_response.rb | 230 ++ .../client/models/settings_service_theme.rb | 281 ++ .../models/settings_service_theme_mode.rb | 43 + lib/zitadel/client/models/state_query.rb | 247 ++ lib/zitadel/client/models/state_query1.rb | 247 ++ lib/zitadel/client/models/state_query2.rb | 247 ++ lib/zitadel/client/models/target_filter.rb | 247 ++ .../client/models/target_name_filter.rb | 247 ++ lib/zitadel/client/models/type_query.rb | 247 ++ lib/zitadel/client/models/type_query1.rb | 247 ++ lib/zitadel/client/models/u2f.rb | 247 ++ lib/zitadel/client/models/urls.rb | 247 ++ lib/zitadel/client/models/urls1.rb | 247 ++ lib/zitadel/client/models/user_agent_query.rb | 247 ++ lib/zitadel/client/models/user_id.rb | 247 ++ lib/zitadel/client/models/user_id_query.rb | 247 ++ lib/zitadel/client/models/user_id_query1.rb | 247 ++ lib/zitadel/client/models/user_name_query.rb | 247 ++ lib/zitadel/client/models/user_name_query1.rb | 247 ++ .../models/user_service_access_token_type.rb | 41 + .../user_service_add_human_user_request.rb | 110 + .../user_service_add_human_user_response.rb | 259 ++ .../user_service_add_i_d_p_link_request.rb | 256 ++ .../user_service_add_i_d_p_link_response.rb | 230 ++ .../user_service_add_o_t_p_email_request.rb | 247 ++ .../user_service_add_o_t_p_email_response.rb | 230 ++ .../user_service_add_o_t_p_s_m_s_request.rb | 247 ++ .../user_service_add_o_t_p_s_m_s_response.rb | 230 ++ lib/zitadel/client/models/user_service_any.rb | 251 ++ .../client/models/user_service_auth_factor.rb | 112 + .../models/user_service_auth_factor_state.rb | 43 + .../models/user_service_auth_factors.rb | 43 + ...user_service_authentication_method_type.rb | 47 + .../models/user_service_connect_error.rb | 285 ++ ...user_service_create_invite_code_request.rb | 110 + ...ser_service_create_invite_code_response.rb | 241 ++ ...reate_passkey_registration_link_request.rb | 110 + ...eate_passkey_registration_link_response.rb | 239 ++ .../user_service_deactivate_user_request.rb | 247 ++ .../user_service_deactivate_user_response.rb | 230 ++ .../user_service_delete_user_request.rb | 247 ++ .../user_service_delete_user_response.rb | 230 ++ .../client/models/user_service_details.rb | 262 ++ .../models/user_service_domain_query.rb | 241 ++ .../client/models/user_service_gender.rb | 43 + .../user_service_get_user_by_i_d_request.rb | 247 ++ .../user_service_get_user_by_i_d_response.rb | 239 ++ .../models/user_service_hashed_password.rb | 256 ++ .../client/models/user_service_human_email.rb | 239 ++ ...ervice_human_m_f_a_init_skipped_request.rb | 247 ++ ...rvice_human_m_f_a_init_skipped_response.rb | 230 ++ .../client/models/user_service_human_phone.rb | 239 ++ .../models/user_service_human_profile.rb | 309 ++ .../client/models/user_service_human_user.rb | 351 ++ .../client/models/user_service_i_d_p_link.rb | 248 ++ .../models/user_service_idp_information.rb | 111 + ...ice_list_authentication_factors_request.rb | 269 ++ ...ce_list_authentication_factors_response.rb | 232 ++ ...ist_authentication_method_types_request.rb | 256 ++ ...st_authentication_method_types_response.rb | 241 ++ .../models/user_service_list_details.rb | 251 ++ .../user_service_list_i_d_p_links_request.rb | 239 ++ .../user_service_list_i_d_p_links_response.rb | 241 ++ .../user_service_list_passkeys_request.rb | 247 ++ .../user_service_list_passkeys_response.rb | 241 ++ .../client/models/user_service_list_query.rb | 249 ++ .../models/user_service_list_users_request.rb | 273 ++ .../user_service_list_users_response.rb | 272 ++ .../models/user_service_lock_user_request.rb | 247 ++ .../models/user_service_lock_user_response.rb | 230 ++ .../models/user_service_machine_user.rb | 279 ++ .../models/user_service_organization.rb | 110 + .../client/models/user_service_passkey.rb | 270 ++ .../user_service_passkey_authenticator.rb | 42 + .../user_service_passkey_registration_code.rb | 273 ++ .../client/models/user_service_password.rb | 256 ++ .../user_service_password_reset_request.rb | 110 + .../user_service_password_reset_response.rb | 241 ++ .../user_service_reactivate_user_request.rb | 247 ++ .../user_service_reactivate_user_response.rb | 230 ++ .../user_service_register_passkey_request.rb | 296 ++ .../user_service_register_passkey_response.rb | 251 ++ .../user_service_register_t_o_t_p_request.rb | 247 ++ .../user_service_register_t_o_t_p_response.rb | 248 ++ .../user_service_register_u2_f_request.rb | 256 ++ .../user_service_register_u2_f_response.rb | 251 ++ .../user_service_remove_i_d_p_link_request.rb | 299 ++ ...user_service_remove_i_d_p_link_response.rb | 230 ++ ...user_service_remove_o_t_p_email_request.rb | 247 ++ ...ser_service_remove_o_t_p_email_response.rb | 230 ++ ...user_service_remove_o_t_p_s_m_s_request.rb | 247 ++ ...ser_service_remove_o_t_p_s_m_s_response.rb | 230 ++ .../user_service_remove_passkey_request.rb | 273 ++ .../user_service_remove_passkey_response.rb | 230 ++ .../user_service_remove_phone_request.rb | 247 ++ .../user_service_remove_phone_response.rb | 230 ++ .../user_service_remove_t_o_t_p_request.rb | 247 ++ .../user_service_remove_t_o_t_p_response.rb | 230 ++ .../user_service_remove_u2_f_request.rb | 273 ++ .../user_service_remove_u2_f_response.rb | 230 ++ .../user_service_resend_email_code_request.rb | 110 + ...user_service_resend_email_code_response.rb | 241 ++ ...user_service_resend_invite_code_request.rb | 247 ++ ...ser_service_resend_invite_code_response.rb | 230 ++ .../user_service_resend_phone_code_request.rb | 110 + ...user_service_resend_phone_code_response.rb | 241 ++ ...trieve_identity_provider_intent_request.rb | 239 ++ ...rieve_identity_provider_intent_response.rb | 257 ++ .../models/user_service_search_query.rb | 124 + .../user_service_send_email_code_request.rb | 110 + .../user_service_send_email_code_response.rb | 241 ++ .../models/user_service_set_email_request.rb | 111 + .../models/user_service_set_email_response.rb | 241 ++ .../models/user_service_set_human_email.rb | 111 + .../models/user_service_set_human_phone.rb | 111 + .../models/user_service_set_human_profile.rb | 334 ++ .../models/user_service_set_metadata_entry.rb | 273 ++ .../models/user_service_set_password.rb | 325 ++ .../user_service_set_password_request.rb | 110 + .../user_service_set_password_response.rb | 230 ++ .../models/user_service_set_phone_request.rb | 111 + .../models/user_service_set_phone_response.rb | 241 ++ ..._start_identity_provider_intent_request.rb | 110 + ...start_identity_provider_intent_response.rb | 111 + .../user_service_unlock_user_request.rb | 247 ++ .../user_service_unlock_user_response.rb | 230 ++ .../user_service_update_human_user_request.rb | 276 ++ ...user_service_update_human_user_response.rb | 250 ++ .../client/models/user_service_user.rb | 351 ++ .../models/user_service_user_field_name.rb | 49 + .../client/models/user_service_user_state.rb | 45 + .../client/models/user_service_value.rb | 114 + .../user_service_verify_email_request.rb | 273 ++ .../user_service_verify_email_response.rb | 230 ++ ...user_service_verify_invite_code_request.rb | 273 ++ ...ser_service_verify_invite_code_response.rb | 230 ++ ...ice_verify_passkey_registration_request.rb | 328 ++ ...ce_verify_passkey_registration_response.rb | 230 ++ .../user_service_verify_phone_request.rb | 273 ++ .../user_service_verify_phone_response.rb | 230 ++ ...ice_verify_t_o_t_p_registration_request.rb | 273 ++ ...ce_verify_t_o_t_p_registration_response.rb | 230 ++ ...ervice_verify_u2_f_registration_request.rb | 328 ++ ...rvice_verify_u2_f_registration_response.rb | 230 ++ .../client/models/verification_code.rb | 247 ++ 698 files changed, 165134 insertions(+) create mode 100644 lib/zitadel/client/api/beta_action_service_api.rb create mode 100644 lib/zitadel/client/api/beta_feature_service_api.rb create mode 100644 lib/zitadel/client/api/beta_o_i_d_c_service_api.rb create mode 100644 lib/zitadel/client/api/beta_organization_service_api.rb create mode 100644 lib/zitadel/client/api/beta_session_service_api.rb create mode 100644 lib/zitadel/client/api/beta_settings_service_api.rb create mode 100644 lib/zitadel/client/api/beta_user_service_api.rb create mode 100644 lib/zitadel/client/api/beta_web_key_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_service_api.rb create mode 100644 lib/zitadel/client/api/user_service_api.rb create mode 100644 lib/zitadel/client/models/and_query.rb create mode 100644 lib/zitadel/client/models/and_query1.rb create mode 100644 lib/zitadel/client/models/apple.rb create mode 100644 lib/zitadel/client/models/auth_url.rb create mode 100644 lib/zitadel/client/models/azure_ad.rb create mode 100644 lib/zitadel/client/models/beta_action_service_any.rb create mode 100644 lib/zitadel/client/models/beta_action_service_condition.rb create mode 100644 lib/zitadel/client/models/beta_action_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_action_service_create_target_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_create_target_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_delete_target_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_delete_target_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_execution.rb create mode 100644 lib/zitadel/client/models/beta_action_service_execution_field_name.rb create mode 100644 lib/zitadel/client/models/beta_action_service_execution_search_filter.rb create mode 100644 lib/zitadel/client/models/beta_action_service_get_target_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_get_target_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_list_execution_functions_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_list_execution_methods_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_list_execution_services_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_list_executions_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_list_executions_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_list_targets_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_list_targets_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_pagination_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_pagination_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_set_execution_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_set_execution_response.rb create mode 100644 lib/zitadel/client/models/beta_action_service_target.rb create mode 100644 lib/zitadel/client/models/beta_action_service_target_field_name.rb create mode 100644 lib/zitadel/client/models/beta_action_service_target_search_filter.rb create mode 100644 lib/zitadel/client/models/beta_action_service_update_target_request.rb create mode 100644 lib/zitadel/client/models/beta_action_service_update_target_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_any.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_details.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_feature_flag.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_get_instance_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_get_instance_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_get_organization_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_get_organization_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_get_system_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_get_user_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_get_user_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_improved_performance.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_improved_performance_feature_flag.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_reset_instance_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_reset_organization_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_reset_organization_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_reset_system_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_reset_user_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_reset_user_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_instance_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_instance_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_organization_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_organization_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_system_features_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_system_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_user_feature_request.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_set_user_features_response.rb create mode 100644 lib/zitadel/client/models/beta_feature_service_source.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_any.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_auth_request.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_create_callback_response.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_details.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_get_auth_request_request.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_get_auth_request_response.rb create mode 100644 lib/zitadel/client/models/beta_o_i_d_c_service_prompt.rb create mode 100644 lib/zitadel/client/models/beta_oidc_service_create_callback_request.rb create mode 100644 lib/zitadel/client/models/beta_organization_service_add_organization_request.rb create mode 100644 lib/zitadel/client/models/beta_organization_service_add_organization_response.rb create mode 100644 lib/zitadel/client/models/beta_organization_service_admin.rb create mode 100644 lib/zitadel/client/models/beta_organization_service_any.rb create mode 100644 lib/zitadel/client/models/beta_organization_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_organization_service_created_admin.rb create mode 100644 lib/zitadel/client/models/beta_organization_service_details.rb create mode 100644 lib/zitadel/client/models/beta_session_service_any.rb create mode 100644 lib/zitadel/client/models/beta_session_service_challenges.rb create mode 100644 lib/zitadel/client/models/beta_session_service_check_i_d_p_intent.rb create mode 100644 lib/zitadel/client/models/beta_session_service_check_o_t_p.rb create mode 100644 lib/zitadel/client/models/beta_session_service_check_password.rb create mode 100644 lib/zitadel/client/models/beta_session_service_check_t_o_t_p.rb create mode 100644 lib/zitadel/client/models/beta_session_service_check_user.rb create mode 100644 lib/zitadel/client/models/beta_session_service_check_web_auth_n.rb create mode 100644 lib/zitadel/client/models/beta_session_service_checks.rb create mode 100644 lib/zitadel/client/models/beta_session_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_session_service_create_session_request.rb create mode 100644 lib/zitadel/client/models/beta_session_service_create_session_response.rb create mode 100644 lib/zitadel/client/models/beta_session_service_delete_session_request.rb create mode 100644 lib/zitadel/client/models/beta_session_service_delete_session_response.rb create mode 100644 lib/zitadel/client/models/beta_session_service_details.rb create mode 100644 lib/zitadel/client/models/beta_session_service_factors.rb create mode 100644 lib/zitadel/client/models/beta_session_service_get_session_request.rb create mode 100644 lib/zitadel/client/models/beta_session_service_get_session_response.rb create mode 100644 lib/zitadel/client/models/beta_session_service_header_values.rb create mode 100644 lib/zitadel/client/models/beta_session_service_intent_factor.rb create mode 100644 lib/zitadel/client/models/beta_session_service_list_details.rb create mode 100644 lib/zitadel/client/models/beta_session_service_list_query.rb create mode 100644 lib/zitadel/client/models/beta_session_service_list_sessions_request.rb create mode 100644 lib/zitadel/client/models/beta_session_service_list_sessions_response.rb create mode 100644 lib/zitadel/client/models/beta_session_service_o_t_p_factor.rb create mode 100644 lib/zitadel/client/models/beta_session_service_o_t_p_s_m_s.rb create mode 100644 lib/zitadel/client/models/beta_session_service_otp_email.rb create mode 100644 lib/zitadel/client/models/beta_session_service_password_factor.rb create mode 100644 lib/zitadel/client/models/beta_session_service_request_challenges.rb create mode 100644 lib/zitadel/client/models/beta_session_service_search_query.rb create mode 100644 lib/zitadel/client/models/beta_session_service_session.rb create mode 100644 lib/zitadel/client/models/beta_session_service_session_field_name.rb create mode 100644 lib/zitadel/client/models/beta_session_service_set_session_request.rb create mode 100644 lib/zitadel/client/models/beta_session_service_set_session_response.rb create mode 100644 lib/zitadel/client/models/beta_session_service_t_o_t_p_factor.rb create mode 100644 lib/zitadel/client/models/beta_session_service_user_agent.rb create mode 100644 lib/zitadel/client/models/beta_session_service_user_factor.rb create mode 100644 lib/zitadel/client/models/beta_session_service_user_verification_requirement.rb create mode 100644 lib/zitadel/client/models/beta_session_service_value.rb create mode 100644 lib/zitadel/client/models/beta_session_service_web_auth_n.rb create mode 100644 lib/zitadel/client/models/beta_session_service_web_auth_n_factor.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_any.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_branding_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_details.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_domain_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_embedded_iframe_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_active_identity_providers_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_active_identity_providers_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_branding_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_branding_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_domain_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_domain_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_general_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_legal_and_support_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_legal_and_support_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_lockout_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_lockout_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_login_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_login_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_password_complexity_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_password_complexity_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_password_expiry_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_password_expiry_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_get_security_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_identity_provider.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_identity_provider_type.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_legal_and_support_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_list_details.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_lockout_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_login_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_multi_factor_type.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_passkeys_type.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_password_complexity_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_password_expiry_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_request_context.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_resource_owner_type.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_second_factor_type.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_security_settings.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_set_security_settings_request.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_set_security_settings_response.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_theme.rb create mode 100644 lib/zitadel/client/models/beta_settings_service_theme_mode.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_human_user_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_human_user_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_i_d_p_link_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_i_d_p_link_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_o_t_p_email_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_o_t_p_email_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_o_t_p_s_m_s_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_add_o_t_p_s_m_s_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_any.rb create mode 100644 lib/zitadel/client/models/beta_user_service_authentication_method_type.rb create mode 100644 lib/zitadel/client/models/beta_user_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_user_service_create_passkey_registration_link_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_create_passkey_registration_link_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_deactivate_user_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_deactivate_user_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_delete_user_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_delete_user_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_details.rb create mode 100644 lib/zitadel/client/models/beta_user_service_gender.rb create mode 100644 lib/zitadel/client/models/beta_user_service_get_user_by_i_d_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_get_user_by_i_d_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_hashed_password.rb create mode 100644 lib/zitadel/client/models/beta_user_service_i_d_p_link.rb create mode 100644 lib/zitadel/client/models/beta_user_service_idp_information.rb create mode 100644 lib/zitadel/client/models/beta_user_service_list_authentication_method_types_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_list_authentication_method_types_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_list_details.rb create mode 100644 lib/zitadel/client/models/beta_user_service_list_query.rb create mode 100644 lib/zitadel/client/models/beta_user_service_list_users_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_list_users_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_lock_user_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_lock_user_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_organization.rb create mode 100644 lib/zitadel/client/models/beta_user_service_passkey_authenticator.rb create mode 100644 lib/zitadel/client/models/beta_user_service_passkey_registration_code.rb create mode 100644 lib/zitadel/client/models/beta_user_service_password.rb create mode 100644 lib/zitadel/client/models/beta_user_service_password_reset_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_password_reset_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_reactivate_user_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_reactivate_user_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_register_passkey_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_register_passkey_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_register_t_o_t_p_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_register_t_o_t_p_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_register_u2_f_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_register_u2_f_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_o_t_p_email_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_o_t_p_email_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_o_t_p_s_m_s_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_o_t_p_s_m_s_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_phone_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_phone_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_t_o_t_p_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_remove_t_o_t_p_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_resend_email_code_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_resend_email_code_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_resend_phone_code_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_resend_phone_code_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_retrieve_identity_provider_intent_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_retrieve_identity_provider_intent_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_search_query.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_email_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_email_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_human_email.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_human_phone.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_human_profile.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_metadata_entry.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_password.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_password_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_password_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_phone_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_set_phone_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_start_identity_provider_intent_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_start_identity_provider_intent_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_unlock_user_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_unlock_user_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_update_human_user_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_update_human_user_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_user.rb create mode 100644 lib/zitadel/client/models/beta_user_service_user_field_name.rb create mode 100644 lib/zitadel/client/models/beta_user_service_user_state.rb create mode 100644 lib/zitadel/client/models/beta_user_service_value.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_email_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_email_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_passkey_registration_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_passkey_registration_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_phone_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_phone_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_t_o_t_p_registration_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_t_o_t_p_registration_response.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_u2_f_registration_request.rb create mode 100644 lib/zitadel/client/models/beta_user_service_verify_u2_f_registration_response.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_activate_web_key_request.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_activate_web_key_response.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_any.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_connect_error.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_create_web_key_request.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_create_web_key_response.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_delete_web_key_request.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_delete_web_key_response.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_list_web_keys_response.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_state.rb create mode 100644 lib/zitadel/client/models/beta_web_key_service_web_key.rb create mode 100644 lib/zitadel/client/models/creation_date_query.rb create mode 100644 lib/zitadel/client/models/creation_date_query1.rb create mode 100644 lib/zitadel/client/models/creator_query.rb create mode 100644 lib/zitadel/client/models/current_password.rb create mode 100644 lib/zitadel/client/models/default_query.rb create mode 100644 lib/zitadel/client/models/deny.rb create mode 100644 lib/zitadel/client/models/display_name_query.rb create mode 100644 lib/zitadel/client/models/display_name_query1.rb create mode 100644 lib/zitadel/client/models/domain_query.rb create mode 100644 lib/zitadel/client/models/ecdsa.rb create mode 100644 lib/zitadel/client/models/ed25519.rb create mode 100644 lib/zitadel/client/models/email_query.rb create mode 100644 lib/zitadel/client/models/email_query1.rb create mode 100644 lib/zitadel/client/models/error.rb create mode 100644 lib/zitadel/client/models/error1.rb create mode 100644 lib/zitadel/client/models/error2.rb create mode 100644 lib/zitadel/client/models/event.rb create mode 100644 lib/zitadel/client/models/execution_type_filter.rb create mode 100644 lib/zitadel/client/models/feature_service_any.rb create mode 100644 lib/zitadel/client/models/feature_service_connect_error.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_request.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_request.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_request.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_reset_instance_features_response.rb create mode 100644 lib/zitadel/client/models/feature_service_reset_organization_features_request.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_request.rb create mode 100644 lib/zitadel/client/models/feature_service_reset_user_features_response.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_request.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_feature_request.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/first_name_query.rb create mode 100644 lib/zitadel/client/models/first_name_query1.rb create mode 100644 lib/zitadel/client/models/function.rb create mode 100644 lib/zitadel/client/models/github.rb create mode 100644 lib/zitadel/client/models/github_es.rb create mode 100644 lib/zitadel/client/models/gitlab.rb create mode 100644 lib/zitadel/client/models/gitlab_self_hosted.rb create mode 100644 lib/zitadel/client/models/google.rb create mode 100644 lib/zitadel/client/models/hashed_password.rb create mode 100644 lib/zitadel/client/models/hashed_password1.rb create mode 100644 lib/zitadel/client/models/human.rb create mode 100644 lib/zitadel/client/models/human1.rb create mode 100644 lib/zitadel/client/models/human2.rb create mode 100644 lib/zitadel/client/models/id_query.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_any.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_connect_error.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_details.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_request.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_i_d_p.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_idp_config.rb create mode 100644 lib/zitadel/client/models/identity_provider_service_options.rb create mode 100644 lib/zitadel/client/models/idp_intent.rb create mode 100644 lib/zitadel/client/models/idp_intent1.rb create mode 100644 lib/zitadel/client/models/ids_query.rb create mode 100644 lib/zitadel/client/models/ids_query1.rb create mode 100644 lib/zitadel/client/models/in_conditions_filter.rb create mode 100644 lib/zitadel/client/models/in_target_ids_filter.rb create mode 100644 lib/zitadel/client/models/in_user_emails_query.rb create mode 100644 lib/zitadel/client/models/in_user_emails_query1.rb create mode 100644 lib/zitadel/client/models/in_user_ids_query.rb create mode 100644 lib/zitadel/client/models/in_user_ids_query1.rb create mode 100644 lib/zitadel/client/models/instance.rb create mode 100644 lib/zitadel/client/models/is_verified.rb create mode 100644 lib/zitadel/client/models/jwt.rb create mode 100644 lib/zitadel/client/models/last_name_query.rb create mode 100644 lib/zitadel/client/models/last_name_query1.rb create mode 100644 lib/zitadel/client/models/ldap.rb create mode 100644 lib/zitadel/client/models/ldap1.rb create mode 100644 lib/zitadel/client/models/ldap2.rb create mode 100644 lib/zitadel/client/models/ldap3.rb create mode 100644 lib/zitadel/client/models/ldap4.rb create mode 100644 lib/zitadel/client/models/login_name.rb create mode 100644 lib/zitadel/client/models/login_name_query.rb create mode 100644 lib/zitadel/client/models/login_name_query1.rb create mode 100644 lib/zitadel/client/models/machine.rb create mode 100644 lib/zitadel/client/models/name_query.rb create mode 100644 lib/zitadel/client/models/nick_name_query.rb create mode 100644 lib/zitadel/client/models/nick_name_query1.rb create mode 100644 lib/zitadel/client/models/not_query.rb create mode 100644 lib/zitadel/client/models/not_query1.rb create mode 100644 lib/zitadel/client/models/o_i_d_c_service_any.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_connect_error.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_get_auth_request_request.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_request.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/oauth.rb create mode 100644 lib/zitadel/client/models/oauth1.rb create mode 100644 lib/zitadel/client/models/oauth2.rb create mode 100644 lib/zitadel/client/models/oidc.rb create mode 100644 lib/zitadel/client/models/oidc_service_authorize_or_deny_device_authorization_request.rb create mode 100644 lib/zitadel/client/models/oidc_service_create_callback_request.rb create mode 100644 lib/zitadel/client/models/or_query.rb create mode 100644 lib/zitadel/client/models/or_query1.rb create mode 100644 lib/zitadel/client/models/org_domain.rb create mode 100644 lib/zitadel/client/models/org_id.rb create mode 100644 lib/zitadel/client/models/organization_id_query.rb create mode 100644 lib/zitadel/client/models/organization_id_query1.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_response.rb create mode 100644 lib/zitadel/client/models/organization_service_admin.rb create mode 100644 lib/zitadel/client/models/organization_service_any.rb create mode 100644 lib/zitadel/client/models/organization_service_connect_error.rb create mode 100644 lib/zitadel/client/models/organization_service_created_admin.rb create mode 100644 lib/zitadel/client/models/organization_service_details.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.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_field_name.rb create mode 100644 lib/zitadel/client/models/organization_service_organization_state.rb create mode 100644 lib/zitadel/client/models/organization_service_search_query.rb create mode 100644 lib/zitadel/client/models/otp.rb create mode 100644 lib/zitadel/client/models/otp_email.rb create mode 100644 lib/zitadel/client/models/otp_sms.rb create mode 100644 lib/zitadel/client/models/password.rb create mode 100644 lib/zitadel/client/models/password1.rb create mode 100644 lib/zitadel/client/models/phone_query.rb create mode 100644 lib/zitadel/client/models/phone_query1.rb create mode 100644 lib/zitadel/client/models/post.rb create mode 100644 lib/zitadel/client/models/post_form.rb create mode 100644 lib/zitadel/client/models/redirect.rb create mode 100644 lib/zitadel/client/models/request.rb create mode 100644 lib/zitadel/client/models/response.rb create mode 100644 lib/zitadel/client/models/rest_async.rb create mode 100644 lib/zitadel/client/models/rest_call.rb create mode 100644 lib/zitadel/client/models/rest_webhook.rb create mode 100644 lib/zitadel/client/models/return_code.rb create mode 100644 lib/zitadel/client/models/return_code1.rb create mode 100644 lib/zitadel/client/models/return_code10.rb create mode 100644 lib/zitadel/client/models/return_code2.rb create mode 100644 lib/zitadel/client/models/return_code3.rb create mode 100644 lib/zitadel/client/models/return_code4.rb create mode 100644 lib/zitadel/client/models/return_code5.rb create mode 100644 lib/zitadel/client/models/return_code6.rb create mode 100644 lib/zitadel/client/models/return_code7.rb create mode 100644 lib/zitadel/client/models/return_code8.rb create mode 100644 lib/zitadel/client/models/return_code9.rb create mode 100644 lib/zitadel/client/models/rsa.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_any.rb create mode 100644 lib/zitadel/client/models/s_a_m_l_service_connect_error.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_get_s_a_m_l_request_request.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_s_a_m_l_request.rb create mode 100644 lib/zitadel/client/models/saml.rb create mode 100644 lib/zitadel/client/models/saml1.rb create mode 100644 lib/zitadel/client/models/saml2.rb create mode 100644 lib/zitadel/client/models/saml_service_create_response_request.rb create mode 100644 lib/zitadel/client/models/saml_service_create_response_response.rb create mode 100644 lib/zitadel/client/models/send_code.rb create mode 100644 lib/zitadel/client/models/send_code1.rb create mode 100644 lib/zitadel/client/models/send_code2.rb create mode 100644 lib/zitadel/client/models/send_code3.rb create mode 100644 lib/zitadel/client/models/send_code4.rb create mode 100644 lib/zitadel/client/models/send_code5.rb create mode 100644 lib/zitadel/client/models/send_code6.rb create mode 100644 lib/zitadel/client/models/send_link.rb create mode 100644 lib/zitadel/client/models/send_link1.rb create mode 100644 lib/zitadel/client/models/send_link2.rb create mode 100644 lib/zitadel/client/models/send_link3.rb create mode 100644 lib/zitadel/client/models/session.rb create mode 100644 lib/zitadel/client/models/session1.rb create mode 100644 lib/zitadel/client/models/session2.rb create mode 100644 lib/zitadel/client/models/session_service_any.rb create mode 100644 lib/zitadel/client/models/session_service_challenges.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_connect_error.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_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_request.rb create mode 100644 lib/zitadel/client/models/session_service_get_session_response.rb create mode 100644 lib/zitadel/client/models/session_service_header_values.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_factor.rb create mode 100644 lib/zitadel/client/models/session_service_o_t_p_s_m_s.rb create mode 100644 lib/zitadel/client/models/session_service_otp_email.rb create mode 100644 lib/zitadel/client/models/session_service_password_factor.rb create mode 100644 lib/zitadel/client/models/session_service_request_challenges.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_user_agent.rb create mode 100644 lib/zitadel/client/models/session_service_user_factor.rb create mode 100644 lib/zitadel/client/models/session_service_user_verification_requirement.rb create mode 100644 lib/zitadel/client/models/session_service_value.rb create mode 100644 lib/zitadel/client/models/session_service_web_auth_n.rb create mode 100644 lib/zitadel/client/models/session_service_web_auth_n_factor.rb create mode 100644 lib/zitadel/client/models/settings_service_any.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_connect_error.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_request.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_request.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_request.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_request.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_request.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_request.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_request.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_request.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_request_context.rb create mode 100644 lib/zitadel/client/models/settings_service_resource_owner_type.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/state_query.rb create mode 100644 lib/zitadel/client/models/state_query1.rb create mode 100644 lib/zitadel/client/models/state_query2.rb create mode 100644 lib/zitadel/client/models/target_filter.rb create mode 100644 lib/zitadel/client/models/target_name_filter.rb create mode 100644 lib/zitadel/client/models/type_query.rb create mode 100644 lib/zitadel/client/models/type_query1.rb create mode 100644 lib/zitadel/client/models/u2f.rb create mode 100644 lib/zitadel/client/models/urls.rb create mode 100644 lib/zitadel/client/models/urls1.rb create mode 100644 lib/zitadel/client/models/user_agent_query.rb create mode 100644 lib/zitadel/client/models/user_id.rb create mode 100644 lib/zitadel/client/models/user_id_query.rb create mode 100644 lib/zitadel/client/models/user_id_query1.rb create mode 100644 lib/zitadel/client/models/user_name_query.rb create mode 100644 lib/zitadel/client/models/user_name_query1.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_request.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_request.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_any.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_factors.rb create mode 100644 lib/zitadel/client/models/user_service_authentication_method_type.rb create mode 100644 lib/zitadel/client/models/user_service_connect_error.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_request.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_request.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_domain_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_request.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_request.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_link.rb create mode 100644 lib/zitadel/client/models/user_service_idp_information.rb create mode 100644 lib/zitadel/client/models/user_service_list_authentication_factors_request.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_request.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_request.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_request.rb create mode 100644 lib/zitadel/client/models/user_service_lock_user_response.rb create mode 100644 lib/zitadel/client/models/user_service_machine_user.rb create mode 100644 lib/zitadel/client/models/user_service_organization.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_reactivate_user_request.rb create mode 100644 lib/zitadel/client/models/user_service_reactivate_user_response.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_request.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_request.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_request.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_request.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_request.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_request.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_request.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_request.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_request.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_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_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_unlock_user_request.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_state.rb create mode 100644 lib/zitadel/client/models/user_service_value.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/verification_code.rb diff --git a/lib/zitadel/client/api/beta_action_service_api.rb b/lib/zitadel/client/api/beta_action_service_api.rb new file mode 100644 index 00000000..44deeb3f --- /dev/null +++ b/lib/zitadel/client/api/beta_action_service_api.rb @@ -0,0 +1,702 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 BetaActionServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # CreateTarget + # Create Target Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + # @param beta_action_service_create_target_request [BetaActionServiceCreateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceCreateTargetResponse] + def create_target(beta_action_service_create_target_request, opts = {}) + data, _status_code, _headers = create_target_with_http_info(beta_action_service_create_target_request, opts) + data + end + + # CreateTarget + # Create Target Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + # @param beta_action_service_create_target_request [BetaActionServiceCreateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceCreateTargetResponse, Integer, Hash)>] BetaActionServiceCreateTargetResponse data, response status code and response headers + def create_target_with_http_info(beta_action_service_create_target_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.create_target ...' # MODIFIED + end + # verify the required parameter 'beta_action_service_create_target_request' is set + if @api_client.config.client_side_validation && beta_action_service_create_target_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_action_service_create_target_request' when calling Api::BetaActionServiceApi.create_target" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/CreateTarget' + + # 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(beta_action_service_create_target_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceCreateTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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::BetaActionServiceApi#create_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeleteTarget + # Delete Target Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` + # @param beta_action_service_delete_target_request [BetaActionServiceDeleteTargetRequest] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceDeleteTargetResponse] + def delete_target(beta_action_service_delete_target_request, opts = {}) + data, _status_code, _headers = delete_target_with_http_info(beta_action_service_delete_target_request, opts) + data + end + + # DeleteTarget + # Delete Target Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` + # @param beta_action_service_delete_target_request [BetaActionServiceDeleteTargetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceDeleteTargetResponse, Integer, Hash)>] BetaActionServiceDeleteTargetResponse data, response status code and response headers + def delete_target_with_http_info(beta_action_service_delete_target_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.delete_target ...' # MODIFIED + end + # verify the required parameter 'beta_action_service_delete_target_request' is set + if @api_client.config.client_side_validation && beta_action_service_delete_target_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_action_service_delete_target_request' when calling Api::BetaActionServiceApi.delete_target" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/DeleteTarget' + + # 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(beta_action_service_delete_target_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceDeleteTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaActionServiceApi#delete_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetTarget + # Get Target Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + # @param beta_action_service_get_target_request [BetaActionServiceGetTargetRequest] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceGetTargetResponse] + def get_target(beta_action_service_get_target_request, opts = {}) + data, _status_code, _headers = get_target_with_http_info(beta_action_service_get_target_request, opts) + data + end + + # GetTarget + # Get Target Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + # @param beta_action_service_get_target_request [BetaActionServiceGetTargetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceGetTargetResponse, Integer, Hash)>] BetaActionServiceGetTargetResponse data, response status code and response headers + def get_target_with_http_info(beta_action_service_get_target_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.get_target ...' # MODIFIED + end + # verify the required parameter 'beta_action_service_get_target_request' is set + if @api_client.config.client_side_validation && beta_action_service_get_target_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_action_service_get_target_request' when calling Api::BetaActionServiceApi.get_target" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/GetTarget' + + # 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(beta_action_service_get_target_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceGetTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaActionServiceApi#get_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListExecutionFunctions + # List Execution Functions List all available functions which can be used as condition for executions. + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceListExecutionFunctionsResponse] + def list_execution_functions(body, opts = {}) + data, _status_code, _headers = list_execution_functions_with_http_info(body, opts) + data + end + + # ListExecutionFunctions + # List Execution Functions List all available functions which can be used as condition for executions. + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceListExecutionFunctionsResponse, Integer, Hash)>] BetaActionServiceListExecutionFunctionsResponse data, response status code and response headers + def list_execution_functions_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.list_execution_functions ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaActionServiceApi.list_execution_functions" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/ListExecutionFunctions' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceListExecutionFunctionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaActionServiceApi#list_execution_functions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListExecutionMethods + # List Execution Methods List all available methods which can be used as condition for executions. + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceListExecutionMethodsResponse] + def list_execution_methods(body, opts = {}) + data, _status_code, _headers = list_execution_methods_with_http_info(body, opts) + data + end + + # ListExecutionMethods + # List Execution Methods List all available methods which can be used as condition for executions. + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceListExecutionMethodsResponse, Integer, Hash)>] BetaActionServiceListExecutionMethodsResponse data, response status code and response headers + def list_execution_methods_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.list_execution_methods ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaActionServiceApi.list_execution_methods" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/ListExecutionMethods' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceListExecutionMethodsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaActionServiceApi#list_execution_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListExecutionServices + # List Execution Services List all available services which can be used as condition for executions. + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceListExecutionServicesResponse] + def list_execution_services(body, opts = {}) + data, _status_code, _headers = list_execution_services_with_http_info(body, opts) + data + end + + # ListExecutionServices + # List Execution Services List all available services which can be used as condition for executions. + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceListExecutionServicesResponse, Integer, Hash)>] BetaActionServiceListExecutionServicesResponse data, response status code and response headers + def list_execution_services_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.list_execution_services ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaActionServiceApi.list_execution_services" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/ListExecutionServices' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceListExecutionServicesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaActionServiceApi#list_execution_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListExecutions + # List Executions List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + # @param beta_action_service_list_executions_request [BetaActionServiceListExecutionsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceListExecutionsResponse] + def list_executions(beta_action_service_list_executions_request, opts = {}) + data, _status_code, _headers = list_executions_with_http_info(beta_action_service_list_executions_request, opts) + data + end + + # ListExecutions + # List Executions List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + # @param beta_action_service_list_executions_request [BetaActionServiceListExecutionsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceListExecutionsResponse, Integer, Hash)>] BetaActionServiceListExecutionsResponse data, response status code and response headers + def list_executions_with_http_info(beta_action_service_list_executions_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.list_executions ...' # MODIFIED + end + # verify the required parameter 'beta_action_service_list_executions_request' is set + if @api_client.config.client_side_validation && beta_action_service_list_executions_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_action_service_list_executions_request' when calling Api::BetaActionServiceApi.list_executions" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/ListExecutions' + + # 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(beta_action_service_list_executions_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceListExecutionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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::BetaActionServiceApi#list_executions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListTargets + # List targets List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` + # @param beta_action_service_list_targets_request [BetaActionServiceListTargetsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceListTargetsResponse] + def list_targets(beta_action_service_list_targets_request, opts = {}) + data, _status_code, _headers = list_targets_with_http_info(beta_action_service_list_targets_request, opts) + data + end + + # ListTargets + # List targets List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` + # @param beta_action_service_list_targets_request [BetaActionServiceListTargetsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceListTargetsResponse, Integer, Hash)>] BetaActionServiceListTargetsResponse data, response status code and response headers + def list_targets_with_http_info(beta_action_service_list_targets_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.list_targets ...' # MODIFIED + end + # verify the required parameter 'beta_action_service_list_targets_request' is set + if @api_client.config.client_side_validation && beta_action_service_list_targets_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_action_service_list_targets_request' when calling Api::BetaActionServiceApi.list_targets" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/ListTargets' + + # 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(beta_action_service_list_targets_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceListTargetsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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::BetaActionServiceApi#list_targets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetExecution + # Set Execution Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` + # @param beta_action_service_set_execution_request [BetaActionServiceSetExecutionRequest] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceSetExecutionResponse] + def set_execution(beta_action_service_set_execution_request, opts = {}) + data, _status_code, _headers = set_execution_with_http_info(beta_action_service_set_execution_request, opts) + data + end + + # SetExecution + # Set Execution Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` + # @param beta_action_service_set_execution_request [BetaActionServiceSetExecutionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceSetExecutionResponse, Integer, Hash)>] BetaActionServiceSetExecutionResponse data, response status code and response headers + def set_execution_with_http_info(beta_action_service_set_execution_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.set_execution ...' # MODIFIED + end + # verify the required parameter 'beta_action_service_set_execution_request' is set + if @api_client.config.client_side_validation && beta_action_service_set_execution_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_action_service_set_execution_request' when calling Api::BetaActionServiceApi.set_execution" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/SetExecution' + + # 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(beta_action_service_set_execution_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceSetExecutionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaActionServiceApi#set_execution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # UpdateTarget + # Update Target Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + # @param beta_action_service_update_target_request [BetaActionServiceUpdateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [BetaActionServiceUpdateTargetResponse] + def update_target(beta_action_service_update_target_request, opts = {}) + data, _status_code, _headers = update_target_with_http_info(beta_action_service_update_target_request, opts) + data + end + + # UpdateTarget + # Update Target Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + # @param beta_action_service_update_target_request [BetaActionServiceUpdateTargetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaActionServiceUpdateTargetResponse, Integer, Hash)>] BetaActionServiceUpdateTargetResponse data, response status code and response headers + def update_target_with_http_info(beta_action_service_update_target_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaActionServiceApi.update_target ...' # MODIFIED + end + # verify the required parameter 'beta_action_service_update_target_request' is set + if @api_client.config.client_side_validation && beta_action_service_update_target_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_action_service_update_target_request' when calling Api::BetaActionServiceApi.update_target" # MODIFIED + end + # resource path + local_var_path = '/zitadel.action.v2beta.ActionService/UpdateTarget' + + # 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(beta_action_service_update_target_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaActionServiceUpdateTargetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaActionServiceApi.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::BetaActionServiceApi#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/beta_feature_service_api.rb b/lib/zitadel/client/api/beta_feature_service_api.rb new file mode 100644 index 00000000..e2d75856 --- /dev/null +++ b/lib/zitadel/client/api/beta_feature_service_api.rb @@ -0,0 +1,814 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 BetaFeatureServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # GetInstanceFeatures + # @param beta_feature_service_get_instance_features_request [BetaFeatureServiceGetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceGetInstanceFeaturesResponse] + def get_instance_features(beta_feature_service_get_instance_features_request, opts = {}) + data, _status_code, _headers = get_instance_features_with_http_info(beta_feature_service_get_instance_features_request, opts) + data + end + + # GetInstanceFeatures + # @param beta_feature_service_get_instance_features_request [BetaFeatureServiceGetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceGetInstanceFeaturesResponse, Integer, Hash)>] BetaFeatureServiceGetInstanceFeaturesResponse data, response status code and response headers + def get_instance_features_with_http_info(beta_feature_service_get_instance_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.get_instance_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_get_instance_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_get_instance_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_get_instance_features_request' when calling Api::BetaFeatureServiceApi.get_instance_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/GetInstanceFeatures' + + # 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(beta_feature_service_get_instance_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceGetInstanceFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#get_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetOrganizationFeatures + # @param beta_feature_service_get_organization_features_request [BetaFeatureServiceGetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceGetOrganizationFeaturesResponse] + def get_organization_features(beta_feature_service_get_organization_features_request, opts = {}) + data, _status_code, _headers = get_organization_features_with_http_info(beta_feature_service_get_organization_features_request, opts) + data + end + + # GetOrganizationFeatures + # @param beta_feature_service_get_organization_features_request [BetaFeatureServiceGetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceGetOrganizationFeaturesResponse, Integer, Hash)>] BetaFeatureServiceGetOrganizationFeaturesResponse data, response status code and response headers + def get_organization_features_with_http_info(beta_feature_service_get_organization_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.get_organization_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_get_organization_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_get_organization_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_get_organization_features_request' when calling Api::BetaFeatureServiceApi.get_organization_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/GetOrganizationFeatures' + + # 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(beta_feature_service_get_organization_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceGetOrganizationFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#get_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetSystemFeatures + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceGetSystemFeaturesResponse] + def get_system_features(body, opts = {}) + data, _status_code, _headers = get_system_features_with_http_info(body, opts) + data + end + + # GetSystemFeatures + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceGetSystemFeaturesResponse, Integer, Hash)>] BetaFeatureServiceGetSystemFeaturesResponse data, response status code and response headers + def get_system_features_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.get_system_features ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaFeatureServiceApi.get_system_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/GetSystemFeatures' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceGetSystemFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#get_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetUserFeatures + # @param beta_feature_service_get_user_features_request [BetaFeatureServiceGetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceGetUserFeaturesResponse] + def get_user_features(beta_feature_service_get_user_features_request, opts = {}) + data, _status_code, _headers = get_user_features_with_http_info(beta_feature_service_get_user_features_request, opts) + data + end + + # GetUserFeatures + # @param beta_feature_service_get_user_features_request [BetaFeatureServiceGetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceGetUserFeaturesResponse, Integer, Hash)>] BetaFeatureServiceGetUserFeaturesResponse data, response status code and response headers + def get_user_features_with_http_info(beta_feature_service_get_user_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.get_user_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_get_user_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_get_user_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_get_user_features_request' when calling Api::BetaFeatureServiceApi.get_user_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/GetUserFeatures' + + # 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(beta_feature_service_get_user_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceGetUserFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#get_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetInstanceFeatures + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceResetInstanceFeaturesResponse] + def reset_instance_features(body, opts = {}) + data, _status_code, _headers = reset_instance_features_with_http_info(body, opts) + data + end + + # ResetInstanceFeatures + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceResetInstanceFeaturesResponse, Integer, Hash)>] BetaFeatureServiceResetInstanceFeaturesResponse data, response status code and response headers + def reset_instance_features_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.reset_instance_features ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaFeatureServiceApi.reset_instance_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/ResetInstanceFeatures' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceResetInstanceFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#reset_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetOrganizationFeatures + # @param beta_feature_service_reset_organization_features_request [BetaFeatureServiceResetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceResetOrganizationFeaturesResponse] + def reset_organization_features(beta_feature_service_reset_organization_features_request, opts = {}) + data, _status_code, _headers = reset_organization_features_with_http_info(beta_feature_service_reset_organization_features_request, opts) + data + end + + # ResetOrganizationFeatures + # @param beta_feature_service_reset_organization_features_request [BetaFeatureServiceResetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceResetOrganizationFeaturesResponse, Integer, Hash)>] BetaFeatureServiceResetOrganizationFeaturesResponse data, response status code and response headers + def reset_organization_features_with_http_info(beta_feature_service_reset_organization_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.reset_organization_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_reset_organization_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_reset_organization_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_reset_organization_features_request' when calling Api::BetaFeatureServiceApi.reset_organization_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/ResetOrganizationFeatures' + + # 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(beta_feature_service_reset_organization_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceResetOrganizationFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#reset_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetSystemFeatures + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceResetSystemFeaturesResponse] + def reset_system_features(body, opts = {}) + data, _status_code, _headers = reset_system_features_with_http_info(body, opts) + data + end + + # ResetSystemFeatures + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceResetSystemFeaturesResponse, Integer, Hash)>] BetaFeatureServiceResetSystemFeaturesResponse data, response status code and response headers + def reset_system_features_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.reset_system_features ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaFeatureServiceApi.reset_system_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/ResetSystemFeatures' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceResetSystemFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#reset_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetUserFeatures + # @param beta_feature_service_reset_user_features_request [BetaFeatureServiceResetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceResetUserFeaturesResponse] + def reset_user_features(beta_feature_service_reset_user_features_request, opts = {}) + data, _status_code, _headers = reset_user_features_with_http_info(beta_feature_service_reset_user_features_request, opts) + data + end + + # ResetUserFeatures + # @param beta_feature_service_reset_user_features_request [BetaFeatureServiceResetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceResetUserFeaturesResponse, Integer, Hash)>] BetaFeatureServiceResetUserFeaturesResponse data, response status code and response headers + def reset_user_features_with_http_info(beta_feature_service_reset_user_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.reset_user_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_reset_user_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_reset_user_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_reset_user_features_request' when calling Api::BetaFeatureServiceApi.reset_user_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/ResetUserFeatures' + + # 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(beta_feature_service_reset_user_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceResetUserFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#reset_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetInstanceFeatures + # @param beta_feature_service_set_instance_features_request [BetaFeatureServiceSetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceSetInstanceFeaturesResponse] + def set_instance_features(beta_feature_service_set_instance_features_request, opts = {}) + data, _status_code, _headers = set_instance_features_with_http_info(beta_feature_service_set_instance_features_request, opts) + data + end + + # SetInstanceFeatures + # @param beta_feature_service_set_instance_features_request [BetaFeatureServiceSetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceSetInstanceFeaturesResponse, Integer, Hash)>] BetaFeatureServiceSetInstanceFeaturesResponse data, response status code and response headers + def set_instance_features_with_http_info(beta_feature_service_set_instance_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.set_instance_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_set_instance_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_set_instance_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_set_instance_features_request' when calling Api::BetaFeatureServiceApi.set_instance_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/SetInstanceFeatures' + + # 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(beta_feature_service_set_instance_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceSetInstanceFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#set_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetOrganizationFeatures + # @param beta_feature_service_set_organization_features_request [BetaFeatureServiceSetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceSetOrganizationFeaturesResponse] + def set_organization_features(beta_feature_service_set_organization_features_request, opts = {}) + data, _status_code, _headers = set_organization_features_with_http_info(beta_feature_service_set_organization_features_request, opts) + data + end + + # SetOrganizationFeatures + # @param beta_feature_service_set_organization_features_request [BetaFeatureServiceSetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceSetOrganizationFeaturesResponse, Integer, Hash)>] BetaFeatureServiceSetOrganizationFeaturesResponse data, response status code and response headers + def set_organization_features_with_http_info(beta_feature_service_set_organization_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.set_organization_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_set_organization_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_set_organization_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_set_organization_features_request' when calling Api::BetaFeatureServiceApi.set_organization_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/SetOrganizationFeatures' + + # 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(beta_feature_service_set_organization_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceSetOrganizationFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#set_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetSystemFeatures + # @param beta_feature_service_set_system_features_request [BetaFeatureServiceSetSystemFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceSetSystemFeaturesResponse] + def set_system_features(beta_feature_service_set_system_features_request, opts = {}) + data, _status_code, _headers = set_system_features_with_http_info(beta_feature_service_set_system_features_request, opts) + data + end + + # SetSystemFeatures + # @param beta_feature_service_set_system_features_request [BetaFeatureServiceSetSystemFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceSetSystemFeaturesResponse, Integer, Hash)>] BetaFeatureServiceSetSystemFeaturesResponse data, response status code and response headers + def set_system_features_with_http_info(beta_feature_service_set_system_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.set_system_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_set_system_features_request' is set + if @api_client.config.client_side_validation && beta_feature_service_set_system_features_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_set_system_features_request' when calling Api::BetaFeatureServiceApi.set_system_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/SetSystemFeatures' + + # 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(beta_feature_service_set_system_features_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceSetSystemFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#set_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetUserFeatures + # @param beta_feature_service_set_user_feature_request [BetaFeatureServiceSetUserFeatureRequest] + # @param [Hash] opts the optional parameters + # @return [BetaFeatureServiceSetUserFeaturesResponse] + def set_user_features(beta_feature_service_set_user_feature_request, opts = {}) + data, _status_code, _headers = set_user_features_with_http_info(beta_feature_service_set_user_feature_request, opts) + data + end + + # SetUserFeatures + # @param beta_feature_service_set_user_feature_request [BetaFeatureServiceSetUserFeatureRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaFeatureServiceSetUserFeaturesResponse, Integer, Hash)>] BetaFeatureServiceSetUserFeaturesResponse data, response status code and response headers + def set_user_features_with_http_info(beta_feature_service_set_user_feature_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaFeatureServiceApi.set_user_features ...' # MODIFIED + end + # verify the required parameter 'beta_feature_service_set_user_feature_request' is set + if @api_client.config.client_side_validation && beta_feature_service_set_user_feature_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_feature_service_set_user_feature_request' when calling Api::BetaFeatureServiceApi.set_user_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2beta.FeatureService/SetUserFeatures' + + # 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(beta_feature_service_set_user_feature_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaFeatureServiceSetUserFeaturesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaFeatureServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaFeatureServiceApi#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/beta_o_i_d_c_service_api.rb b/lib/zitadel/client/api/beta_o_i_d_c_service_api.rb new file mode 100644 index 00000000..169b6569 --- /dev/null +++ b/lib/zitadel/client/api/beta_o_i_d_c_service_api.rb @@ -0,0 +1,154 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 BetaOIDCServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # CreateCallback + # @param beta_oidc_service_create_callback_request [BetaOIDCServiceCreateCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [BetaOIDCServiceCreateCallbackResponse] + def create_callback(beta_oidc_service_create_callback_request, opts = {}) + data, _status_code, _headers = create_callback_with_http_info(beta_oidc_service_create_callback_request, opts) + data + end + + # CreateCallback + # @param beta_oidc_service_create_callback_request [BetaOIDCServiceCreateCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaOIDCServiceCreateCallbackResponse, Integer, Hash)>] BetaOIDCServiceCreateCallbackResponse data, response status code and response headers + def create_callback_with_http_info(beta_oidc_service_create_callback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaOIDCServiceApi.create_callback ...' # MODIFIED + end + # verify the required parameter 'beta_oidc_service_create_callback_request' is set + if @api_client.config.client_side_validation && beta_oidc_service_create_callback_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_oidc_service_create_callback_request' when calling Api::BetaOIDCServiceApi.create_callback" # MODIFIED + end + # resource path + local_var_path = '/zitadel.oidc.v2beta.OIDCService/CreateCallback' + + # 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(beta_oidc_service_create_callback_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaOIDCServiceCreateCallbackResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaOIDCServiceApi.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::BetaOIDCServiceApi#create_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetAuthRequest + # @param beta_oidc_service_get_auth_request_request [BetaOIDCServiceGetAuthRequestRequest] + # @param [Hash] opts the optional parameters + # @return [BetaOIDCServiceGetAuthRequestResponse] + def get_auth_request(beta_oidc_service_get_auth_request_request, opts = {}) + data, _status_code, _headers = get_auth_request_with_http_info(beta_oidc_service_get_auth_request_request, opts) + data + end + + # GetAuthRequest + # @param beta_oidc_service_get_auth_request_request [BetaOIDCServiceGetAuthRequestRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaOIDCServiceGetAuthRequestResponse, Integer, Hash)>] BetaOIDCServiceGetAuthRequestResponse data, response status code and response headers + def get_auth_request_with_http_info(beta_oidc_service_get_auth_request_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaOIDCServiceApi.get_auth_request ...' # MODIFIED + end + # verify the required parameter 'beta_oidc_service_get_auth_request_request' is set + if @api_client.config.client_side_validation && beta_oidc_service_get_auth_request_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_oidc_service_get_auth_request_request' when calling Api::BetaOIDCServiceApi.get_auth_request" # MODIFIED + end + # resource path + local_var_path = '/zitadel.oidc.v2beta.OIDCService/GetAuthRequest' + + # 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(beta_oidc_service_get_auth_request_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaOIDCServiceGetAuthRequestResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaOIDCServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaOIDCServiceApi#get_auth_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/beta_organization_service_api.rb b/lib/zitadel/client/api/beta_organization_service_api.rb new file mode 100644 index 00000000..fd540f79 --- /dev/null +++ b/lib/zitadel/client/api/beta_organization_service_api.rb @@ -0,0 +1,90 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 BetaOrganizationServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # AddOrganization + # Create a new organization and grant the user(s) permission to manage it + # @param beta_organization_service_add_organization_request [BetaOrganizationServiceAddOrganizationRequest] + # @param [Hash] opts the optional parameters + # @return [BetaOrganizationServiceAddOrganizationResponse] + def add_organization(beta_organization_service_add_organization_request, opts = {}) + data, _status_code, _headers = add_organization_with_http_info(beta_organization_service_add_organization_request, opts) + data + end + + # AddOrganization + # Create a new organization and grant the user(s) permission to manage it + # @param beta_organization_service_add_organization_request [BetaOrganizationServiceAddOrganizationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaOrganizationServiceAddOrganizationResponse, Integer, Hash)>] BetaOrganizationServiceAddOrganizationResponse data, response status code and response headers + def add_organization_with_http_info(beta_organization_service_add_organization_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaOrganizationServiceApi.add_organization ...' # MODIFIED + end + # verify the required parameter 'beta_organization_service_add_organization_request' is set + if @api_client.config.client_side_validation && beta_organization_service_add_organization_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_organization_service_add_organization_request' when calling Api::BetaOrganizationServiceApi.add_organization" # MODIFIED + end + # resource path + local_var_path = '/zitadel.org.v2beta.OrganizationService/AddOrganization' + + # 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(beta_organization_service_add_organization_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaOrganizationServiceAddOrganizationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaOrganizationServiceApi.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::BetaOrganizationServiceApi#add_organization\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/beta_session_service_api.rb b/lib/zitadel/client/api/beta_session_service_api.rb new file mode 100644 index 00000000..7ddc7298 --- /dev/null +++ b/lib/zitadel/client/api/beta_session_service_api.rb @@ -0,0 +1,362 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 BetaSessionServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # CreateSession + # Create a new session + # @param beta_session_service_create_session_request [BetaSessionServiceCreateSessionRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSessionServiceCreateSessionResponse] + def create_session(beta_session_service_create_session_request, opts = {}) + data, _status_code, _headers = create_session_with_http_info(beta_session_service_create_session_request, opts) + data + end + + # CreateSession + # Create a new session + # @param beta_session_service_create_session_request [BetaSessionServiceCreateSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSessionServiceCreateSessionResponse, Integer, Hash)>] BetaSessionServiceCreateSessionResponse data, response status code and response headers + def create_session_with_http_info(beta_session_service_create_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSessionServiceApi.create_session ...' # MODIFIED + end + # verify the required parameter 'beta_session_service_create_session_request' is set + if @api_client.config.client_side_validation && beta_session_service_create_session_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_session_service_create_session_request' when calling Api::BetaSessionServiceApi.create_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2beta.SessionService/CreateSession' + + # 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(beta_session_service_create_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSessionServiceCreateSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSessionServiceApi.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::BetaSessionServiceApi#create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeleteSession + # Terminate a session + # @param beta_session_service_delete_session_request [BetaSessionServiceDeleteSessionRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSessionServiceDeleteSessionResponse] + def delete_session(beta_session_service_delete_session_request, opts = {}) + data, _status_code, _headers = delete_session_with_http_info(beta_session_service_delete_session_request, opts) + data + end + + # DeleteSession + # Terminate a session + # @param beta_session_service_delete_session_request [BetaSessionServiceDeleteSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSessionServiceDeleteSessionResponse, Integer, Hash)>] BetaSessionServiceDeleteSessionResponse data, response status code and response headers + def delete_session_with_http_info(beta_session_service_delete_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSessionServiceApi.delete_session ...' # MODIFIED + end + # verify the required parameter 'beta_session_service_delete_session_request' is set + if @api_client.config.client_side_validation && beta_session_service_delete_session_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_session_service_delete_session_request' when calling Api::BetaSessionServiceApi.delete_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2beta.SessionService/DeleteSession' + + # 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(beta_session_service_delete_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSessionServiceDeleteSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSessionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSessionServiceApi#delete_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetSession + # GetSession a session + # @param beta_session_service_get_session_request [BetaSessionServiceGetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSessionServiceGetSessionResponse] + def get_session(beta_session_service_get_session_request, opts = {}) + data, _status_code, _headers = get_session_with_http_info(beta_session_service_get_session_request, opts) + data + end + + # GetSession + # GetSession a session + # @param beta_session_service_get_session_request [BetaSessionServiceGetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSessionServiceGetSessionResponse, Integer, Hash)>] BetaSessionServiceGetSessionResponse data, response status code and response headers + def get_session_with_http_info(beta_session_service_get_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSessionServiceApi.get_session ...' # MODIFIED + end + # verify the required parameter 'beta_session_service_get_session_request' is set + if @api_client.config.client_side_validation && beta_session_service_get_session_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_session_service_get_session_request' when calling Api::BetaSessionServiceApi.get_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2beta.SessionService/GetSession' + + # 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(beta_session_service_get_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSessionServiceGetSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSessionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSessionServiceApi#get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListSessions + # Search sessions + # @param beta_session_service_list_sessions_request [BetaSessionServiceListSessionsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSessionServiceListSessionsResponse] + def list_sessions(beta_session_service_list_sessions_request, opts = {}) + data, _status_code, _headers = list_sessions_with_http_info(beta_session_service_list_sessions_request, opts) + data + end + + # ListSessions + # Search sessions + # @param beta_session_service_list_sessions_request [BetaSessionServiceListSessionsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSessionServiceListSessionsResponse, Integer, Hash)>] BetaSessionServiceListSessionsResponse data, response status code and response headers + def list_sessions_with_http_info(beta_session_service_list_sessions_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSessionServiceApi.list_sessions ...' # MODIFIED + end + # verify the required parameter 'beta_session_service_list_sessions_request' is set + if @api_client.config.client_side_validation && beta_session_service_list_sessions_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_session_service_list_sessions_request' when calling Api::BetaSessionServiceApi.list_sessions" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2beta.SessionService/ListSessions' + + # 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(beta_session_service_list_sessions_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSessionServiceListSessionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSessionServiceApi.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::BetaSessionServiceApi#list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetSession + # Update a session + # @param beta_session_service_set_session_request [BetaSessionServiceSetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSessionServiceSetSessionResponse] + def set_session(beta_session_service_set_session_request, opts = {}) + data, _status_code, _headers = set_session_with_http_info(beta_session_service_set_session_request, opts) + data + end + + # SetSession + # Update a session + # @param beta_session_service_set_session_request [BetaSessionServiceSetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSessionServiceSetSessionResponse, Integer, Hash)>] BetaSessionServiceSetSessionResponse data, response status code and response headers + def set_session_with_http_info(beta_session_service_set_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSessionServiceApi.set_session ...' # MODIFIED + end + # verify the required parameter 'beta_session_service_set_session_request' is set + if @api_client.config.client_side_validation && beta_session_service_set_session_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_session_service_set_session_request' when calling Api::BetaSessionServiceApi.set_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2beta.SessionService/SetSession' + + # 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(beta_session_service_set_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSessionServiceSetSessionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSessionServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSessionServiceApi#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/beta_settings_service_api.rb b/lib/zitadel/client/api/beta_settings_service_api.rb new file mode 100644 index 00000000..024deda1 --- /dev/null +++ b/lib/zitadel/client/api/beta_settings_service_api.rb @@ -0,0 +1,770 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 BetaSettingsServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # GetActiveIdentityProviders + # Get the current active identity providers + # @param beta_settings_service_get_active_identity_providers_request [BetaSettingsServiceGetActiveIdentityProvidersRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetActiveIdentityProvidersResponse] + def get_active_identity_providers(beta_settings_service_get_active_identity_providers_request, opts = {}) + data, _status_code, _headers = get_active_identity_providers_with_http_info(beta_settings_service_get_active_identity_providers_request, opts) + data + end + + # GetActiveIdentityProviders + # Get the current active identity providers + # @param beta_settings_service_get_active_identity_providers_request [BetaSettingsServiceGetActiveIdentityProvidersRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetActiveIdentityProvidersResponse, Integer, Hash)>] BetaSettingsServiceGetActiveIdentityProvidersResponse data, response status code and response headers + def get_active_identity_providers_with_http_info(beta_settings_service_get_active_identity_providers_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_active_identity_providers ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_active_identity_providers_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_active_identity_providers_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_active_identity_providers_request' when calling Api::BetaSettingsServiceApi.get_active_identity_providers" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetActiveIdentityProviders' + + # 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(beta_settings_service_get_active_identity_providers_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetActiveIdentityProvidersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_active_identity_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetBrandingSettings + # Get the current active branding settings + # @param beta_settings_service_get_branding_settings_request [BetaSettingsServiceGetBrandingSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetBrandingSettingsResponse] + def get_branding_settings(beta_settings_service_get_branding_settings_request, opts = {}) + data, _status_code, _headers = get_branding_settings_with_http_info(beta_settings_service_get_branding_settings_request, opts) + data + end + + # GetBrandingSettings + # Get the current active branding settings + # @param beta_settings_service_get_branding_settings_request [BetaSettingsServiceGetBrandingSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetBrandingSettingsResponse, Integer, Hash)>] BetaSettingsServiceGetBrandingSettingsResponse data, response status code and response headers + def get_branding_settings_with_http_info(beta_settings_service_get_branding_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_branding_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_branding_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_branding_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_branding_settings_request' when calling Api::BetaSettingsServiceApi.get_branding_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetBrandingSettings' + + # 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(beta_settings_service_get_branding_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetBrandingSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_branding_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetDomainSettings + # Get the domain settings + # @param beta_settings_service_get_domain_settings_request [BetaSettingsServiceGetDomainSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetDomainSettingsResponse] + def get_domain_settings(beta_settings_service_get_domain_settings_request, opts = {}) + data, _status_code, _headers = get_domain_settings_with_http_info(beta_settings_service_get_domain_settings_request, opts) + data + end + + # GetDomainSettings + # Get the domain settings + # @param beta_settings_service_get_domain_settings_request [BetaSettingsServiceGetDomainSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetDomainSettingsResponse, Integer, Hash)>] BetaSettingsServiceGetDomainSettingsResponse data, response status code and response headers + def get_domain_settings_with_http_info(beta_settings_service_get_domain_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_domain_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_domain_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_domain_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_domain_settings_request' when calling Api::BetaSettingsServiceApi.get_domain_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetDomainSettings' + + # 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(beta_settings_service_get_domain_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetDomainSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_domain_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetGeneralSettings + # Get basic information over the instance + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetGeneralSettingsResponse] + def get_general_settings(body, opts = {}) + data, _status_code, _headers = get_general_settings_with_http_info(body, opts) + data + end + + # GetGeneralSettings + # Get basic information over the instance + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetGeneralSettingsResponse, Integer, Hash)>] BetaSettingsServiceGetGeneralSettingsResponse data, response status code and response headers + def get_general_settings_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_general_settings ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaSettingsServiceApi.get_general_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetGeneralSettings' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetGeneralSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_general_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetLegalAndSupportSettings + # Get the legal and support settings + # @param beta_settings_service_get_legal_and_support_settings_request [BetaSettingsServiceGetLegalAndSupportSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetLegalAndSupportSettingsResponse] + def get_legal_and_support_settings(beta_settings_service_get_legal_and_support_settings_request, opts = {}) + data, _status_code, _headers = get_legal_and_support_settings_with_http_info(beta_settings_service_get_legal_and_support_settings_request, opts) + data + end + + # GetLegalAndSupportSettings + # Get the legal and support settings + # @param beta_settings_service_get_legal_and_support_settings_request [BetaSettingsServiceGetLegalAndSupportSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetLegalAndSupportSettingsResponse, Integer, Hash)>] BetaSettingsServiceGetLegalAndSupportSettingsResponse data, response status code and response headers + def get_legal_and_support_settings_with_http_info(beta_settings_service_get_legal_and_support_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_legal_and_support_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_legal_and_support_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_legal_and_support_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_legal_and_support_settings_request' when calling Api::BetaSettingsServiceApi.get_legal_and_support_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetLegalAndSupportSettings' + + # 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(beta_settings_service_get_legal_and_support_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetLegalAndSupportSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_legal_and_support_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetLockoutSettings + # Get the lockout settings + # @param beta_settings_service_get_lockout_settings_request [BetaSettingsServiceGetLockoutSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetLockoutSettingsResponse] + def get_lockout_settings(beta_settings_service_get_lockout_settings_request, opts = {}) + data, _status_code, _headers = get_lockout_settings_with_http_info(beta_settings_service_get_lockout_settings_request, opts) + data + end + + # GetLockoutSettings + # Get the lockout settings + # @param beta_settings_service_get_lockout_settings_request [BetaSettingsServiceGetLockoutSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetLockoutSettingsResponse, Integer, Hash)>] BetaSettingsServiceGetLockoutSettingsResponse data, response status code and response headers + def get_lockout_settings_with_http_info(beta_settings_service_get_lockout_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_lockout_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_lockout_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_lockout_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_lockout_settings_request' when calling Api::BetaSettingsServiceApi.get_lockout_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetLockoutSettings' + + # 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(beta_settings_service_get_lockout_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetLockoutSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_lockout_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetLoginSettings + # Get the login settings + # @param beta_settings_service_get_login_settings_request [BetaSettingsServiceGetLoginSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetLoginSettingsResponse] + def get_login_settings(beta_settings_service_get_login_settings_request, opts = {}) + data, _status_code, _headers = get_login_settings_with_http_info(beta_settings_service_get_login_settings_request, opts) + data + end + + # GetLoginSettings + # Get the login settings + # @param beta_settings_service_get_login_settings_request [BetaSettingsServiceGetLoginSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetLoginSettingsResponse, Integer, Hash)>] BetaSettingsServiceGetLoginSettingsResponse data, response status code and response headers + def get_login_settings_with_http_info(beta_settings_service_get_login_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_login_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_login_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_login_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_login_settings_request' when calling Api::BetaSettingsServiceApi.get_login_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetLoginSettings' + + # 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(beta_settings_service_get_login_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetLoginSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_login_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetPasswordComplexitySettings + # Get the password complexity settings + # @param beta_settings_service_get_password_complexity_settings_request [BetaSettingsServiceGetPasswordComplexitySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetPasswordComplexitySettingsResponse] + def get_password_complexity_settings(beta_settings_service_get_password_complexity_settings_request, opts = {}) + data, _status_code, _headers = get_password_complexity_settings_with_http_info(beta_settings_service_get_password_complexity_settings_request, opts) + data + end + + # GetPasswordComplexitySettings + # Get the password complexity settings + # @param beta_settings_service_get_password_complexity_settings_request [BetaSettingsServiceGetPasswordComplexitySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetPasswordComplexitySettingsResponse, Integer, Hash)>] BetaSettingsServiceGetPasswordComplexitySettingsResponse data, response status code and response headers + def get_password_complexity_settings_with_http_info(beta_settings_service_get_password_complexity_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_password_complexity_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_password_complexity_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_password_complexity_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_password_complexity_settings_request' when calling Api::BetaSettingsServiceApi.get_password_complexity_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetPasswordComplexitySettings' + + # 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(beta_settings_service_get_password_complexity_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetPasswordComplexitySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_password_complexity_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetPasswordExpirySettings + # Get the password expiry settings + # @param beta_settings_service_get_password_expiry_settings_request [BetaSettingsServiceGetPasswordExpirySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetPasswordExpirySettingsResponse] + def get_password_expiry_settings(beta_settings_service_get_password_expiry_settings_request, opts = {}) + data, _status_code, _headers = get_password_expiry_settings_with_http_info(beta_settings_service_get_password_expiry_settings_request, opts) + data + end + + # GetPasswordExpirySettings + # Get the password expiry settings + # @param beta_settings_service_get_password_expiry_settings_request [BetaSettingsServiceGetPasswordExpirySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetPasswordExpirySettingsResponse, Integer, Hash)>] BetaSettingsServiceGetPasswordExpirySettingsResponse data, response status code and response headers + def get_password_expiry_settings_with_http_info(beta_settings_service_get_password_expiry_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_password_expiry_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_get_password_expiry_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_get_password_expiry_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_get_password_expiry_settings_request' when calling Api::BetaSettingsServiceApi.get_password_expiry_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetPasswordExpirySettings' + + # 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(beta_settings_service_get_password_expiry_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetPasswordExpirySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_password_expiry_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetSecuritySettings + # Get the security settings + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceGetSecuritySettingsResponse] + def get_security_settings(body, opts = {}) + data, _status_code, _headers = get_security_settings_with_http_info(body, opts) + data + end + + # GetSecuritySettings + # Get the security settings + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceGetSecuritySettingsResponse, Integer, Hash)>] BetaSettingsServiceGetSecuritySettingsResponse data, response status code and response headers + def get_security_settings_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.get_security_settings ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaSettingsServiceApi.get_security_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/GetSecuritySettings' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceGetSecuritySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#get_security_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetSecuritySettings + # Set the security settings + # @param beta_settings_service_set_security_settings_request [BetaSettingsServiceSetSecuritySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [BetaSettingsServiceSetSecuritySettingsResponse] + def set_security_settings(beta_settings_service_set_security_settings_request, opts = {}) + data, _status_code, _headers = set_security_settings_with_http_info(beta_settings_service_set_security_settings_request, opts) + data + end + + # SetSecuritySettings + # Set the security settings + # @param beta_settings_service_set_security_settings_request [BetaSettingsServiceSetSecuritySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaSettingsServiceSetSecuritySettingsResponse, Integer, Hash)>] BetaSettingsServiceSetSecuritySettingsResponse data, response status code and response headers + def set_security_settings_with_http_info(beta_settings_service_set_security_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaSettingsServiceApi.set_security_settings ...' # MODIFIED + end + # verify the required parameter 'beta_settings_service_set_security_settings_request' is set + if @api_client.config.client_side_validation && beta_settings_service_set_security_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_settings_service_set_security_settings_request' when calling Api::BetaSettingsServiceApi.set_security_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2beta.SettingsService/SetSecuritySettings' + + # 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(beta_settings_service_set_security_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaSettingsServiceSetSecuritySettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaSettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaSettingsServiceApi#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/beta_user_service_api.rb b/lib/zitadel/client/api/beta_user_service_api.rb new file mode 100644 index 00000000..15fb0644 --- /dev/null +++ b/lib/zitadel/client/api/beta_user_service_api.rb @@ -0,0 +1,2334 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 BetaUserServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # AddHumanUser + # Create a new human user Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. Deprecated: please move to the corresponding endpoint under user service v2 (GA) + # @param beta_user_service_add_human_user_request [BetaUserServiceAddHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceAddHumanUserResponse] + def add_human_user(beta_user_service_add_human_user_request, opts = {}) + data, _status_code, _headers = add_human_user_with_http_info(beta_user_service_add_human_user_request, opts) + data + end + + # AddHumanUser + # Create a new human user Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. Deprecated: please move to the corresponding endpoint under user service v2 (GA) + # @param beta_user_service_add_human_user_request [BetaUserServiceAddHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceAddHumanUserResponse, Integer, Hash)>] BetaUserServiceAddHumanUserResponse data, response status code and response headers + def add_human_user_with_http_info(beta_user_service_add_human_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.add_human_user ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_add_human_user_request' is set + if @api_client.config.client_side_validation && beta_user_service_add_human_user_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_add_human_user_request' when calling Api::BetaUserServiceApi.add_human_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/AddHumanUser' + + # 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(beta_user_service_add_human_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceAddHumanUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#add_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # AddIDPLink + # Add link to an identity provider to an user Add link to an identity provider to an user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_add_idp_link_request [BetaUserServiceAddIDPLinkRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceAddIDPLinkResponse] + def add_idp_link(beta_user_service_add_idp_link_request, opts = {}) + data, _status_code, _headers = add_idp_link_with_http_info(beta_user_service_add_idp_link_request, opts) + data + end + + # AddIDPLink + # Add link to an identity provider to an user Add link to an identity provider to an user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_add_idp_link_request [BetaUserServiceAddIDPLinkRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceAddIDPLinkResponse, Integer, Hash)>] BetaUserServiceAddIDPLinkResponse data, response status code and response headers + def add_idp_link_with_http_info(beta_user_service_add_idp_link_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.add_idp_link ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_add_idp_link_request' is set + if @api_client.config.client_side_validation && beta_user_service_add_idp_link_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_add_idp_link_request' when calling Api::BetaUserServiceApi.add_idp_link" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/AddIDPLink' + + # 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(beta_user_service_add_idp_link_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceAddIDPLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#add_idp_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # AddOTPEmail + # Add OTP Email for a user Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_add_otp_email_request [BetaUserServiceAddOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceAddOTPEmailResponse] + def add_otp_email(beta_user_service_add_otp_email_request, opts = {}) + data, _status_code, _headers = add_otp_email_with_http_info(beta_user_service_add_otp_email_request, opts) + data + end + + # AddOTPEmail + # Add OTP Email for a user Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_add_otp_email_request [BetaUserServiceAddOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceAddOTPEmailResponse, Integer, Hash)>] BetaUserServiceAddOTPEmailResponse data, response status code and response headers + def add_otp_email_with_http_info(beta_user_service_add_otp_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.add_otp_email ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_add_otp_email_request' is set + if @api_client.config.client_side_validation && beta_user_service_add_otp_email_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_add_otp_email_request' when calling Api::BetaUserServiceApi.add_otp_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/AddOTPEmail' + + # 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(beta_user_service_add_otp_email_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceAddOTPEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#add_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # AddOTPSMS + # Add OTP SMS for a user Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_add_otpsms_request [BetaUserServiceAddOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceAddOTPSMSResponse] + def add_otpsms(beta_user_service_add_otpsms_request, opts = {}) + data, _status_code, _headers = add_otpsms_with_http_info(beta_user_service_add_otpsms_request, opts) + data + end + + # AddOTPSMS + # Add OTP SMS for a user Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_add_otpsms_request [BetaUserServiceAddOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceAddOTPSMSResponse, Integer, Hash)>] BetaUserServiceAddOTPSMSResponse data, response status code and response headers + def add_otpsms_with_http_info(beta_user_service_add_otpsms_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.add_otpsms ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_add_otpsms_request' is set + if @api_client.config.client_side_validation && beta_user_service_add_otpsms_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_add_otpsms_request' when calling Api::BetaUserServiceApi.add_otpsms" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/AddOTPSMS' + + # 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(beta_user_service_add_otpsms_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceAddOTPSMSResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#add_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # CreatePasskeyRegistrationLink + # Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_create_passkey_registration_link_request [BetaUserServiceCreatePasskeyRegistrationLinkRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceCreatePasskeyRegistrationLinkResponse] + def create_passkey_registration_link(beta_user_service_create_passkey_registration_link_request, opts = {}) + data, _status_code, _headers = create_passkey_registration_link_with_http_info(beta_user_service_create_passkey_registration_link_request, opts) + data + end + + # CreatePasskeyRegistrationLink + # Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_create_passkey_registration_link_request [BetaUserServiceCreatePasskeyRegistrationLinkRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceCreatePasskeyRegistrationLinkResponse, Integer, Hash)>] BetaUserServiceCreatePasskeyRegistrationLinkResponse data, response status code and response headers + def create_passkey_registration_link_with_http_info(beta_user_service_create_passkey_registration_link_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.create_passkey_registration_link ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_create_passkey_registration_link_request' is set + if @api_client.config.client_side_validation && beta_user_service_create_passkey_registration_link_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_create_passkey_registration_link_request' when calling Api::BetaUserServiceApi.create_passkey_registration_link" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/CreatePasskeyRegistrationLink' + + # 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(beta_user_service_create_passkey_registration_link_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceCreatePasskeyRegistrationLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#create_passkey_registration_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeactivateUser + # Deactivate user The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_deactivate_user_request [BetaUserServiceDeactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceDeactivateUserResponse] + def deactivate_user(beta_user_service_deactivate_user_request, opts = {}) + data, _status_code, _headers = deactivate_user_with_http_info(beta_user_service_deactivate_user_request, opts) + data + end + + # DeactivateUser + # Deactivate user The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_deactivate_user_request [BetaUserServiceDeactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceDeactivateUserResponse, Integer, Hash)>] BetaUserServiceDeactivateUserResponse data, response status code and response headers + def deactivate_user_with_http_info(beta_user_service_deactivate_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.deactivate_user ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_deactivate_user_request' is set + if @api_client.config.client_side_validation && beta_user_service_deactivate_user_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_deactivate_user_request' when calling Api::BetaUserServiceApi.deactivate_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/DeactivateUser' + + # 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(beta_user_service_deactivate_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceDeactivateUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#deactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeleteUser + # Delete user The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_delete_user_request [BetaUserServiceDeleteUserRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceDeleteUserResponse] + def delete_user(beta_user_service_delete_user_request, opts = {}) + data, _status_code, _headers = delete_user_with_http_info(beta_user_service_delete_user_request, opts) + data + end + + # DeleteUser + # Delete user The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_delete_user_request [BetaUserServiceDeleteUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceDeleteUserResponse, Integer, Hash)>] BetaUserServiceDeleteUserResponse data, response status code and response headers + def delete_user_with_http_info(beta_user_service_delete_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.delete_user ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_delete_user_request' is set + if @api_client.config.client_side_validation && beta_user_service_delete_user_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_delete_user_request' when calling Api::BetaUserServiceApi.delete_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/DeleteUser' + + # 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(beta_user_service_delete_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceDeleteUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetUserByID + # User by ID Returns the full user object (human or machine) including the profile, email, etc. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_get_user_by_id_request [BetaUserServiceGetUserByIDRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceGetUserByIDResponse] + def get_user_by_id(beta_user_service_get_user_by_id_request, opts = {}) + data, _status_code, _headers = get_user_by_id_with_http_info(beta_user_service_get_user_by_id_request, opts) + data + end + + # GetUserByID + # User by ID Returns the full user object (human or machine) including the profile, email, etc. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_get_user_by_id_request [BetaUserServiceGetUserByIDRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceGetUserByIDResponse, Integer, Hash)>] BetaUserServiceGetUserByIDResponse data, response status code and response headers + def get_user_by_id_with_http_info(beta_user_service_get_user_by_id_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.get_user_by_id ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_get_user_by_id_request' is set + if @api_client.config.client_side_validation && beta_user_service_get_user_by_id_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_get_user_by_id_request' when calling Api::BetaUserServiceApi.get_user_by_id" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/GetUserByID' + + # 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(beta_user_service_get_user_by_id_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceGetUserByIDResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#get_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListAuthenticationMethodTypes + # List all possible authentication methods of a user List all possible authentication methods of a user like password, passwordless, (T)OTP and more. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_list_authentication_method_types_request [BetaUserServiceListAuthenticationMethodTypesRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceListAuthenticationMethodTypesResponse] + def list_authentication_method_types(beta_user_service_list_authentication_method_types_request, opts = {}) + data, _status_code, _headers = list_authentication_method_types_with_http_info(beta_user_service_list_authentication_method_types_request, opts) + data + end + + # ListAuthenticationMethodTypes + # List all possible authentication methods of a user List all possible authentication methods of a user like password, passwordless, (T)OTP and more. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_list_authentication_method_types_request [BetaUserServiceListAuthenticationMethodTypesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceListAuthenticationMethodTypesResponse, Integer, Hash)>] BetaUserServiceListAuthenticationMethodTypesResponse data, response status code and response headers + def list_authentication_method_types_with_http_info(beta_user_service_list_authentication_method_types_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.list_authentication_method_types ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_list_authentication_method_types_request' is set + if @api_client.config.client_side_validation && beta_user_service_list_authentication_method_types_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_list_authentication_method_types_request' when calling Api::BetaUserServiceApi.list_authentication_method_types" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/ListAuthenticationMethodTypes' + + # 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(beta_user_service_list_authentication_method_types_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceListAuthenticationMethodTypesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#list_authentication_method_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListUsers + # Search Users Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_list_users_request [BetaUserServiceListUsersRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceListUsersResponse] + def list_users(beta_user_service_list_users_request, opts = {}) + data, _status_code, _headers = list_users_with_http_info(beta_user_service_list_users_request, opts) + data + end + + # ListUsers + # Search Users Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_list_users_request [BetaUserServiceListUsersRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceListUsersResponse, Integer, Hash)>] BetaUserServiceListUsersResponse data, response status code and response headers + def list_users_with_http_info(beta_user_service_list_users_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.list_users ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_list_users_request' is set + if @api_client.config.client_side_validation && beta_user_service_list_users_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_list_users_request' when calling Api::BetaUserServiceApi.list_users" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/ListUsers' + + # 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(beta_user_service_list_users_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceListUsersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # LockUser + # Lock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_lock_user_request [BetaUserServiceLockUserRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceLockUserResponse] + def lock_user(beta_user_service_lock_user_request, opts = {}) + data, _status_code, _headers = lock_user_with_http_info(beta_user_service_lock_user_request, opts) + data + end + + # LockUser + # Lock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_lock_user_request [BetaUserServiceLockUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceLockUserResponse, Integer, Hash)>] BetaUserServiceLockUserResponse data, response status code and response headers + def lock_user_with_http_info(beta_user_service_lock_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.lock_user ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_lock_user_request' is set + if @api_client.config.client_side_validation && beta_user_service_lock_user_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_lock_user_request' when calling Api::BetaUserServiceApi.lock_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/LockUser' + + # 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(beta_user_service_lock_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceLockUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#lock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # PasswordReset + # Request a code to reset a password Request a code to reset a password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_password_reset_request [BetaUserServicePasswordResetRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServicePasswordResetResponse] + def password_reset(beta_user_service_password_reset_request, opts = {}) + data, _status_code, _headers = password_reset_with_http_info(beta_user_service_password_reset_request, opts) + data + end + + # PasswordReset + # Request a code to reset a password Request a code to reset a password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_password_reset_request [BetaUserServicePasswordResetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServicePasswordResetResponse, Integer, Hash)>] BetaUserServicePasswordResetResponse data, response status code and response headers + def password_reset_with_http_info(beta_user_service_password_reset_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.password_reset ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_password_reset_request' is set + if @api_client.config.client_side_validation && beta_user_service_password_reset_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_password_reset_request' when calling Api::BetaUserServiceApi.password_reset" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/PasswordReset' + + # 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(beta_user_service_password_reset_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServicePasswordResetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ReactivateUser + # Reactivate user Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_reactivate_user_request [BetaUserServiceReactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceReactivateUserResponse] + def reactivate_user(beta_user_service_reactivate_user_request, opts = {}) + data, _status_code, _headers = reactivate_user_with_http_info(beta_user_service_reactivate_user_request, opts) + data + end + + # ReactivateUser + # Reactivate user Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_reactivate_user_request [BetaUserServiceReactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceReactivateUserResponse, Integer, Hash)>] BetaUserServiceReactivateUserResponse data, response status code and response headers + def reactivate_user_with_http_info(beta_user_service_reactivate_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.reactivate_user ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_reactivate_user_request' is set + if @api_client.config.client_side_validation && beta_user_service_reactivate_user_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_reactivate_user_request' when calling Api::BetaUserServiceApi.reactivate_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/ReactivateUser' + + # 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(beta_user_service_reactivate_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceReactivateUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#reactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RegisterPasskey + # Start the registration of passkey for a user Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_register_passkey_request [BetaUserServiceRegisterPasskeyRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRegisterPasskeyResponse] + def register_passkey(beta_user_service_register_passkey_request, opts = {}) + data, _status_code, _headers = register_passkey_with_http_info(beta_user_service_register_passkey_request, opts) + data + end + + # RegisterPasskey + # Start the registration of passkey for a user Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_register_passkey_request [BetaUserServiceRegisterPasskeyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRegisterPasskeyResponse, Integer, Hash)>] BetaUserServiceRegisterPasskeyResponse data, response status code and response headers + def register_passkey_with_http_info(beta_user_service_register_passkey_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.register_passkey ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_register_passkey_request' is set + if @api_client.config.client_side_validation && beta_user_service_register_passkey_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_register_passkey_request' when calling Api::BetaUserServiceApi.register_passkey" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RegisterPasskey' + + # 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(beta_user_service_register_passkey_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRegisterPasskeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#register_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RegisterTOTP + # Start the registration of a TOTP generator for a user Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_register_totp_request [BetaUserServiceRegisterTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRegisterTOTPResponse] + def register_totp(beta_user_service_register_totp_request, opts = {}) + data, _status_code, _headers = register_totp_with_http_info(beta_user_service_register_totp_request, opts) + data + end + + # RegisterTOTP + # Start the registration of a TOTP generator for a user Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_register_totp_request [BetaUserServiceRegisterTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRegisterTOTPResponse, Integer, Hash)>] BetaUserServiceRegisterTOTPResponse data, response status code and response headers + def register_totp_with_http_info(beta_user_service_register_totp_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.register_totp ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_register_totp_request' is set + if @api_client.config.client_side_validation && beta_user_service_register_totp_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_register_totp_request' when calling Api::BetaUserServiceApi.register_totp" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RegisterTOTP' + + # 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(beta_user_service_register_totp_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRegisterTOTPResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#register_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RegisterU2F + # Start the registration of a u2f token for a user Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_register_u2_f_request [BetaUserServiceRegisterU2FRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRegisterU2FResponse] + def register_u2_f(beta_user_service_register_u2_f_request, opts = {}) + data, _status_code, _headers = register_u2_f_with_http_info(beta_user_service_register_u2_f_request, opts) + data + end + + # RegisterU2F + # Start the registration of a u2f token for a user Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_register_u2_f_request [BetaUserServiceRegisterU2FRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRegisterU2FResponse, Integer, Hash)>] BetaUserServiceRegisterU2FResponse data, response status code and response headers + def register_u2_f_with_http_info(beta_user_service_register_u2_f_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.register_u2_f ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_register_u2_f_request' is set + if @api_client.config.client_side_validation && beta_user_service_register_u2_f_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_register_u2_f_request' when calling Api::BetaUserServiceApi.register_u2_f" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RegisterU2F' + + # 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(beta_user_service_register_u2_f_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRegisterU2FResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#register_u2_f\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveOTPEmail + # Remove One-Time Password (OTP) Email from a user Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_otp_email_request [BetaUserServiceRemoveOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRemoveOTPEmailResponse] + def remove_otp_email(beta_user_service_remove_otp_email_request, opts = {}) + data, _status_code, _headers = remove_otp_email_with_http_info(beta_user_service_remove_otp_email_request, opts) + data + end + + # RemoveOTPEmail + # Remove One-Time Password (OTP) Email from a user Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_otp_email_request [BetaUserServiceRemoveOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRemoveOTPEmailResponse, Integer, Hash)>] BetaUserServiceRemoveOTPEmailResponse data, response status code and response headers + def remove_otp_email_with_http_info(beta_user_service_remove_otp_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.remove_otp_email ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_remove_otp_email_request' is set + if @api_client.config.client_side_validation && beta_user_service_remove_otp_email_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_remove_otp_email_request' when calling Api::BetaUserServiceApi.remove_otp_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RemoveOTPEmail' + + # 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(beta_user_service_remove_otp_email_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRemoveOTPEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#remove_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveOTPSMS + # Remove One-Time Password (OTP) SMS from a user Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_otpsms_request [BetaUserServiceRemoveOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRemoveOTPSMSResponse] + def remove_otpsms(beta_user_service_remove_otpsms_request, opts = {}) + data, _status_code, _headers = remove_otpsms_with_http_info(beta_user_service_remove_otpsms_request, opts) + data + end + + # RemoveOTPSMS + # Remove One-Time Password (OTP) SMS from a user Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_otpsms_request [BetaUserServiceRemoveOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRemoveOTPSMSResponse, Integer, Hash)>] BetaUserServiceRemoveOTPSMSResponse data, response status code and response headers + def remove_otpsms_with_http_info(beta_user_service_remove_otpsms_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.remove_otpsms ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_remove_otpsms_request' is set + if @api_client.config.client_side_validation && beta_user_service_remove_otpsms_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_remove_otpsms_request' when calling Api::BetaUserServiceApi.remove_otpsms" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RemoveOTPSMS' + + # 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(beta_user_service_remove_otpsms_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRemoveOTPSMSResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#remove_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemovePhone + # Remove the user phone Remove the user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_phone_request [BetaUserServiceRemovePhoneRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRemovePhoneResponse] + def remove_phone(beta_user_service_remove_phone_request, opts = {}) + data, _status_code, _headers = remove_phone_with_http_info(beta_user_service_remove_phone_request, opts) + data + end + + # RemovePhone + # Remove the user phone Remove the user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_phone_request [BetaUserServiceRemovePhoneRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRemovePhoneResponse, Integer, Hash)>] BetaUserServiceRemovePhoneResponse data, response status code and response headers + def remove_phone_with_http_info(beta_user_service_remove_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.remove_phone ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_remove_phone_request' is set + if @api_client.config.client_side_validation && beta_user_service_remove_phone_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_remove_phone_request' when calling Api::BetaUserServiceApi.remove_phone" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RemovePhone' + + # 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(beta_user_service_remove_phone_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRemovePhoneResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#remove_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveTOTP + # Remove TOTP generator from a user Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_totp_request [BetaUserServiceRemoveTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRemoveTOTPResponse] + def remove_totp(beta_user_service_remove_totp_request, opts = {}) + data, _status_code, _headers = remove_totp_with_http_info(beta_user_service_remove_totp_request, opts) + data + end + + # RemoveTOTP + # Remove TOTP generator from a user Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_remove_totp_request [BetaUserServiceRemoveTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRemoveTOTPResponse, Integer, Hash)>] BetaUserServiceRemoveTOTPResponse data, response status code and response headers + def remove_totp_with_http_info(beta_user_service_remove_totp_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.remove_totp ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_remove_totp_request' is set + if @api_client.config.client_side_validation && beta_user_service_remove_totp_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_remove_totp_request' when calling Api::BetaUserServiceApi.remove_totp" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RemoveTOTP' + + # 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(beta_user_service_remove_totp_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRemoveTOTPResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#remove_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResendEmailCode + # Resend code to verify user email Resend code to verify user email Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_resend_email_code_request [BetaUserServiceResendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceResendEmailCodeResponse] + def resend_email_code(beta_user_service_resend_email_code_request, opts = {}) + data, _status_code, _headers = resend_email_code_with_http_info(beta_user_service_resend_email_code_request, opts) + data + end + + # ResendEmailCode + # Resend code to verify user email Resend code to verify user email Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_resend_email_code_request [BetaUserServiceResendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceResendEmailCodeResponse, Integer, Hash)>] BetaUserServiceResendEmailCodeResponse data, response status code and response headers + def resend_email_code_with_http_info(beta_user_service_resend_email_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.resend_email_code ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_resend_email_code_request' is set + if @api_client.config.client_side_validation && beta_user_service_resend_email_code_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_resend_email_code_request' when calling Api::BetaUserServiceApi.resend_email_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/ResendEmailCode' + + # 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(beta_user_service_resend_email_code_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceResendEmailCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#resend_email_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResendPhoneCode + # Resend code to verify user phone Resend code to verify user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_resend_phone_code_request [BetaUserServiceResendPhoneCodeRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceResendPhoneCodeResponse] + def resend_phone_code(beta_user_service_resend_phone_code_request, opts = {}) + data, _status_code, _headers = resend_phone_code_with_http_info(beta_user_service_resend_phone_code_request, opts) + data + end + + # ResendPhoneCode + # Resend code to verify user phone Resend code to verify user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_resend_phone_code_request [BetaUserServiceResendPhoneCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceResendPhoneCodeResponse, Integer, Hash)>] BetaUserServiceResendPhoneCodeResponse data, response status code and response headers + def resend_phone_code_with_http_info(beta_user_service_resend_phone_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.resend_phone_code ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_resend_phone_code_request' is set + if @api_client.config.client_side_validation && beta_user_service_resend_phone_code_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_resend_phone_code_request' when calling Api::BetaUserServiceApi.resend_phone_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/ResendPhoneCode' + + # 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(beta_user_service_resend_phone_code_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceResendPhoneCodeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#resend_phone_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RetrieveIdentityProviderIntent + # Retrieve the information returned by the identity provider Retrieve the information returned by the identity provider for registration or updating an existing user with new information. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_retrieve_identity_provider_intent_request [BetaUserServiceRetrieveIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceRetrieveIdentityProviderIntentResponse] + def retrieve_identity_provider_intent(beta_user_service_retrieve_identity_provider_intent_request, opts = {}) + data, _status_code, _headers = retrieve_identity_provider_intent_with_http_info(beta_user_service_retrieve_identity_provider_intent_request, opts) + data + end + + # RetrieveIdentityProviderIntent + # Retrieve the information returned by the identity provider Retrieve the information returned by the identity provider for registration or updating an existing user with new information. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_retrieve_identity_provider_intent_request [BetaUserServiceRetrieveIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceRetrieveIdentityProviderIntentResponse, Integer, Hash)>] BetaUserServiceRetrieveIdentityProviderIntentResponse data, response status code and response headers + def retrieve_identity_provider_intent_with_http_info(beta_user_service_retrieve_identity_provider_intent_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.retrieve_identity_provider_intent ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_retrieve_identity_provider_intent_request' is set + if @api_client.config.client_side_validation && beta_user_service_retrieve_identity_provider_intent_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_retrieve_identity_provider_intent_request' when calling Api::BetaUserServiceApi.retrieve_identity_provider_intent" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/RetrieveIdentityProviderIntent' + + # 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(beta_user_service_retrieve_identity_provider_intent_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceRetrieveIdentityProviderIntentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#retrieve_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetEmail + # Change the user email Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_set_email_request [BetaUserServiceSetEmailRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceSetEmailResponse] + def set_email(beta_user_service_set_email_request, opts = {}) + data, _status_code, _headers = set_email_with_http_info(beta_user_service_set_email_request, opts) + data + end + + # SetEmail + # Change the user email Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_set_email_request [BetaUserServiceSetEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceSetEmailResponse, Integer, Hash)>] BetaUserServiceSetEmailResponse data, response status code and response headers + def set_email_with_http_info(beta_user_service_set_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.set_email ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_set_email_request' is set + if @api_client.config.client_side_validation && beta_user_service_set_email_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_set_email_request' when calling Api::BetaUserServiceApi.set_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/SetEmail' + + # 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(beta_user_service_set_email_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceSetEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#set_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetPassword + # Change password Change the password of a user with either a verification code or the current password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_set_password_request [BetaUserServiceSetPasswordRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceSetPasswordResponse] + def set_password(beta_user_service_set_password_request, opts = {}) + data, _status_code, _headers = set_password_with_http_info(beta_user_service_set_password_request, opts) + data + end + + # SetPassword + # Change password Change the password of a user with either a verification code or the current password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_set_password_request [BetaUserServiceSetPasswordRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceSetPasswordResponse, Integer, Hash)>] BetaUserServiceSetPasswordResponse data, response status code and response headers + def set_password_with_http_info(beta_user_service_set_password_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.set_password ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_set_password_request' is set + if @api_client.config.client_side_validation && beta_user_service_set_password_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_set_password_request' when calling Api::BetaUserServiceApi.set_password" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/SetPassword' + + # 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(beta_user_service_set_password_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceSetPasswordResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#set_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetPhone + # Set the user phone Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_set_phone_request [BetaUserServiceSetPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceSetPhoneResponse] + def set_phone(beta_user_service_set_phone_request, opts = {}) + data, _status_code, _headers = set_phone_with_http_info(beta_user_service_set_phone_request, opts) + data + end + + # SetPhone + # Set the user phone Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_set_phone_request [BetaUserServiceSetPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceSetPhoneResponse, Integer, Hash)>] BetaUserServiceSetPhoneResponse data, response status code and response headers + def set_phone_with_http_info(beta_user_service_set_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.set_phone ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_set_phone_request' is set + if @api_client.config.client_side_validation && beta_user_service_set_phone_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_set_phone_request' when calling Api::BetaUserServiceApi.set_phone" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/SetPhone' + + # 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(beta_user_service_set_phone_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceSetPhoneResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#set_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # StartIdentityProviderIntent + # Start flow with an identity provider Start a flow with an identity provider, for external login, registration or linking. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_start_identity_provider_intent_request [BetaUserServiceStartIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceStartIdentityProviderIntentResponse] + def start_identity_provider_intent(beta_user_service_start_identity_provider_intent_request, opts = {}) + data, _status_code, _headers = start_identity_provider_intent_with_http_info(beta_user_service_start_identity_provider_intent_request, opts) + data + end + + # StartIdentityProviderIntent + # Start flow with an identity provider Start a flow with an identity provider, for external login, registration or linking. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_start_identity_provider_intent_request [BetaUserServiceStartIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceStartIdentityProviderIntentResponse, Integer, Hash)>] BetaUserServiceStartIdentityProviderIntentResponse data, response status code and response headers + def start_identity_provider_intent_with_http_info(beta_user_service_start_identity_provider_intent_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.start_identity_provider_intent ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_start_identity_provider_intent_request' is set + if @api_client.config.client_side_validation && beta_user_service_start_identity_provider_intent_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_start_identity_provider_intent_request' when calling Api::BetaUserServiceApi.start_identity_provider_intent" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/StartIdentityProviderIntent' + + # 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(beta_user_service_start_identity_provider_intent_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceStartIdentityProviderIntentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#start_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # UnlockUser + # Unlock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_unlock_user_request [BetaUserServiceUnlockUserRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceUnlockUserResponse] + def unlock_user(beta_user_service_unlock_user_request, opts = {}) + data, _status_code, _headers = unlock_user_with_http_info(beta_user_service_unlock_user_request, opts) + data + end + + # UnlockUser + # Unlock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_unlock_user_request [BetaUserServiceUnlockUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceUnlockUserResponse, Integer, Hash)>] BetaUserServiceUnlockUserResponse data, response status code and response headers + def unlock_user_with_http_info(beta_user_service_unlock_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.unlock_user ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_unlock_user_request' is set + if @api_client.config.client_side_validation && beta_user_service_unlock_user_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_unlock_user_request' when calling Api::BetaUserServiceApi.unlock_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/UnlockUser' + + # 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(beta_user_service_unlock_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceUnlockUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#unlock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # UpdateHumanUser + # Update User Update all information from a user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_update_human_user_request [BetaUserServiceUpdateHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceUpdateHumanUserResponse] + def update_human_user(beta_user_service_update_human_user_request, opts = {}) + data, _status_code, _headers = update_human_user_with_http_info(beta_user_service_update_human_user_request, opts) + data + end + + # UpdateHumanUser + # Update User Update all information from a user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_update_human_user_request [BetaUserServiceUpdateHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceUpdateHumanUserResponse, Integer, Hash)>] BetaUserServiceUpdateHumanUserResponse data, response status code and response headers + def update_human_user_with_http_info(beta_user_service_update_human_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.update_human_user ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_update_human_user_request' is set + if @api_client.config.client_side_validation && beta_user_service_update_human_user_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_update_human_user_request' when calling Api::BetaUserServiceApi.update_human_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/UpdateHumanUser' + + # 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(beta_user_service_update_human_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceUpdateHumanUserResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaUserServiceApi#update_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyEmail + # Verify the email Verify the email with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_email_request [BetaUserServiceVerifyEmailRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceVerifyEmailResponse] + def verify_email(beta_user_service_verify_email_request, opts = {}) + data, _status_code, _headers = verify_email_with_http_info(beta_user_service_verify_email_request, opts) + data + end + + # VerifyEmail + # Verify the email Verify the email with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_email_request [BetaUserServiceVerifyEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceVerifyEmailResponse, Integer, Hash)>] BetaUserServiceVerifyEmailResponse data, response status code and response headers + def verify_email_with_http_info(beta_user_service_verify_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.verify_email ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_verify_email_request' is set + if @api_client.config.client_side_validation && beta_user_service_verify_email_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_verify_email_request' when calling Api::BetaUserServiceApi.verify_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/VerifyEmail' + + # 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(beta_user_service_verify_email_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceVerifyEmailResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#verify_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyPasskeyRegistration + # Verify a passkey for a user Verify the passkey registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_passkey_registration_request [BetaUserServiceVerifyPasskeyRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceVerifyPasskeyRegistrationResponse] + def verify_passkey_registration(beta_user_service_verify_passkey_registration_request, opts = {}) + data, _status_code, _headers = verify_passkey_registration_with_http_info(beta_user_service_verify_passkey_registration_request, opts) + data + end + + # VerifyPasskeyRegistration + # Verify a passkey for a user Verify the passkey registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_passkey_registration_request [BetaUserServiceVerifyPasskeyRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceVerifyPasskeyRegistrationResponse, Integer, Hash)>] BetaUserServiceVerifyPasskeyRegistrationResponse data, response status code and response headers + def verify_passkey_registration_with_http_info(beta_user_service_verify_passkey_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.verify_passkey_registration ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_verify_passkey_registration_request' is set + if @api_client.config.client_side_validation && beta_user_service_verify_passkey_registration_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_verify_passkey_registration_request' when calling Api::BetaUserServiceApi.verify_passkey_registration" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/VerifyPasskeyRegistration' + + # 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(beta_user_service_verify_passkey_registration_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceVerifyPasskeyRegistrationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#verify_passkey_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyPhone + # Verify the phone Verify the phone with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_phone_request [BetaUserServiceVerifyPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceVerifyPhoneResponse] + def verify_phone(beta_user_service_verify_phone_request, opts = {}) + data, _status_code, _headers = verify_phone_with_http_info(beta_user_service_verify_phone_request, opts) + data + end + + # VerifyPhone + # Verify the phone Verify the phone with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_phone_request [BetaUserServiceVerifyPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceVerifyPhoneResponse, Integer, Hash)>] BetaUserServiceVerifyPhoneResponse data, response status code and response headers + def verify_phone_with_http_info(beta_user_service_verify_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.verify_phone ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_verify_phone_request' is set + if @api_client.config.client_side_validation && beta_user_service_verify_phone_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_verify_phone_request' when calling Api::BetaUserServiceApi.verify_phone" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/VerifyPhone' + + # 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(beta_user_service_verify_phone_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceVerifyPhoneResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#verify_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyTOTPRegistration + # Verify a TOTP generator for a user Verify the TOTP registration with a generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_totp_registration_request [BetaUserServiceVerifyTOTPRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceVerifyTOTPRegistrationResponse] + def verify_totp_registration(beta_user_service_verify_totp_registration_request, opts = {}) + data, _status_code, _headers = verify_totp_registration_with_http_info(beta_user_service_verify_totp_registration_request, opts) + data + end + + # VerifyTOTPRegistration + # Verify a TOTP generator for a user Verify the TOTP registration with a generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_totp_registration_request [BetaUserServiceVerifyTOTPRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceVerifyTOTPRegistrationResponse, Integer, Hash)>] BetaUserServiceVerifyTOTPRegistrationResponse data, response status code and response headers + def verify_totp_registration_with_http_info(beta_user_service_verify_totp_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.verify_totp_registration ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_verify_totp_registration_request' is set + if @api_client.config.client_side_validation && beta_user_service_verify_totp_registration_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_verify_totp_registration_request' when calling Api::BetaUserServiceApi.verify_totp_registration" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/VerifyTOTPRegistration' + + # 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(beta_user_service_verify_totp_registration_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceVerifyTOTPRegistrationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#verify_totp_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyU2FRegistration + # Verify a u2f token for a user Verify the u2f token registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_u2_f_registration_request [BetaUserServiceVerifyU2FRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [BetaUserServiceVerifyU2FRegistrationResponse] + def verify_u2_f_registration(beta_user_service_verify_u2_f_registration_request, opts = {}) + data, _status_code, _headers = verify_u2_f_registration_with_http_info(beta_user_service_verify_u2_f_registration_request, opts) + data + end + + # VerifyU2FRegistration + # Verify a u2f token for a user Verify the u2f token registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + # @param beta_user_service_verify_u2_f_registration_request [BetaUserServiceVerifyU2FRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaUserServiceVerifyU2FRegistrationResponse, Integer, Hash)>] BetaUserServiceVerifyU2FRegistrationResponse data, response status code and response headers + def verify_u2_f_registration_with_http_info(beta_user_service_verify_u2_f_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaUserServiceApi.verify_u2_f_registration ...' # MODIFIED + end + # verify the required parameter 'beta_user_service_verify_u2_f_registration_request' is set + if @api_client.config.client_side_validation && beta_user_service_verify_u2_f_registration_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_user_service_verify_u2_f_registration_request' when calling Api::BetaUserServiceApi.verify_u2_f_registration" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2beta.UserService/VerifyU2FRegistration' + + # 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(beta_user_service_verify_u2_f_registration_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaUserServiceVerifyU2FRegistrationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaUserServiceApi.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::BetaUserServiceApi#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/beta_web_key_service_api.rb b/lib/zitadel/client/api/beta_web_key_service_api.rb new file mode 100644 index 00000000..e6caeefd --- /dev/null +++ b/lib/zitadel/client/api/beta_web_key_service_api.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 'cgi' + +module Zitadel::Client::Api + class BetaWebKeyServiceApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # ActivateWebKey + # 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 beta_web_key_service_activate_web_key_request [BetaWebKeyServiceActivateWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [BetaWebKeyServiceActivateWebKeyResponse] + def activate_web_key(beta_web_key_service_activate_web_key_request, opts = {}) + data, _status_code, _headers = activate_web_key_with_http_info(beta_web_key_service_activate_web_key_request, opts) + data + end + + # ActivateWebKey + # 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 beta_web_key_service_activate_web_key_request [BetaWebKeyServiceActivateWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaWebKeyServiceActivateWebKeyResponse, Integer, Hash)>] BetaWebKeyServiceActivateWebKeyResponse data, response status code and response headers + def activate_web_key_with_http_info(beta_web_key_service_activate_web_key_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaWebKeyServiceApi.activate_web_key ...' # MODIFIED + end + # verify the required parameter 'beta_web_key_service_activate_web_key_request' is set + if @api_client.config.client_side_validation && beta_web_key_service_activate_web_key_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_web_key_service_activate_web_key_request' when calling Api::BetaWebKeyServiceApi.activate_web_key" # MODIFIED + end + # resource path + local_var_path = '/zitadel.webkey.v2beta.WebKeyService/ActivateWebKey' + + # 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(beta_web_key_service_activate_web_key_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaWebKeyServiceActivateWebKeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaWebKeyServiceApi.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::BetaWebKeyServiceApi#activate_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # CreateWebKey + # 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 beta_web_key_service_create_web_key_request [BetaWebKeyServiceCreateWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [BetaWebKeyServiceCreateWebKeyResponse] + def create_web_key(beta_web_key_service_create_web_key_request, opts = {}) + data, _status_code, _headers = create_web_key_with_http_info(beta_web_key_service_create_web_key_request, opts) + data + end + + # CreateWebKey + # 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 beta_web_key_service_create_web_key_request [BetaWebKeyServiceCreateWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaWebKeyServiceCreateWebKeyResponse, Integer, Hash)>] BetaWebKeyServiceCreateWebKeyResponse data, response status code and response headers + def create_web_key_with_http_info(beta_web_key_service_create_web_key_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaWebKeyServiceApi.create_web_key ...' # MODIFIED + end + # verify the required parameter 'beta_web_key_service_create_web_key_request' is set + if @api_client.config.client_side_validation && beta_web_key_service_create_web_key_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_web_key_service_create_web_key_request' when calling Api::BetaWebKeyServiceApi.create_web_key" # MODIFIED + end + # resource path + local_var_path = '/zitadel.webkey.v2beta.WebKeyService/CreateWebKey' + + # 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(beta_web_key_service_create_web_key_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaWebKeyServiceCreateWebKeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaWebKeyServiceApi.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::BetaWebKeyServiceApi#create_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeleteWebKey + # 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 beta_web_key_service_delete_web_key_request [BetaWebKeyServiceDeleteWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [BetaWebKeyServiceDeleteWebKeyResponse] + def delete_web_key(beta_web_key_service_delete_web_key_request, opts = {}) + data, _status_code, _headers = delete_web_key_with_http_info(beta_web_key_service_delete_web_key_request, opts) + data + end + + # DeleteWebKey + # 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 beta_web_key_service_delete_web_key_request [BetaWebKeyServiceDeleteWebKeyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaWebKeyServiceDeleteWebKeyResponse, Integer, Hash)>] BetaWebKeyServiceDeleteWebKeyResponse data, response status code and response headers + def delete_web_key_with_http_info(beta_web_key_service_delete_web_key_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaWebKeyServiceApi.delete_web_key ...' # MODIFIED + end + # verify the required parameter 'beta_web_key_service_delete_web_key_request' is set + if @api_client.config.client_side_validation && beta_web_key_service_delete_web_key_request.nil? + fail ArgumentError, "Missing the required parameter 'beta_web_key_service_delete_web_key_request' when calling Api::BetaWebKeyServiceApi.delete_web_key" # MODIFIED + end + # resource path + local_var_path = '/zitadel.webkey.v2beta.WebKeyService/DeleteWebKey' + + # 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(beta_web_key_service_delete_web_key_request) + + # return_type + return_type = opts[:debug_return_type] || 'BetaWebKeyServiceDeleteWebKeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaWebKeyServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaWebKeyServiceApi#delete_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListWebKeys + # List Web Keys List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [BetaWebKeyServiceListWebKeysResponse] + def list_web_keys(body, opts = {}) + data, _status_code, _headers = list_web_keys_with_http_info(body, opts) + data + end + + # ListWebKeys + # List Web Keys List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(BetaWebKeyServiceListWebKeysResponse, Integer, Hash)>] BetaWebKeyServiceListWebKeysResponse data, response status code and response headers + def list_web_keys_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::BetaWebKeyServiceApi.list_web_keys ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::BetaWebKeyServiceApi.list_web_keys" # MODIFIED + end + # resource path + local_var_path = '/zitadel.webkey.v2beta.WebKeyService/ListWebKeys' + + # 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(body) + + # return_type + return_type = opts[:debug_return_type] || 'BetaWebKeyServiceListWebKeysResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['zitadelAccessToken'] + + new_options = opts.merge( + :operation => :"Api::BetaWebKeyServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::BetaWebKeyServiceApi#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/api/feature_service_api.rb b/lib/zitadel/client/api/feature_service_api.rb new file mode 100644 index 00000000..2aaab091 --- /dev/null +++ b/lib/zitadel/client/api/feature_service_api.rb @@ -0,0 +1,838 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 + # GetInstanceFeatures + # Get Instance Features Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + # @param feature_service_get_instance_features_request [FeatureServiceGetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceGetInstanceFeaturesResponse] + def get_instance_features(feature_service_get_instance_features_request, opts = {}) + data, _status_code, _headers = get_instance_features_with_http_info(feature_service_get_instance_features_request, opts) + data + end + + # GetInstanceFeatures + # Get Instance Features Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + # @param feature_service_get_instance_features_request [FeatureServiceGetInstanceFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceGetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceGetInstanceFeaturesResponse data, response status code and response headers + def get_instance_features_with_http_info(feature_service_get_instance_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.get_instance_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_get_instance_features_request' is set + if @api_client.config.client_side_validation && feature_service_get_instance_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_get_instance_features_request' when calling Api::FeatureServiceApi.get_instance_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/GetInstanceFeatures' + + # 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_get_instance_features_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#get_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetOrganizationFeatures + # 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 feature_service_get_organization_features_request [FeatureServiceGetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceGetOrganizationFeaturesResponse] + def get_organization_features(feature_service_get_organization_features_request, opts = {}) + data, _status_code, _headers = get_organization_features_with_http_info(feature_service_get_organization_features_request, opts) + data + end + + # GetOrganizationFeatures + # 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 feature_service_get_organization_features_request [FeatureServiceGetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceGetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceGetOrganizationFeaturesResponse data, response status code and response headers + def get_organization_features_with_http_info(feature_service_get_organization_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.get_organization_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_get_organization_features_request' is set + if @api_client.config.client_side_validation && feature_service_get_organization_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_get_organization_features_request' when calling Api::FeatureServiceApi.get_organization_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/GetOrganizationFeatures' + + # 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_get_organization_features_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#get_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetSystemFeatures + # Get System Features Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceGetSystemFeaturesResponse] + def get_system_features(body, opts = {}) + data, _status_code, _headers = get_system_features_with_http_info(body, opts) + data + end + + # GetSystemFeatures + # Get System Features Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceGetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceGetSystemFeaturesResponse data, response status code and response headers + def get_system_features_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.get_system_features ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::FeatureServiceApi.get_system_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/GetSystemFeatures' + + # 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(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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#get_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetUserFeatures + # 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 feature_service_get_user_features_request [FeatureServiceGetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceGetUserFeaturesResponse] + def get_user_features(feature_service_get_user_features_request, opts = {}) + data, _status_code, _headers = get_user_features_with_http_info(feature_service_get_user_features_request, opts) + data + end + + # GetUserFeatures + # 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 feature_service_get_user_features_request [FeatureServiceGetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceGetUserFeaturesResponse, Integer, Hash)>] FeatureServiceGetUserFeaturesResponse data, response status code and response headers + def get_user_features_with_http_info(feature_service_get_user_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.get_user_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_get_user_features_request' is set + if @api_client.config.client_side_validation && feature_service_get_user_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_get_user_features_request' when calling Api::FeatureServiceApi.get_user_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/GetUserFeatures' + + # 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_get_user_features_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#get_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetInstanceFeatures + # Reset Instance Features Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetInstanceFeaturesResponse] + def reset_instance_features(body, opts = {}) + data, _status_code, _headers = reset_instance_features_with_http_info(body, opts) + data + end + + # ResetInstanceFeatures + # Reset Instance Features Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetInstanceFeaturesResponse, Integer, Hash)>] FeatureServiceResetInstanceFeaturesResponse data, response status code and response headers + def reset_instance_features_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.reset_instance_features ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::FeatureServiceApi.reset_instance_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/ResetInstanceFeatures' + + # 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(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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#reset_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetOrganizationFeatures + # Reset Organization Features Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + # @param feature_service_reset_organization_features_request [FeatureServiceResetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetOrganizationFeaturesResponse] + def reset_organization_features(feature_service_reset_organization_features_request, opts = {}) + data, _status_code, _headers = reset_organization_features_with_http_info(feature_service_reset_organization_features_request, opts) + data + end + + # ResetOrganizationFeatures + # Reset Organization Features Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + # @param feature_service_reset_organization_features_request [FeatureServiceResetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceResetOrganizationFeaturesResponse data, response status code and response headers + def reset_organization_features_with_http_info(feature_service_reset_organization_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.reset_organization_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_reset_organization_features_request' is set + if @api_client.config.client_side_validation && feature_service_reset_organization_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_reset_organization_features_request' when calling Api::FeatureServiceApi.reset_organization_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/ResetOrganizationFeatures' + + # 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_reset_organization_features_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#reset_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetSystemFeatures + # Reset System Features Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetSystemFeaturesResponse] + def reset_system_features(body, opts = {}) + data, _status_code, _headers = reset_system_features_with_http_info(body, opts) + data + end + + # ResetSystemFeatures + # Reset System Features Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetSystemFeaturesResponse, Integer, Hash)>] FeatureServiceResetSystemFeaturesResponse data, response status code and response headers + def reset_system_features_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.reset_system_features ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::FeatureServiceApi.reset_system_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/ResetSystemFeatures' + + # 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(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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#reset_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResetUserFeatures + # Reset User Features Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + # @param feature_service_reset_user_features_request [FeatureServiceResetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceResetUserFeaturesResponse] + def reset_user_features(feature_service_reset_user_features_request, opts = {}) + data, _status_code, _headers = reset_user_features_with_http_info(feature_service_reset_user_features_request, opts) + data + end + + # ResetUserFeatures + # Reset User Features Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + # @param feature_service_reset_user_features_request [FeatureServiceResetUserFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceResetUserFeaturesResponse, Integer, Hash)>] FeatureServiceResetUserFeaturesResponse data, response status code and response headers + def reset_user_features_with_http_info(feature_service_reset_user_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.reset_user_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_reset_user_features_request' is set + if @api_client.config.client_side_validation && feature_service_reset_user_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_reset_user_features_request' when calling Api::FeatureServiceApi.reset_user_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/ResetUserFeatures' + + # 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_reset_user_features_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#reset_user_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetInstanceFeatures + # 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 set_instance_features(feature_service_set_instance_features_request, opts = {}) + data, _status_code, _headers = set_instance_features_with_http_info(feature_service_set_instance_features_request, opts) + data + end + + # SetInstanceFeatures + # 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 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.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.set_instance_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/SetInstanceFeatures' + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#set_instance_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetOrganizationFeatures + # 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 feature_service_set_organization_features_request [FeatureServiceSetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceSetOrganizationFeaturesResponse] + def set_organization_features(feature_service_set_organization_features_request, opts = {}) + data, _status_code, _headers = set_organization_features_with_http_info(feature_service_set_organization_features_request, opts) + data + end + + # SetOrganizationFeatures + # 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 feature_service_set_organization_features_request [FeatureServiceSetOrganizationFeaturesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceSetOrganizationFeaturesResponse, Integer, Hash)>] FeatureServiceSetOrganizationFeaturesResponse data, response status code and response headers + def set_organization_features_with_http_info(feature_service_set_organization_features_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.set_organization_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_set_organization_features_request' is set + if @api_client.config.client_side_validation && feature_service_set_organization_features_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_set_organization_features_request' when calling Api::FeatureServiceApi.set_organization_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/SetOrganizationFeatures' + + # 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_organization_features_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#set_organization_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetSystemFeatures + # 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 set_system_features(feature_service_set_system_features_request, opts = {}) + data, _status_code, _headers = set_system_features_with_http_info(feature_service_set_system_features_request, opts) + data + end + + # SetSystemFeatures + # 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 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.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.set_system_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/SetSystemFeatures' + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#set_system_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetUserFeatures + # 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 feature_service_set_user_feature_request [FeatureServiceSetUserFeatureRequest] + # @param [Hash] opts the optional parameters + # @return [FeatureServiceSetUserFeaturesResponse] + def set_user_features(feature_service_set_user_feature_request, opts = {}) + data, _status_code, _headers = set_user_features_with_http_info(feature_service_set_user_feature_request, opts) + data + end + + # SetUserFeatures + # 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 feature_service_set_user_feature_request [FeatureServiceSetUserFeatureRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FeatureServiceSetUserFeaturesResponse, Integer, Hash)>] FeatureServiceSetUserFeaturesResponse data, response status code and response headers + def set_user_features_with_http_info(feature_service_set_user_feature_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::FeatureServiceApi.set_user_features ...' # MODIFIED + end + # verify the required parameter 'feature_service_set_user_feature_request' is set + if @api_client.config.client_side_validation && feature_service_set_user_feature_request.nil? + fail ArgumentError, "Missing the required parameter 'feature_service_set_user_feature_request' when calling Api::FeatureServiceApi.set_user_features" # MODIFIED + end + # resource path + local_var_path = '/zitadel.feature.v2.FeatureService/SetUserFeatures' + + # 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_user_feature_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::FeatureServiceApi#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..6266f8d5 --- /dev/null +++ b/lib/zitadel/client/api/identity_provider_service_api.rb @@ -0,0 +1,90 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 + # GetIDPByID + # 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 identity_provider_service_get_idpby_id_request [IdentityProviderServiceGetIDPByIDRequest] + # @param [Hash] opts the optional parameters + # @return [IdentityProviderServiceGetIDPByIDResponse] + def get_idpby_id(identity_provider_service_get_idpby_id_request, opts = {}) + data, _status_code, _headers = get_idpby_id_with_http_info(identity_provider_service_get_idpby_id_request, opts) + data + end + + # GetIDPByID + # 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 identity_provider_service_get_idpby_id_request [IdentityProviderServiceGetIDPByIDRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(IdentityProviderServiceGetIDPByIDResponse, Integer, Hash)>] IdentityProviderServiceGetIDPByIDResponse data, response status code and response headers + def get_idpby_id_with_http_info(identity_provider_service_get_idpby_id_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::IdentityProviderServiceApi.get_idpby_id ...' # MODIFIED + end + # verify the required parameter 'identity_provider_service_get_idpby_id_request' is set + if @api_client.config.client_side_validation && identity_provider_service_get_idpby_id_request.nil? + fail ArgumentError, "Missing the required parameter 'identity_provider_service_get_idpby_id_request' when calling Api::IdentityProviderServiceApi.get_idpby_id" # MODIFIED + end + # resource path + local_var_path = '/zitadel.idp.v2.IdentityProviderService/GetIDPByID' + + # 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(identity_provider_service_get_idpby_id_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::IdentityProviderServiceApi#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..b225091f --- /dev/null +++ b/lib/zitadel/client/api/o_i_d_c_service_api.rb @@ -0,0 +1,290 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 + # AuthorizeOrDenyDeviceAuthorization + # Authorize or deny device authorization Authorize or deny the device authorization request based on the provided device authorization id. + # @param oidc_service_authorize_or_deny_device_authorization_request [OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest] + # @param [Hash] opts the optional parameters + # @return [Object] + def authorize_or_deny_device_authorization(oidc_service_authorize_or_deny_device_authorization_request, opts = {}) + data, _status_code, _headers = authorize_or_deny_device_authorization_with_http_info(oidc_service_authorize_or_deny_device_authorization_request, opts) + data + end + + # AuthorizeOrDenyDeviceAuthorization + # Authorize or deny device authorization Authorize or deny the device authorization request based on the provided device authorization id. + # @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 authorize_or_deny_device_authorization_with_http_info(oidc_service_authorize_or_deny_device_authorization_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.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.authorize_or_deny_device_authorization" # MODIFIED + end + # resource path + local_var_path = '/zitadel.oidc.v2.OIDCService/AuthorizeOrDenyDeviceAuthorization' + + # 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.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#authorize_or_deny_device_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # CreateCallback + # @param oidc_service_create_callback_request [OIDCServiceCreateCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [OIDCServiceCreateCallbackResponse] + def create_callback(oidc_service_create_callback_request, opts = {}) + data, _status_code, _headers = create_callback_with_http_info(oidc_service_create_callback_request, opts) + data + end + + # CreateCallback + # @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 create_callback_with_http_info(oidc_service_create_callback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.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.create_callback" # MODIFIED + end + # resource path + local_var_path = '/zitadel.oidc.v2.OIDCService/CreateCallback' + + # 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.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#create_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetAuthRequest + # @param oidc_service_get_auth_request_request [OIDCServiceGetAuthRequestRequest] + # @param [Hash] opts the optional parameters + # @return [OIDCServiceGetAuthRequestResponse] + def get_auth_request(oidc_service_get_auth_request_request, opts = {}) + data, _status_code, _headers = get_auth_request_with_http_info(oidc_service_get_auth_request_request, opts) + data + end + + # GetAuthRequest + # @param oidc_service_get_auth_request_request [OIDCServiceGetAuthRequestRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(OIDCServiceGetAuthRequestResponse, Integer, Hash)>] OIDCServiceGetAuthRequestResponse data, response status code and response headers + def get_auth_request_with_http_info(oidc_service_get_auth_request_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.get_auth_request ...' # MODIFIED + end + # verify the required parameter 'oidc_service_get_auth_request_request' is set + if @api_client.config.client_side_validation && oidc_service_get_auth_request_request.nil? + fail ArgumentError, "Missing the required parameter 'oidc_service_get_auth_request_request' when calling Api::OIDCServiceApi.get_auth_request" # MODIFIED + end + # resource path + local_var_path = '/zitadel.oidc.v2.OIDCService/GetAuthRequest' + + # 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_get_auth_request_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OIDCServiceApi#get_auth_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetDeviceAuthorizationRequest + # 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 oidc_service_get_device_authorization_request_request [OIDCServiceGetDeviceAuthorizationRequestRequest] + # @param [Hash] opts the optional parameters + # @return [OIDCServiceGetDeviceAuthorizationRequestResponse] + def get_device_authorization_request(oidc_service_get_device_authorization_request_request, opts = {}) + data, _status_code, _headers = get_device_authorization_request_with_http_info(oidc_service_get_device_authorization_request_request, opts) + data + end + + # GetDeviceAuthorizationRequest + # 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 oidc_service_get_device_authorization_request_request [OIDCServiceGetDeviceAuthorizationRequestRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(OIDCServiceGetDeviceAuthorizationRequestResponse, Integer, Hash)>] OIDCServiceGetDeviceAuthorizationRequestResponse data, response status code and response headers + def get_device_authorization_request_with_http_info(oidc_service_get_device_authorization_request_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::OIDCServiceApi.get_device_authorization_request ...' # MODIFIED + end + # verify the required parameter 'oidc_service_get_device_authorization_request_request' is set + if @api_client.config.client_side_validation && oidc_service_get_device_authorization_request_request.nil? + fail ArgumentError, "Missing the required parameter 'oidc_service_get_device_authorization_request_request' when calling Api::OIDCServiceApi.get_device_authorization_request" # MODIFIED + end + # resource path + local_var_path = '/zitadel.oidc.v2.OIDCService/GetDeviceAuthorizationRequest' + + # 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_get_device_authorization_request_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::OIDCServiceApi#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..20f18233 --- /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 + # AddOrganization + # 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 add_organization(organization_service_add_organization_request, opts = {}) + data, _status_code, _headers = add_organization_with_http_info(organization_service_add_organization_request, opts) + data + end + + # AddOrganization + # 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 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.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.add_organization" # MODIFIED + end + # resource path + local_var_path = '/zitadel.org.v2.OrganizationService/AddOrganization' + + # 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.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#add_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListOrganizations + # 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 list_organizations(organization_service_list_organizations_request, opts = {}) + data, _status_code, _headers = list_organizations_with_http_info(organization_service_list_organizations_request, opts) + data + end + + # ListOrganizations + # 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 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.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.list_organizations" # MODIFIED + end + # resource path + local_var_path = '/zitadel.org.v2.OrganizationService/ListOrganizations' + + # 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.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#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..057b18ef --- /dev/null +++ b/lib/zitadel/client/api/s_a_m_l_service_api.rb @@ -0,0 +1,154 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 + # CreateResponse + # @param saml_service_create_response_request [SAMLServiceCreateResponseRequest] + # @param [Hash] opts the optional parameters + # @return [SAMLServiceCreateResponseResponse] + def create_response(saml_service_create_response_request, opts = {}) + data, _status_code, _headers = create_response_with_http_info(saml_service_create_response_request, opts) + data + end + + # CreateResponse + # @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 create_response_with_http_info(saml_service_create_response_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SAMLServiceApi.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.create_response" # MODIFIED + end + # resource path + local_var_path = '/zitadel.saml.v2.SAMLService/CreateResponse' + + # 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.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#create_response\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetSAMLRequest + # @param saml_service_get_saml_request_request [SAMLServiceGetSAMLRequestRequest] + # @param [Hash] opts the optional parameters + # @return [SAMLServiceGetSAMLRequestResponse] + def get_saml_request(saml_service_get_saml_request_request, opts = {}) + data, _status_code, _headers = get_saml_request_with_http_info(saml_service_get_saml_request_request, opts) + data + end + + # GetSAMLRequest + # @param saml_service_get_saml_request_request [SAMLServiceGetSAMLRequestRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SAMLServiceGetSAMLRequestResponse, Integer, Hash)>] SAMLServiceGetSAMLRequestResponse data, response status code and response headers + def get_saml_request_with_http_info(saml_service_get_saml_request_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SAMLServiceApi.get_saml_request ...' # MODIFIED + end + # verify the required parameter 'saml_service_get_saml_request_request' is set + if @api_client.config.client_side_validation && saml_service_get_saml_request_request.nil? + fail ArgumentError, "Missing the required parameter 'saml_service_get_saml_request_request' when calling Api::SAMLServiceApi.get_saml_request" # MODIFIED + end + # resource path + local_var_path = '/zitadel.saml.v2.SAMLService/GetSAMLRequest' + + # 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_get_saml_request_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SAMLServiceApi#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..a206139b --- /dev/null +++ b/lib/zitadel/client/api/session_service_api.rb @@ -0,0 +1,362 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 + # CreateSession + # Create a new session + # @param session_service_create_session_request [SessionServiceCreateSessionRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceCreateSessionResponse] + def create_session(session_service_create_session_request, opts = {}) + data, _status_code, _headers = create_session_with_http_info(session_service_create_session_request, opts) + data + end + + # CreateSession + # Create a new 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 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.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.create_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2.SessionService/CreateSession' + + # 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.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#create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeleteSession + # Terminate a session + # @param session_service_delete_session_request [SessionServiceDeleteSessionRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceDeleteSessionResponse] + def delete_session(session_service_delete_session_request, opts = {}) + data, _status_code, _headers = delete_session_with_http_info(session_service_delete_session_request, opts) + data + end + + # DeleteSession + # Terminate a session + # @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 delete_session_with_http_info(session_service_delete_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.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.delete_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2.SessionService/DeleteSession' + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#delete_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetSession + # GetSession a session + # @param session_service_get_session_request [SessionServiceGetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceGetSessionResponse] + def get_session(session_service_get_session_request, opts = {}) + data, _status_code, _headers = get_session_with_http_info(session_service_get_session_request, opts) + data + end + + # GetSession + # GetSession a session + # @param session_service_get_session_request [SessionServiceGetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SessionServiceGetSessionResponse, Integer, Hash)>] SessionServiceGetSessionResponse data, response status code and response headers + def get_session_with_http_info(session_service_get_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.get_session ...' # MODIFIED + end + # verify the required parameter 'session_service_get_session_request' is set + if @api_client.config.client_side_validation && session_service_get_session_request.nil? + fail ArgumentError, "Missing the required parameter 'session_service_get_session_request' when calling Api::SessionServiceApi.get_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2.SessionService/GetSession' + + # 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_get_session_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListSessions + # Search sessions + # @param session_service_list_sessions_request [SessionServiceListSessionsRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceListSessionsResponse] + def list_sessions(session_service_list_sessions_request, opts = {}) + data, _status_code, _headers = list_sessions_with_http_info(session_service_list_sessions_request, opts) + data + end + + # ListSessions + # Search 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 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.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.list_sessions" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2.SessionService/ListSessions' + + # 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.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#list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetSession + # Update a session + # @param session_service_set_session_request [SessionServiceSetSessionRequest] + # @param [Hash] opts the optional parameters + # @return [SessionServiceSetSessionResponse] + def set_session(session_service_set_session_request, opts = {}) + data, _status_code, _headers = set_session_with_http_info(session_service_set_session_request, opts) + data + end + + # SetSession + # Update a session + # @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 set_session_with_http_info(session_service_set_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SessionServiceApi.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.set_session" # MODIFIED + end + # resource path + local_var_path = '/zitadel.session.v2.SessionService/SetSession' + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SessionServiceApi#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_service_api.rb b/lib/zitadel/client/api/settings_service_api.rb new file mode 100644 index 00000000..448da833 --- /dev/null +++ b/lib/zitadel/client/api/settings_service_api.rb @@ -0,0 +1,770 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 + # GetActiveIdentityProviders + # Get the current active identity providers + # @param settings_service_get_active_identity_providers_request [SettingsServiceGetActiveIdentityProvidersRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetActiveIdentityProvidersResponse] + def get_active_identity_providers(settings_service_get_active_identity_providers_request, opts = {}) + data, _status_code, _headers = get_active_identity_providers_with_http_info(settings_service_get_active_identity_providers_request, opts) + data + end + + # GetActiveIdentityProviders + # Get the current active identity providers + # @param settings_service_get_active_identity_providers_request [SettingsServiceGetActiveIdentityProvidersRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetActiveIdentityProvidersResponse, Integer, Hash)>] SettingsServiceGetActiveIdentityProvidersResponse data, response status code and response headers + def get_active_identity_providers_with_http_info(settings_service_get_active_identity_providers_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_active_identity_providers ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_active_identity_providers_request' is set + if @api_client.config.client_side_validation && settings_service_get_active_identity_providers_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_active_identity_providers_request' when calling Api::SettingsServiceApi.get_active_identity_providers" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetActiveIdentityProviders' + + # 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_get_active_identity_providers_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_active_identity_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetBrandingSettings + # Get the current active branding settings + # @param settings_service_get_branding_settings_request [SettingsServiceGetBrandingSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetBrandingSettingsResponse] + def get_branding_settings(settings_service_get_branding_settings_request, opts = {}) + data, _status_code, _headers = get_branding_settings_with_http_info(settings_service_get_branding_settings_request, opts) + data + end + + # GetBrandingSettings + # Get the current active branding settings + # @param settings_service_get_branding_settings_request [SettingsServiceGetBrandingSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetBrandingSettingsResponse, Integer, Hash)>] SettingsServiceGetBrandingSettingsResponse data, response status code and response headers + def get_branding_settings_with_http_info(settings_service_get_branding_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_branding_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_branding_settings_request' is set + if @api_client.config.client_side_validation && settings_service_get_branding_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_branding_settings_request' when calling Api::SettingsServiceApi.get_branding_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetBrandingSettings' + + # 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_get_branding_settings_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_branding_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetDomainSettings + # Get the domain settings + # @param settings_service_get_domain_settings_request [SettingsServiceGetDomainSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetDomainSettingsResponse] + def get_domain_settings(settings_service_get_domain_settings_request, opts = {}) + data, _status_code, _headers = get_domain_settings_with_http_info(settings_service_get_domain_settings_request, opts) + data + end + + # GetDomainSettings + # Get the domain settings + # @param settings_service_get_domain_settings_request [SettingsServiceGetDomainSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetDomainSettingsResponse, Integer, Hash)>] SettingsServiceGetDomainSettingsResponse data, response status code and response headers + def get_domain_settings_with_http_info(settings_service_get_domain_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_domain_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_domain_settings_request' is set + if @api_client.config.client_side_validation && settings_service_get_domain_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_domain_settings_request' when calling Api::SettingsServiceApi.get_domain_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetDomainSettings' + + # 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_get_domain_settings_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_domain_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetGeneralSettings + # Get basic information over the instance + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetGeneralSettingsResponse] + def get_general_settings(body, opts = {}) + data, _status_code, _headers = get_general_settings_with_http_info(body, opts) + data + end + + # GetGeneralSettings + # Get basic information over the instance + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetGeneralSettingsResponse, Integer, Hash)>] SettingsServiceGetGeneralSettingsResponse data, response status code and response headers + def get_general_settings_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_general_settings ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::SettingsServiceApi.get_general_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetGeneralSettings' + + # 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(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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_general_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetLegalAndSupportSettings + # Get the legal and support settings + # @param settings_service_get_legal_and_support_settings_request [SettingsServiceGetLegalAndSupportSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetLegalAndSupportSettingsResponse] + def get_legal_and_support_settings(settings_service_get_legal_and_support_settings_request, opts = {}) + data, _status_code, _headers = get_legal_and_support_settings_with_http_info(settings_service_get_legal_and_support_settings_request, opts) + data + end + + # GetLegalAndSupportSettings + # Get the legal and support settings + # @param settings_service_get_legal_and_support_settings_request [SettingsServiceGetLegalAndSupportSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetLegalAndSupportSettingsResponse, Integer, Hash)>] SettingsServiceGetLegalAndSupportSettingsResponse data, response status code and response headers + def get_legal_and_support_settings_with_http_info(settings_service_get_legal_and_support_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_legal_and_support_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_legal_and_support_settings_request' is set + if @api_client.config.client_side_validation && settings_service_get_legal_and_support_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_legal_and_support_settings_request' when calling Api::SettingsServiceApi.get_legal_and_support_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetLegalAndSupportSettings' + + # 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_get_legal_and_support_settings_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_legal_and_support_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetLockoutSettings + # Get the lockout settings + # @param settings_service_get_lockout_settings_request [SettingsServiceGetLockoutSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetLockoutSettingsResponse] + def get_lockout_settings(settings_service_get_lockout_settings_request, opts = {}) + data, _status_code, _headers = get_lockout_settings_with_http_info(settings_service_get_lockout_settings_request, opts) + data + end + + # GetLockoutSettings + # Get the lockout settings + # @param settings_service_get_lockout_settings_request [SettingsServiceGetLockoutSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetLockoutSettingsResponse, Integer, Hash)>] SettingsServiceGetLockoutSettingsResponse data, response status code and response headers + def get_lockout_settings_with_http_info(settings_service_get_lockout_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_lockout_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_lockout_settings_request' is set + if @api_client.config.client_side_validation && settings_service_get_lockout_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_lockout_settings_request' when calling Api::SettingsServiceApi.get_lockout_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetLockoutSettings' + + # 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_get_lockout_settings_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_lockout_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetLoginSettings + # Get the login settings + # @param settings_service_get_login_settings_request [SettingsServiceGetLoginSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetLoginSettingsResponse] + def get_login_settings(settings_service_get_login_settings_request, opts = {}) + data, _status_code, _headers = get_login_settings_with_http_info(settings_service_get_login_settings_request, opts) + data + end + + # GetLoginSettings + # Get the login settings + # @param settings_service_get_login_settings_request [SettingsServiceGetLoginSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetLoginSettingsResponse, Integer, Hash)>] SettingsServiceGetLoginSettingsResponse data, response status code and response headers + def get_login_settings_with_http_info(settings_service_get_login_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_login_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_login_settings_request' is set + if @api_client.config.client_side_validation && settings_service_get_login_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_login_settings_request' when calling Api::SettingsServiceApi.get_login_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetLoginSettings' + + # 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_get_login_settings_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_login_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetPasswordComplexitySettings + # Get the password complexity settings + # @param settings_service_get_password_complexity_settings_request [SettingsServiceGetPasswordComplexitySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetPasswordComplexitySettingsResponse] + def get_password_complexity_settings(settings_service_get_password_complexity_settings_request, opts = {}) + data, _status_code, _headers = get_password_complexity_settings_with_http_info(settings_service_get_password_complexity_settings_request, opts) + data + end + + # GetPasswordComplexitySettings + # Get the password complexity settings + # @param settings_service_get_password_complexity_settings_request [SettingsServiceGetPasswordComplexitySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetPasswordComplexitySettingsResponse, Integer, Hash)>] SettingsServiceGetPasswordComplexitySettingsResponse data, response status code and response headers + def get_password_complexity_settings_with_http_info(settings_service_get_password_complexity_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_password_complexity_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_password_complexity_settings_request' is set + if @api_client.config.client_side_validation && settings_service_get_password_complexity_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_password_complexity_settings_request' when calling Api::SettingsServiceApi.get_password_complexity_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetPasswordComplexitySettings' + + # 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_get_password_complexity_settings_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_password_complexity_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetPasswordExpirySettings + # Get the password expiry settings + # @param settings_service_get_password_expiry_settings_request [SettingsServiceGetPasswordExpirySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetPasswordExpirySettingsResponse] + def get_password_expiry_settings(settings_service_get_password_expiry_settings_request, opts = {}) + data, _status_code, _headers = get_password_expiry_settings_with_http_info(settings_service_get_password_expiry_settings_request, opts) + data + end + + # GetPasswordExpirySettings + # Get the password expiry settings + # @param settings_service_get_password_expiry_settings_request [SettingsServiceGetPasswordExpirySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetPasswordExpirySettingsResponse, Integer, Hash)>] SettingsServiceGetPasswordExpirySettingsResponse data, response status code and response headers + def get_password_expiry_settings_with_http_info(settings_service_get_password_expiry_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_password_expiry_settings ...' # MODIFIED + end + # verify the required parameter 'settings_service_get_password_expiry_settings_request' is set + if @api_client.config.client_side_validation && settings_service_get_password_expiry_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'settings_service_get_password_expiry_settings_request' when calling Api::SettingsServiceApi.get_password_expiry_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetPasswordExpirySettings' + + # 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_get_password_expiry_settings_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_password_expiry_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetSecuritySettings + # Get the security settings + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceGetSecuritySettingsResponse] + def get_security_settings(body, opts = {}) + data, _status_code, _headers = get_security_settings_with_http_info(body, opts) + data + end + + # GetSecuritySettings + # Get the security settings + # @param body [Object] + # @param [Hash] opts the optional parameters + # @return [Array<(SettingsServiceGetSecuritySettingsResponse, Integer, Hash)>] SettingsServiceGetSecuritySettingsResponse data, response status code and response headers + def get_security_settings_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::SettingsServiceApi.get_security_settings ...' # MODIFIED + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling Api::SettingsServiceApi.get_security_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/GetSecuritySettings' + + # 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(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::SettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#get_security_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetSecuritySettings + # Set the security settings + # @param settings_service_set_security_settings_request [SettingsServiceSetSecuritySettingsRequest] + # @param [Hash] opts the optional parameters + # @return [SettingsServiceSetSecuritySettingsResponse] + def set_security_settings(settings_service_set_security_settings_request, opts = {}) + data, _status_code, _headers = set_security_settings_with_http_info(settings_service_set_security_settings_request, opts) + data + end + + # SetSecuritySettings + # Set the security settings + # @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 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::SettingsServiceApi.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::SettingsServiceApi.set_security_settings" # MODIFIED + end + # resource path + local_var_path = '/zitadel.settings.v2.SettingsService/SetSecuritySettings' + + # 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::SettingsServiceApi.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::SettingsServiceApi#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/user_service_api.rb b/lib/zitadel/client/api/user_service_api.rb new file mode 100644 index 00000000..e5cf5589 --- /dev/null +++ b/lib/zitadel/client/api/user_service_api.rb @@ -0,0 +1,3080 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the 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 + # AddHumanUser + # Create a new human user Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. + # @param user_service_add_human_user_request [UserServiceAddHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddHumanUserResponse] + def add_human_user(user_service_add_human_user_request, opts = {}) + data, _status_code, _headers = add_human_user_with_http_info(user_service_add_human_user_request, opts) + data + end + + # AddHumanUser + # Create a new human user Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. + # @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 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.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.add_human_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/AddHumanUser' + + # 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.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#add_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # AddIDPLink + # Add link to an identity provider to an user Add link to an identity provider to an user.. + # @param user_service_add_idp_link_request [UserServiceAddIDPLinkRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddIDPLinkResponse] + def add_idp_link(user_service_add_idp_link_request, opts = {}) + data, _status_code, _headers = add_idp_link_with_http_info(user_service_add_idp_link_request, opts) + data + end + + # AddIDPLink + # Add link to an identity provider to an user Add link to an identity provider to an user.. + # @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 add_idp_link_with_http_info(user_service_add_idp_link_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.add_idp_link" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/AddIDPLink' + + # 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.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#add_idp_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # AddOTPEmail + # Add OTP Email for a user Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. + # @param user_service_add_otp_email_request [UserServiceAddOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddOTPEmailResponse] + def add_otp_email(user_service_add_otp_email_request, opts = {}) + data, _status_code, _headers = add_otp_email_with_http_info(user_service_add_otp_email_request, opts) + data + end + + # AddOTPEmail + # Add OTP Email for a user Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. + # @param user_service_add_otp_email_request [UserServiceAddOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceAddOTPEmailResponse, Integer, Hash)>] UserServiceAddOTPEmailResponse data, response status code and response headers + def add_otp_email_with_http_info(user_service_add_otp_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.add_otp_email ...' # MODIFIED + end + # verify the required parameter 'user_service_add_otp_email_request' is set + if @api_client.config.client_side_validation && user_service_add_otp_email_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_add_otp_email_request' when calling Api::UserServiceApi.add_otp_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/AddOTPEmail' + + # 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_otp_email_request) + + # 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.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#add_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # AddOTPSMS + # Add OTP SMS for a user Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. + # @param user_service_add_otpsms_request [UserServiceAddOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceAddOTPSMSResponse] + def add_otpsms(user_service_add_otpsms_request, opts = {}) + data, _status_code, _headers = add_otpsms_with_http_info(user_service_add_otpsms_request, opts) + data + end + + # AddOTPSMS + # Add OTP SMS for a user Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. + # @param user_service_add_otpsms_request [UserServiceAddOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceAddOTPSMSResponse, Integer, Hash)>] UserServiceAddOTPSMSResponse data, response status code and response headers + def add_otpsms_with_http_info(user_service_add_otpsms_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.add_otpsms ...' # MODIFIED + end + # verify the required parameter 'user_service_add_otpsms_request' is set + if @api_client.config.client_side_validation && user_service_add_otpsms_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_add_otpsms_request' when calling Api::UserServiceApi.add_otpsms" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/AddOTPSMS' + + # 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_otpsms_request) + + # 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.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#add_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # CreateInviteCode + # Create an invite code for a user Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. + # @param user_service_create_invite_code_request [UserServiceCreateInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceCreateInviteCodeResponse] + def create_invite_code(user_service_create_invite_code_request, opts = {}) + data, _status_code, _headers = create_invite_code_with_http_info(user_service_create_invite_code_request, opts) + data + end + + # CreateInviteCode + # Create an invite code for a user Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. + # @param user_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 create_invite_code_with_http_info(user_service_create_invite_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.create_invite_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/CreateInviteCode' + + # 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.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#create_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # CreatePasskeyRegistrationLink + # Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user.. + # @param user_service_create_passkey_registration_link_request [UserServiceCreatePasskeyRegistrationLinkRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceCreatePasskeyRegistrationLinkResponse] + def create_passkey_registration_link(user_service_create_passkey_registration_link_request, opts = {}) + data, _status_code, _headers = create_passkey_registration_link_with_http_info(user_service_create_passkey_registration_link_request, opts) + data + end + + # CreatePasskeyRegistrationLink + # Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user.. + # @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 create_passkey_registration_link_with_http_info(user_service_create_passkey_registration_link_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.create_passkey_registration_link" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/CreatePasskeyRegistrationLink' + + # 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.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#create_passkey_registration_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeactivateUser + # Deactivate user The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. + # @param user_service_deactivate_user_request [UserServiceDeactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceDeactivateUserResponse] + def deactivate_user(user_service_deactivate_user_request, opts = {}) + data, _status_code, _headers = deactivate_user_with_http_info(user_service_deactivate_user_request, opts) + data + end + + # DeactivateUser + # Deactivate user The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. + # @param user_service_deactivate_user_request [UserServiceDeactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceDeactivateUserResponse, Integer, Hash)>] UserServiceDeactivateUserResponse data, response status code and response headers + def deactivate_user_with_http_info(user_service_deactivate_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.deactivate_user ...' # MODIFIED + end + # verify the required parameter 'user_service_deactivate_user_request' is set + if @api_client.config.client_side_validation && user_service_deactivate_user_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_deactivate_user_request' when calling Api::UserServiceApi.deactivate_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/DeactivateUser' + + # 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_deactivate_user_request) + + # 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.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#deactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # DeleteUser + # Delete user The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. + # @param user_service_delete_user_request [UserServiceDeleteUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceDeleteUserResponse] + def delete_user(user_service_delete_user_request, opts = {}) + data, _status_code, _headers = delete_user_with_http_info(user_service_delete_user_request, opts) + data + end + + # DeleteUser + # Delete user The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. + # @param user_service_delete_user_request [UserServiceDeleteUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceDeleteUserResponse, Integer, Hash)>] UserServiceDeleteUserResponse data, response status code and response headers + def delete_user_with_http_info(user_service_delete_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.delete_user ...' # MODIFIED + end + # verify the required parameter 'user_service_delete_user_request' is set + if @api_client.config.client_side_validation && user_service_delete_user_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_delete_user_request' when calling Api::UserServiceApi.delete_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/DeleteUser' + + # 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_delete_user_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # GetUserByID + # User by ID Returns the full user object (human or machine) including the profile, email, etc.. + # @param user_service_get_user_by_id_request [UserServiceGetUserByIDRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceGetUserByIDResponse] + def get_user_by_id(user_service_get_user_by_id_request, opts = {}) + data, _status_code, _headers = get_user_by_id_with_http_info(user_service_get_user_by_id_request, opts) + data + end + + # GetUserByID + # User by ID Returns the full user object (human or machine) including the profile, email, etc.. + # @param user_service_get_user_by_id_request [UserServiceGetUserByIDRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceGetUserByIDResponse, Integer, Hash)>] UserServiceGetUserByIDResponse data, response status code and response headers + def get_user_by_id_with_http_info(user_service_get_user_by_id_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.get_user_by_id ...' # MODIFIED + end + # verify the required parameter 'user_service_get_user_by_id_request' is set + if @api_client.config.client_side_validation && user_service_get_user_by_id_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_get_user_by_id_request' when calling Api::UserServiceApi.get_user_by_id" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/GetUserByID' + + # 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_get_user_by_id_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#get_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # HumanMFAInitSkipped + # MFA Init Skipped Update the last time the user has skipped MFA initialization. The server timestamp is used. + # @param user_service_human_mfa_init_skipped_request [UserServiceHumanMFAInitSkippedRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceHumanMFAInitSkippedResponse] + def human_mfa_init_skipped(user_service_human_mfa_init_skipped_request, opts = {}) + data, _status_code, _headers = human_mfa_init_skipped_with_http_info(user_service_human_mfa_init_skipped_request, opts) + data + end + + # HumanMFAInitSkipped + # MFA Init Skipped Update the last time the user has skipped MFA initialization. The server timestamp is used. + # @param user_service_human_mfa_init_skipped_request [UserServiceHumanMFAInitSkippedRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceHumanMFAInitSkippedResponse, Integer, Hash)>] UserServiceHumanMFAInitSkippedResponse data, response status code and response headers + def human_mfa_init_skipped_with_http_info(user_service_human_mfa_init_skipped_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.human_mfa_init_skipped ...' # MODIFIED + end + # verify the required parameter 'user_service_human_mfa_init_skipped_request' is set + if @api_client.config.client_side_validation && user_service_human_mfa_init_skipped_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_human_mfa_init_skipped_request' when calling Api::UserServiceApi.human_mfa_init_skipped" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/HumanMFAInitSkipped' + + # 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_human_mfa_init_skipped_request) + + # 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.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#human_mfa_init_skipped\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListAuthenticationFactors + # @param user_service_list_authentication_factors_request [UserServiceListAuthenticationFactorsRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceListAuthenticationFactorsResponse] + def list_authentication_factors(user_service_list_authentication_factors_request, opts = {}) + data, _status_code, _headers = list_authentication_factors_with_http_info(user_service_list_authentication_factors_request, opts) + data + end + + # ListAuthenticationFactors + # @param user_service_list_authentication_factors_request [UserServiceListAuthenticationFactorsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceListAuthenticationFactorsResponse, Integer, Hash)>] UserServiceListAuthenticationFactorsResponse data, response status code and response headers + def list_authentication_factors_with_http_info(user_service_list_authentication_factors_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.list_authentication_factors ...' # MODIFIED + end + # verify the required parameter 'user_service_list_authentication_factors_request' is set + if @api_client.config.client_side_validation && user_service_list_authentication_factors_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_list_authentication_factors_request' when calling Api::UserServiceApi.list_authentication_factors" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ListAuthenticationFactors' + + # 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_authentication_factors_request) + + # 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.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#list_authentication_factors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListAuthenticationMethodTypes + # 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_service_list_authentication_method_types_request [UserServiceListAuthenticationMethodTypesRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceListAuthenticationMethodTypesResponse] + def list_authentication_method_types(user_service_list_authentication_method_types_request, opts = {}) + data, _status_code, _headers = list_authentication_method_types_with_http_info(user_service_list_authentication_method_types_request, opts) + data + end + + # ListAuthenticationMethodTypes + # 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_service_list_authentication_method_types_request [UserServiceListAuthenticationMethodTypesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceListAuthenticationMethodTypesResponse, Integer, Hash)>] UserServiceListAuthenticationMethodTypesResponse data, response status code and response headers + def list_authentication_method_types_with_http_info(user_service_list_authentication_method_types_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.list_authentication_method_types ...' # MODIFIED + end + # verify the required parameter 'user_service_list_authentication_method_types_request' is set + if @api_client.config.client_side_validation && user_service_list_authentication_method_types_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_list_authentication_method_types_request' when calling Api::UserServiceApi.list_authentication_method_types" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ListAuthenticationMethodTypes' + + # 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_authentication_method_types_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#list_authentication_method_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListIDPLinks + # List links to an identity provider of an user List links to an identity provider of an user. + # @param user_service_list_idp_links_request [UserServiceListIDPLinksRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceListIDPLinksResponse] + def list_idp_links(user_service_list_idp_links_request, opts = {}) + data, _status_code, _headers = list_idp_links_with_http_info(user_service_list_idp_links_request, opts) + data + end + + # ListIDPLinks + # List links to an identity provider of an user List links to an identity provider of an user. + # @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 list_idp_links_with_http_info(user_service_list_idp_links_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.list_idp_links" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ListIDPLinks' + + # 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.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#list_idp_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListPasskeys + # List passkeys of an user List passkeys of an user + # @param user_service_list_passkeys_request [UserServiceListPasskeysRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceListPasskeysResponse] + def list_passkeys(user_service_list_passkeys_request, opts = {}) + data, _status_code, _headers = list_passkeys_with_http_info(user_service_list_passkeys_request, opts) + data + end + + # ListPasskeys + # List passkeys of an user List passkeys of an user + # @param user_service_list_passkeys_request [UserServiceListPasskeysRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceListPasskeysResponse, Integer, Hash)>] UserServiceListPasskeysResponse data, response status code and response headers + def list_passkeys_with_http_info(user_service_list_passkeys_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.list_passkeys ...' # MODIFIED + end + # verify the required parameter 'user_service_list_passkeys_request' is set + if @api_client.config.client_side_validation && user_service_list_passkeys_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_list_passkeys_request' when calling Api::UserServiceApi.list_passkeys" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ListPasskeys' + + # 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_passkeys_request) + + # 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.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#list_passkeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ListUsers + # Search Users Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. + # @param user_service_list_users_request [UserServiceListUsersRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceListUsersResponse] + def list_users(user_service_list_users_request, opts = {}) + data, _status_code, _headers = list_users_with_http_info(user_service_list_users_request, opts) + data + end + + # ListUsers + # Search Users Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. + # @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 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.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.list_users" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ListUsers' + + # 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.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#list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # LockUser + # Lock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. + # @param user_service_lock_user_request [UserServiceLockUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceLockUserResponse] + def lock_user(user_service_lock_user_request, opts = {}) + data, _status_code, _headers = lock_user_with_http_info(user_service_lock_user_request, opts) + data + end + + # LockUser + # Lock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. + # @param user_service_lock_user_request [UserServiceLockUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceLockUserResponse, Integer, Hash)>] UserServiceLockUserResponse data, response status code and response headers + def lock_user_with_http_info(user_service_lock_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.lock_user ...' # MODIFIED + end + # verify the required parameter 'user_service_lock_user_request' is set + if @api_client.config.client_side_validation && user_service_lock_user_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_lock_user_request' when calling Api::UserServiceApi.lock_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/LockUser' + + # 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_lock_user_request) + + # 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.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#lock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # PasswordReset + # Request a code to reset a password Request a code to reset a password.. + # @param user_service_password_reset_request [UserServicePasswordResetRequest] + # @param [Hash] opts the optional parameters + # @return [UserServicePasswordResetResponse] + def password_reset(user_service_password_reset_request, opts = {}) + data, _status_code, _headers = password_reset_with_http_info(user_service_password_reset_request, opts) + data + end + + # PasswordReset + # Request a code to reset a password Request a code to reset a password.. + # @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 password_reset_with_http_info(user_service_password_reset_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.password_reset" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/PasswordReset' + + # 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.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#password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ReactivateUser + # Reactivate user Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. + # @param user_service_reactivate_user_request [UserServiceReactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceReactivateUserResponse] + def reactivate_user(user_service_reactivate_user_request, opts = {}) + data, _status_code, _headers = reactivate_user_with_http_info(user_service_reactivate_user_request, opts) + data + end + + # ReactivateUser + # Reactivate user Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. + # @param user_service_reactivate_user_request [UserServiceReactivateUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceReactivateUserResponse, Integer, Hash)>] UserServiceReactivateUserResponse data, response status code and response headers + def reactivate_user_with_http_info(user_service_reactivate_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.reactivate_user ...' # MODIFIED + end + # verify the required parameter 'user_service_reactivate_user_request' is set + if @api_client.config.client_side_validation && user_service_reactivate_user_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_reactivate_user_request' when calling Api::UserServiceApi.reactivate_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ReactivateUser' + + # 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_reactivate_user_request) + + # 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.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#reactivate_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RegisterPasskey + # Start the registration of passkey for a user Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. + # @param user_service_register_passkey_request [UserServiceRegisterPasskeyRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRegisterPasskeyResponse] + def register_passkey(user_service_register_passkey_request, opts = {}) + data, _status_code, _headers = register_passkey_with_http_info(user_service_register_passkey_request, opts) + data + end + + # RegisterPasskey + # Start the registration of passkey for a user Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. + # @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 register_passkey_with_http_info(user_service_register_passkey_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.register_passkey" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RegisterPasskey' + + # 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.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#register_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RegisterTOTP + # Start the registration of a TOTP generator for a user Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. + # @param user_service_register_totp_request [UserServiceRegisterTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRegisterTOTPResponse] + def register_totp(user_service_register_totp_request, opts = {}) + data, _status_code, _headers = register_totp_with_http_info(user_service_register_totp_request, opts) + data + end + + # RegisterTOTP + # Start the registration of a TOTP generator for a user Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. + # @param user_service_register_totp_request [UserServiceRegisterTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRegisterTOTPResponse, Integer, Hash)>] UserServiceRegisterTOTPResponse data, response status code and response headers + def register_totp_with_http_info(user_service_register_totp_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.register_totp ...' # MODIFIED + end + # verify the required parameter 'user_service_register_totp_request' is set + if @api_client.config.client_side_validation && user_service_register_totp_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_register_totp_request' when calling Api::UserServiceApi.register_totp" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RegisterTOTP' + + # 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_totp_request) + + # 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.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#register_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RegisterU2F + # Start the registration of a u2f token for a user Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. + # @param user_service_register_u2_f_request [UserServiceRegisterU2FRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRegisterU2FResponse] + def register_u2_f(user_service_register_u2_f_request, opts = {}) + data, _status_code, _headers = register_u2_f_with_http_info(user_service_register_u2_f_request, opts) + data + end + + # RegisterU2F + # Start the registration of a u2f token for a user Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. + # @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 register_u2_f_with_http_info(user_service_register_u2_f_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.register_u2_f" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RegisterU2F' + + # 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.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#register_u2_f\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveIDPLink + # Remove link of an identity provider to an user Remove link of an identity provider to an user. + # @param user_service_remove_idp_link_request [UserServiceRemoveIDPLinkRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveIDPLinkResponse] + def remove_idp_link(user_service_remove_idp_link_request, opts = {}) + data, _status_code, _headers = remove_idp_link_with_http_info(user_service_remove_idp_link_request, opts) + data + end + + # RemoveIDPLink + # Remove link of an identity provider to an user Remove link of an identity provider to an user. + # @param user_service_remove_idp_link_request [UserServiceRemoveIDPLinkRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveIDPLinkResponse, Integer, Hash)>] UserServiceRemoveIDPLinkResponse data, response status code and response headers + def remove_idp_link_with_http_info(user_service_remove_idp_link_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.remove_idp_link ...' # MODIFIED + end + # verify the required parameter 'user_service_remove_idp_link_request' is set + if @api_client.config.client_side_validation && user_service_remove_idp_link_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_remove_idp_link_request' when calling Api::UserServiceApi.remove_idp_link" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RemoveIDPLink' + + # 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_remove_idp_link_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#remove_idp_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveOTPEmail + # Remove One-Time Password (OTP) Email from a user Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. + # @param user_service_remove_otp_email_request [UserServiceRemoveOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveOTPEmailResponse] + def remove_otp_email(user_service_remove_otp_email_request, opts = {}) + data, _status_code, _headers = remove_otp_email_with_http_info(user_service_remove_otp_email_request, opts) + data + end + + # RemoveOTPEmail + # Remove One-Time Password (OTP) Email from a user Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. + # @param user_service_remove_otp_email_request [UserServiceRemoveOTPEmailRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveOTPEmailResponse, Integer, Hash)>] UserServiceRemoveOTPEmailResponse data, response status code and response headers + def remove_otp_email_with_http_info(user_service_remove_otp_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.remove_otp_email ...' # MODIFIED + end + # verify the required parameter 'user_service_remove_otp_email_request' is set + if @api_client.config.client_side_validation && user_service_remove_otp_email_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_remove_otp_email_request' when calling Api::UserServiceApi.remove_otp_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RemoveOTPEmail' + + # 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_remove_otp_email_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#remove_otp_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveOTPSMS + # Remove One-Time Password (OTP) SMS from a user Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. + # @param user_service_remove_otpsms_request [UserServiceRemoveOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveOTPSMSResponse] + def remove_otpsms(user_service_remove_otpsms_request, opts = {}) + data, _status_code, _headers = remove_otpsms_with_http_info(user_service_remove_otpsms_request, opts) + data + end + + # RemoveOTPSMS + # Remove One-Time Password (OTP) SMS from a user Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. + # @param user_service_remove_otpsms_request [UserServiceRemoveOTPSMSRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveOTPSMSResponse, Integer, Hash)>] UserServiceRemoveOTPSMSResponse data, response status code and response headers + def remove_otpsms_with_http_info(user_service_remove_otpsms_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.remove_otpsms ...' # MODIFIED + end + # verify the required parameter 'user_service_remove_otpsms_request' is set + if @api_client.config.client_side_validation && user_service_remove_otpsms_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_remove_otpsms_request' when calling Api::UserServiceApi.remove_otpsms" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RemoveOTPSMS' + + # 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_remove_otpsms_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#remove_otpsms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemovePasskey + # Remove passkey from a user Remove passkey from a user. + # @param user_service_remove_passkey_request [UserServiceRemovePasskeyRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemovePasskeyResponse] + def remove_passkey(user_service_remove_passkey_request, opts = {}) + data, _status_code, _headers = remove_passkey_with_http_info(user_service_remove_passkey_request, opts) + data + end + + # RemovePasskey + # Remove passkey from a user Remove passkey from a user. + # @param user_service_remove_passkey_request [UserServiceRemovePasskeyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemovePasskeyResponse, Integer, Hash)>] UserServiceRemovePasskeyResponse data, response status code and response headers + def remove_passkey_with_http_info(user_service_remove_passkey_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.remove_passkey ...' # MODIFIED + end + # verify the required parameter 'user_service_remove_passkey_request' is set + if @api_client.config.client_side_validation && user_service_remove_passkey_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_remove_passkey_request' when calling Api::UserServiceApi.remove_passkey" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RemovePasskey' + + # 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_remove_passkey_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#remove_passkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemovePhone + # Remove the user phone Remove the user phone + # @param user_service_remove_phone_request [UserServiceRemovePhoneRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemovePhoneResponse] + def remove_phone(user_service_remove_phone_request, opts = {}) + data, _status_code, _headers = remove_phone_with_http_info(user_service_remove_phone_request, opts) + data + end + + # RemovePhone + # Remove the user phone Remove the user phone + # @param user_service_remove_phone_request [UserServiceRemovePhoneRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemovePhoneResponse, Integer, Hash)>] UserServiceRemovePhoneResponse data, response status code and response headers + def remove_phone_with_http_info(user_service_remove_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.remove_phone ...' # MODIFIED + end + # verify the required parameter 'user_service_remove_phone_request' is set + if @api_client.config.client_side_validation && user_service_remove_phone_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_remove_phone_request' when calling Api::UserServiceApi.remove_phone" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RemovePhone' + + # 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_remove_phone_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#remove_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveTOTP + # Remove TOTP generator from a user Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. + # @param user_service_remove_totp_request [UserServiceRemoveTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveTOTPResponse] + def remove_totp(user_service_remove_totp_request, opts = {}) + data, _status_code, _headers = remove_totp_with_http_info(user_service_remove_totp_request, opts) + data + end + + # RemoveTOTP + # Remove TOTP generator from a user Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. + # @param user_service_remove_totp_request [UserServiceRemoveTOTPRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveTOTPResponse, Integer, Hash)>] UserServiceRemoveTOTPResponse data, response status code and response headers + def remove_totp_with_http_info(user_service_remove_totp_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.remove_totp ...' # MODIFIED + end + # verify the required parameter 'user_service_remove_totp_request' is set + if @api_client.config.client_side_validation && user_service_remove_totp_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_remove_totp_request' when calling Api::UserServiceApi.remove_totp" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RemoveTOTP' + + # 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_remove_totp_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#remove_totp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RemoveU2F + # Remove u2f token from a user Remove u2f token from a user. + # @param user_service_remove_u2_f_request [UserServiceRemoveU2FRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRemoveU2FResponse] + def remove_u2_f(user_service_remove_u2_f_request, opts = {}) + data, _status_code, _headers = remove_u2_f_with_http_info(user_service_remove_u2_f_request, opts) + data + end + + # RemoveU2F + # Remove u2f token from a user Remove u2f token from a user. + # @param user_service_remove_u2_f_request [UserServiceRemoveU2FRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceRemoveU2FResponse, Integer, Hash)>] UserServiceRemoveU2FResponse data, response status code and response headers + def remove_u2_f_with_http_info(user_service_remove_u2_f_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.remove_u2_f ...' # MODIFIED + end + # verify the required parameter 'user_service_remove_u2_f_request' is set + if @api_client.config.client_side_validation && user_service_remove_u2_f_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_remove_u2_f_request' when calling Api::UserServiceApi.remove_u2_f" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RemoveU2F' + + # 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_remove_u2_f_request) + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#remove_u2_f\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResendEmailCode + # Resend code to verify user email Resend code to verify user email. + # @param user_service_resend_email_code_request [UserServiceResendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceResendEmailCodeResponse] + def resend_email_code(user_service_resend_email_code_request, opts = {}) + data, _status_code, _headers = resend_email_code_with_http_info(user_service_resend_email_code_request, opts) + data + end + + # ResendEmailCode + # Resend code to verify user email Resend code to verify user email. + # @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 resend_email_code_with_http_info(user_service_resend_email_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.resend_email_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ResendEmailCode' + + # 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.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#resend_email_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResendInviteCode + # Resend an invite code for a user Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. + # @param user_service_resend_invite_code_request [UserServiceResendInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceResendInviteCodeResponse] + def resend_invite_code(user_service_resend_invite_code_request, opts = {}) + data, _status_code, _headers = resend_invite_code_with_http_info(user_service_resend_invite_code_request, opts) + data + end + + # ResendInviteCode + # Resend an invite code for a user Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. + # @param user_service_resend_invite_code_request [UserServiceResendInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceResendInviteCodeResponse, Integer, Hash)>] UserServiceResendInviteCodeResponse data, response status code and response headers + def resend_invite_code_with_http_info(user_service_resend_invite_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.resend_invite_code ...' # MODIFIED + end + # verify the required parameter 'user_service_resend_invite_code_request' is set + if @api_client.config.client_side_validation && user_service_resend_invite_code_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_resend_invite_code_request' when calling Api::UserServiceApi.resend_invite_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ResendInviteCode' + + # 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_invite_code_request) + + # 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.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#resend_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # ResendPhoneCode + # Resend code to verify user phone Resend code to verify user phone. + # @param user_service_resend_phone_code_request [UserServiceResendPhoneCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceResendPhoneCodeResponse] + def resend_phone_code(user_service_resend_phone_code_request, opts = {}) + data, _status_code, _headers = resend_phone_code_with_http_info(user_service_resend_phone_code_request, opts) + data + end + + # ResendPhoneCode + # Resend code to verify user phone Resend code to verify user phone. + # @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 resend_phone_code_with_http_info(user_service_resend_phone_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.resend_phone_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/ResendPhoneCode' + + # 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.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#resend_phone_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # RetrieveIdentityProviderIntent + # Retrieve the information returned by the identity provider Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. + # @param user_service_retrieve_identity_provider_intent_request [UserServiceRetrieveIdentityProviderIntentRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceRetrieveIdentityProviderIntentResponse] + def retrieve_identity_provider_intent(user_service_retrieve_identity_provider_intent_request, opts = {}) + data, _status_code, _headers = retrieve_identity_provider_intent_with_http_info(user_service_retrieve_identity_provider_intent_request, opts) + data + end + + # RetrieveIdentityProviderIntent + # Retrieve the information returned by the identity provider Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. + # @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 retrieve_identity_provider_intent_with_http_info(user_service_retrieve_identity_provider_intent_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.retrieve_identity_provider_intent" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/RetrieveIdentityProviderIntent' + + # 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.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#retrieve_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SendEmailCode + # Send code to verify user email Send code to verify user email. + # @param user_service_send_email_code_request [UserServiceSendEmailCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSendEmailCodeResponse] + def send_email_code(user_service_send_email_code_request, opts = {}) + data, _status_code, _headers = send_email_code_with_http_info(user_service_send_email_code_request, opts) + data + end + + # SendEmailCode + # Send code to verify user email Send code to verify user email. + # @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 send_email_code_with_http_info(user_service_send_email_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.send_email_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/SendEmailCode' + + # 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.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#send_email_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetEmail + # Change the user email Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. + # @param user_service_set_email_request [UserServiceSetEmailRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSetEmailResponse] + def set_email(user_service_set_email_request, opts = {}) + data, _status_code, _headers = set_email_with_http_info(user_service_set_email_request, opts) + data + end + + # SetEmail + # Change the user email Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. + # @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 set_email_with_http_info(user_service_set_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.set_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/SetEmail' + + # 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.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#set_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetPassword + # Change password Change the password of a user with either a verification code or the current password.. + # @param user_service_set_password_request [UserServiceSetPasswordRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSetPasswordResponse] + def set_password(user_service_set_password_request, opts = {}) + data, _status_code, _headers = set_password_with_http_info(user_service_set_password_request, opts) + data + end + + # SetPassword + # Change password Change the password of a user with either a verification code or the current password.. + # @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 set_password_with_http_info(user_service_set_password_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.set_password" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/SetPassword' + + # 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.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#set_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # SetPhone + # Set the user phone Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. + # @param user_service_set_phone_request [UserServiceSetPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceSetPhoneResponse] + def set_phone(user_service_set_phone_request, opts = {}) + data, _status_code, _headers = set_phone_with_http_info(user_service_set_phone_request, opts) + data + end + + # SetPhone + # Set the user phone Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. + # @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 set_phone_with_http_info(user_service_set_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.set_phone" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/SetPhone' + + # 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.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#set_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # StartIdentityProviderIntent + # 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 start_identity_provider_intent(user_service_start_identity_provider_intent_request, opts = {}) + data, _status_code, _headers = start_identity_provider_intent_with_http_info(user_service_start_identity_provider_intent_request, opts) + data + end + + # StartIdentityProviderIntent + # 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 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.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.start_identity_provider_intent" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/StartIdentityProviderIntent' + + # 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.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#start_identity_provider_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # UnlockUser + # Unlock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. + # @param user_service_unlock_user_request [UserServiceUnlockUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceUnlockUserResponse] + def unlock_user(user_service_unlock_user_request, opts = {}) + data, _status_code, _headers = unlock_user_with_http_info(user_service_unlock_user_request, opts) + data + end + + # UnlockUser + # Unlock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. + # @param user_service_unlock_user_request [UserServiceUnlockUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(UserServiceUnlockUserResponse, Integer, Hash)>] UserServiceUnlockUserResponse data, response status code and response headers + def unlock_user_with_http_info(user_service_unlock_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.unlock_user ...' # MODIFIED + end + # verify the required parameter 'user_service_unlock_user_request' is set + if @api_client.config.client_side_validation && user_service_unlock_user_request.nil? + fail ArgumentError, "Missing the required parameter 'user_service_unlock_user_request' when calling Api::UserServiceApi.unlock_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/UnlockUser' + + # 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_unlock_user_request) + + # 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.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#unlock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # UpdateHumanUser + # Update User Update all information from a user.. + # @param user_service_update_human_user_request [UserServiceUpdateHumanUserRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceUpdateHumanUserResponse] + def update_human_user(user_service_update_human_user_request, opts = {}) + data, _status_code, _headers = update_human_user_with_http_info(user_service_update_human_user_request, opts) + data + end + + # UpdateHumanUser + # Update User Update all information from a user.. + # @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 update_human_user_with_http_info(user_service_update_human_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.update_human_user" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/UpdateHumanUser' + + # 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.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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Api::UserServiceApi#update_human_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyEmail + # Verify the email Verify the email with the generated code. + # @param user_service_verify_email_request [UserServiceVerifyEmailRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyEmailResponse] + def verify_email(user_service_verify_email_request, opts = {}) + data, _status_code, _headers = verify_email_with_http_info(user_service_verify_email_request, opts) + data + end + + # VerifyEmail + # Verify the email Verify the email with the generated code. + # @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 verify_email_with_http_info(user_service_verify_email_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.verify_email" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/VerifyEmail' + + # 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.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#verify_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyInviteCode + # 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_service_verify_invite_code_request [UserServiceVerifyInviteCodeRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyInviteCodeResponse] + def verify_invite_code(user_service_verify_invite_code_request, opts = {}) + data, _status_code, _headers = verify_invite_code_with_http_info(user_service_verify_invite_code_request, opts) + data + end + + # VerifyInviteCode + # 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_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 verify_invite_code_with_http_info(user_service_verify_invite_code_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.verify_invite_code" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/VerifyInviteCode' + + # 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.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#verify_invite_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyPasskeyRegistration + # Verify a passkey for a user Verify the passkey registration with the public key credential.. + # @param user_service_verify_passkey_registration_request [UserServiceVerifyPasskeyRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyPasskeyRegistrationResponse] + def verify_passkey_registration(user_service_verify_passkey_registration_request, opts = {}) + data, _status_code, _headers = verify_passkey_registration_with_http_info(user_service_verify_passkey_registration_request, opts) + data + end + + # VerifyPasskeyRegistration + # Verify a passkey for a user Verify the passkey registration with the public key credential.. + # @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 verify_passkey_registration_with_http_info(user_service_verify_passkey_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.verify_passkey_registration" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/VerifyPasskeyRegistration' + + # 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.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#verify_passkey_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyPhone + # Verify the phone Verify the phone with the generated code.. + # @param user_service_verify_phone_request [UserServiceVerifyPhoneRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyPhoneResponse] + def verify_phone(user_service_verify_phone_request, opts = {}) + data, _status_code, _headers = verify_phone_with_http_info(user_service_verify_phone_request, opts) + data + end + + # VerifyPhone + # Verify the phone Verify the phone with the generated code.. + # @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 verify_phone_with_http_info(user_service_verify_phone_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.verify_phone" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/VerifyPhone' + + # 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.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#verify_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyTOTPRegistration + # Verify a TOTP generator for a user Verify the TOTP registration with a generated code.. + # @param user_service_verify_totp_registration_request [UserServiceVerifyTOTPRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyTOTPRegistrationResponse] + def verify_totp_registration(user_service_verify_totp_registration_request, opts = {}) + data, _status_code, _headers = verify_totp_registration_with_http_info(user_service_verify_totp_registration_request, opts) + data + end + + # VerifyTOTPRegistration + # Verify a TOTP generator for a user Verify the TOTP registration with a generated code.. + # @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 verify_totp_registration_with_http_info(user_service_verify_totp_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.verify_totp_registration" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/VerifyTOTPRegistration' + + # 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.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#verify_totp_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" # MODIFIED + end + return data, status_code, headers + end + + # VerifyU2FRegistration + # Verify a u2f token for a user Verify the u2f token registration with the public key credential.. + # @param user_service_verify_u2_f_registration_request [UserServiceVerifyU2FRegistrationRequest] + # @param [Hash] opts the optional parameters + # @return [UserServiceVerifyU2FRegistrationResponse] + def verify_u2_f_registration(user_service_verify_u2_f_registration_request, opts = {}) + data, _status_code, _headers = verify_u2_f_registration_with_http_info(user_service_verify_u2_f_registration_request, opts) + data + end + + # VerifyU2FRegistration + # Verify a u2f token for a user Verify the u2f token registration with the public key credential.. + # @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 verify_u2_f_registration_with_http_info(user_service_verify_u2_f_registration_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Api::UserServiceApi.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.verify_u2_f_registration" # MODIFIED + end + # resource path + local_var_path = '/zitadel.user.v2.UserService/VerifyU2FRegistration' + + # 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.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#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/and_query.rb b/lib/zitadel/client/models/and_query.rb new file mode 100644 index 00000000..50e92781 --- /dev/null +++ b/lib/zitadel/client/models/and_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class AndQuery + attr_accessor :and_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'and_query' => :'andQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'and_query' => :'UserServiceAndQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::AndQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::AndQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'and_query') + self.and_query = attributes[:'and_query'] + else + self.and_query = 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 @and_query.nil? + invalid_properties.push('invalid value for "and_query", and_query 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 @and_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceAndQuery] and_query Value to be assigned + def and_query=(and_query) + if and_query.nil? + fail ArgumentError, 'and_query cannot be nil' + end + + @and_query = and_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + and_query == o.and_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 + [and_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/and_query1.rb b/lib/zitadel/client/models/and_query1.rb new file mode 100644 index 00000000..dd55141f --- /dev/null +++ b/lib/zitadel/client/models/and_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class AndQuery1 + attr_accessor :and_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'and_query' => :'andQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'and_query' => :'BetaUserServiceAndQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::AndQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::AndQuery1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'and_query') + self.and_query = attributes[:'and_query'] + else + self.and_query = 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 @and_query.nil? + invalid_properties.push('invalid value for "and_query", and_query 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 @and_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceAndQuery] and_query Value to be assigned + def and_query=(and_query) + if and_query.nil? + fail ArgumentError, 'and_query cannot be nil' + end + + @and_query = and_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + and_query == o.and_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 + [and_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/apple.rb b/lib/zitadel/client/models/apple.rb new file mode 100644 index 00000000..a3372329 --- /dev/null +++ b/lib/zitadel/client/models/apple.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Apple + attr_accessor :apple + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'apple' => :'apple' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'apple' => :'IdentityProviderServiceAppleConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Apple` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Apple`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'apple') + self.apple = attributes[:'apple'] + else + self.apple = 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 @apple.nil? + invalid_properties.push('invalid value for "apple", apple 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 @apple.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceAppleConfig] apple Value to be assigned + def apple=(apple) + if apple.nil? + fail ArgumentError, 'apple cannot be nil' + end + + @apple = apple + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + apple == o.apple + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [apple].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/auth_url.rb b/lib/zitadel/client/models/auth_url.rb new file mode 100644 index 00000000..be486566 --- /dev/null +++ b/lib/zitadel/client/models/auth_url.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class AuthUrl + attr_accessor :auth_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'auth_url' => :'authUrl' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_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::AuthUrl` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::AuthUrl`. Please check the 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_url') + self.auth_url = attributes[:'auth_url'] + else + self.auth_url = 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 @auth_url.nil? + invalid_properties.push('invalid value for "auth_url", auth_url 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 @auth_url.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] auth_url Value to be assigned + def auth_url=(auth_url) + if auth_url.nil? + fail ArgumentError, 'auth_url cannot be nil' + end + + @auth_url = auth_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 && + auth_url == o.auth_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 + [auth_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/azure_ad.rb b/lib/zitadel/client/models/azure_ad.rb new file mode 100644 index 00000000..736d5976 --- /dev/null +++ b/lib/zitadel/client/models/azure_ad.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class AzureAd + attr_accessor :azure_ad + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'azure_ad' => :'azureAd' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'azure_ad' => :'IdentityProviderServiceAzureADConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::AzureAd` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::AzureAd`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'azure_ad') + self.azure_ad = attributes[:'azure_ad'] + else + self.azure_ad = 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 @azure_ad.nil? + invalid_properties.push('invalid value for "azure_ad", azure_ad 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 @azure_ad.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceAzureADConfig] azure_ad Value to be assigned + def azure_ad=(azure_ad) + if azure_ad.nil? + fail ArgumentError, 'azure_ad cannot be nil' + end + + @azure_ad = azure_ad + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + azure_ad == o.azure_ad + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [azure_ad].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_action_service_any.rb b/lib/zitadel/client/models/beta_action_service_any.rb new file mode 100644 index 00000000..5b07ce15 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaActionServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaActionServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_action_service_condition.rb b/lib/zitadel/client/models/beta_action_service_condition.rb new file mode 100644 index 00000000..6f0807d2 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_condition.rb @@ -0,0 +1,112 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaActionServiceCondition + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Event', + :'Function', + :'Request', + :'Response' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_action_service_connect_error.rb b/lib/zitadel/client/models/beta_action_service_connect_error.rb new file mode 100644 index 00000000..681c0e99 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaActionServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaActionServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaActionServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_action_service_create_target_request.rb b/lib/zitadel/client/models/beta_action_service_create_target_request.rb new file mode 100644 index 00000000..6ed19e34 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_create_target_request.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaActionServiceCreateTargetRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'RestAsync', + :'RestCall', + :'RestWebhook' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_action_service_create_target_response.rb b/lib/zitadel/client/models/beta_action_service_create_target_response.rb new file mode 100644 index 00000000..4abbe999 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceCreateTargetResponse + # The unique identifier of the newly created target. + attr_accessor :id + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaActionServiceCreateTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceCreateTargetResponse`. Please check the 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/beta_action_service_delete_target_request.rb b/lib/zitadel/client/models/beta_action_service_delete_target_request.rb new file mode 100644 index 00000000..e979b0f6 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_delete_target_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaActionServiceDeleteTargetRequest + 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::BetaActionServiceDeleteTargetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceDeleteTargetRequest`. Please check the 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + 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/beta_action_service_delete_target_response.rb b/lib/zitadel/client/models/beta_action_service_delete_target_response.rb new file mode 100644 index 00000000..80e25fd9 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceDeleteTargetResponse + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaActionServiceDeleteTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceDeleteTargetResponse`. Please check the 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/beta_action_service_execution.rb b/lib/zitadel/client/models/beta_action_service_execution.rb new file mode 100644 index 00000000..a99851d9 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceExecution + attr_accessor :condition + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :creation_date + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # Ordered list of targets 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' => :'BetaActionServiceCondition', + :'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::BetaActionServiceExecution` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceExecution`. Please check the 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/beta_action_service_execution_field_name.rb b/lib/zitadel/client/models/beta_action_service_execution_field_name.rb new file mode 100644 index 00000000..d1101b8e --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_execution_field_name.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 BetaActionServiceExecutionFieldName + EXECUTION_FIELD_NAME_UNSPECIFIED = "EXECUTION_FIELD_NAME_UNSPECIFIED".freeze + EXECUTION_FIELD_NAME_ID = "EXECUTION_FIELD_NAME_ID".freeze + EXECUTION_FIELD_NAME_CREATED_DATE = "EXECUTION_FIELD_NAME_CREATED_DATE".freeze + EXECUTION_FIELD_NAME_CHANGED_DATE = "EXECUTION_FIELD_NAME_CHANGED_DATE".freeze + + def self.all_vars + @all_vars ||= [EXECUTION_FIELD_NAME_UNSPECIFIED, EXECUTION_FIELD_NAME_ID, EXECUTION_FIELD_NAME_CREATED_DATE, EXECUTION_FIELD_NAME_CHANGED_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 BetaActionServiceExecutionFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaActionServiceExecutionFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/beta_action_service_execution_search_filter.rb b/lib/zitadel/client/models/beta_action_service_execution_search_filter.rb new file mode 100644 index 00000000..be88689b --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_execution_search_filter.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaActionServiceExecutionSearchFilter + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ExecutionTypeFilter', + :'InConditionsFilter', + :'TargetFilter' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_action_service_get_target_request.rb b/lib/zitadel/client/models/beta_action_service_get_target_request.rb new file mode 100644 index 00000000..f04e14d3 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_get_target_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 BetaActionServiceGetTargetRequest + 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::BetaActionServiceGetTargetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceGetTargetRequest`. Please check the 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/beta_action_service_get_target_response.rb b/lib/zitadel/client/models/beta_action_service_get_target_response.rb new file mode 100644 index 00000000..37ff50d7 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceGetTargetResponse + 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' => :'BetaActionServiceTarget' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaActionServiceGetTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceGetTargetResponse`. Please check the 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/beta_action_service_list_execution_functions_response.rb b/lib/zitadel/client/models/beta_action_service_list_execution_functions_response.rb new file mode 100644 index 00000000..d1414296 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_list_execution_functions_response.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 BetaActionServiceListExecutionFunctionsResponse + # All available methods + 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::BetaActionServiceListExecutionFunctionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceListExecutionFunctionsResponse`. Please check the 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/beta_action_service_list_execution_methods_response.rb b/lib/zitadel/client/models/beta_action_service_list_execution_methods_response.rb new file mode 100644 index 00000000..46319299 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_list_execution_methods_response.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 BetaActionServiceListExecutionMethodsResponse + # All available methods + 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::BetaActionServiceListExecutionMethodsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceListExecutionMethodsResponse`. Please check the 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/beta_action_service_list_execution_services_response.rb b/lib/zitadel/client/models/beta_action_service_list_execution_services_response.rb new file mode 100644 index 00000000..00e320ea --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_list_execution_services_response.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 BetaActionServiceListExecutionServicesResponse + # All available methods + 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::BetaActionServiceListExecutionServicesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceListExecutionServicesResponse`. Please check the 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/beta_action_service_list_executions_request.rb b/lib/zitadel/client/models/beta_action_service_list_executions_request.rb new file mode 100644 index 00000000..66ce9282 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_list_executions_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 BetaActionServiceListExecutionsRequest + 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' => :'BetaActionServicePaginationRequest', + :'sorting_column' => :'BetaActionServiceExecutionFieldName', + :'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::BetaActionServiceListExecutionsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceListExecutionsRequest`. Please check the 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'] + 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/beta_action_service_list_executions_response.rb b/lib/zitadel/client/models/beta_action_service_list_executions_response.rb new file mode 100644 index 00000000..22544eef --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceListExecutionsResponse + 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' => :'BetaActionServicePaginationResponse', + :'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::BetaActionServiceListExecutionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceListExecutionsResponse`. Please check the 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/beta_action_service_list_targets_request.rb b/lib/zitadel/client/models/beta_action_service_list_targets_request.rb new file mode 100644 index 00000000..0a86e8eb --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_list_targets_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 BetaActionServiceListTargetsRequest + 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' => :'BetaActionServicePaginationRequest', + :'sorting_column' => :'BetaActionServiceTargetFieldName', + :'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::BetaActionServiceListTargetsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceListTargetsRequest`. Please check the 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'] + 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/beta_action_service_list_targets_response.rb b/lib/zitadel/client/models/beta_action_service_list_targets_response.rb new file mode 100644 index 00000000..763310d7 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceListTargetsResponse + 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' => :'BetaActionServicePaginationResponse', + :'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::BetaActionServiceListTargetsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceListTargetsResponse`. Please check the 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/beta_action_service_pagination_request.rb b/lib/zitadel/client/models/beta_action_service_pagination_request.rb new file mode 100644 index 00000000..0c440d12 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_pagination_request.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 BetaActionServicePaginationRequest + # 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' => :'Object', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'offset', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaActionServicePaginationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServicePaginationRequest`. Please check the 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/beta_action_service_pagination_response.rb b/lib/zitadel/client/models/beta_action_service_pagination_response.rb new file mode 100644 index 00000000..6c267e1c --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_pagination_response.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 BetaActionServicePaginationResponse + # 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' => :'Object', + :'applied_limit' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'applied_limit' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaActionServicePaginationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServicePaginationResponse`. Please check the 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/beta_action_service_set_execution_request.rb b/lib/zitadel/client/models/beta_action_service_set_execution_request.rb new file mode 100644 index 00000000..4a94ba6d --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaActionServiceSetExecutionRequest + attr_accessor :condition + + # Ordered list of targets 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' => :'BetaActionServiceCondition', + :'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::BetaActionServiceSetExecutionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceSetExecutionRequest`. Please check the 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/beta_action_service_set_execution_response.rb b/lib/zitadel/client/models/beta_action_service_set_execution_response.rb new file mode 100644 index 00000000..ade7f8cf --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceSetExecutionResponse + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaActionServiceSetExecutionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceSetExecutionResponse`. Please check the 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/beta_action_service_target.rb b/lib/zitadel/client/models/beta_action_service_target.rb new file mode 100644 index 00000000..d6e7d0a3 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_target.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaActionServiceTarget + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'RestAsync', + :'RestCall', + :'RestWebhook' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_action_service_target_field_name.rb b/lib/zitadel/client/models/beta_action_service_target_field_name.rb new file mode 100644 index 00000000..bcdadd21 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_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 BetaActionServiceTargetFieldName + 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 BetaActionServiceTargetFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaActionServiceTargetFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/beta_action_service_target_search_filter.rb b/lib/zitadel/client/models/beta_action_service_target_search_filter.rb new file mode 100644 index 00000000..d0ae74d9 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_target_search_filter.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaActionServiceTargetSearchFilter + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'InTargetIdsFilter', + :'TargetNameFilter' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_action_service_update_target_request.rb b/lib/zitadel/client/models/beta_action_service_update_target_request.rb new file mode 100644 index 00000000..9f892fd4 --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_update_target_request.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaActionServiceUpdateTargetRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'RestAsync', + :'RestCall', + :'RestWebhook' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_action_service_update_target_response.rb b/lib/zitadel/client/models/beta_action_service_update_target_response.rb new file mode 100644 index 00000000..cc67d5ba --- /dev/null +++ b/lib/zitadel/client/models/beta_action_service_update_target_response.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 BetaActionServiceUpdateTargetResponse + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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([ + :'signing_key' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaActionServiceUpdateTargetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaActionServiceUpdateTargetResponse`. Please check the 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/beta_feature_service_any.rb b/lib/zitadel/client/models/beta_feature_service_any.rb new file mode 100644 index 00000000..ffe32828 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaFeatureServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaFeatureServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_connect_error.rb b/lib/zitadel/client/models/beta_feature_service_connect_error.rb new file mode 100644 index 00000000..19e32525 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaFeatureServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaFeatureServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_details.rb b/lib/zitadel/client/models/beta_feature_service_details.rb new file mode 100644 index 00000000..b1426585 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_details.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 BetaFeatureServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceDetails`. Please check the 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/beta_feature_service_feature_flag.rb b/lib/zitadel/client/models/beta_feature_service_feature_flag.rb new file mode 100644 index 00000000..35376797 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_feature_flag.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 + # FeatureFlag is a simple boolean Feature setting, without further payload. + class BetaFeatureServiceFeatureFlag + 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' => :'BetaFeatureServiceSource' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceFeatureFlag` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceFeatureFlag`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_feature_service_get_instance_features_request.rb b/lib/zitadel/client/models/beta_feature_service_get_instance_features_request.rb new file mode 100644 index 00000000..773a30dc --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_get_instance_features_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 BetaFeatureServiceGetInstanceFeaturesRequest + attr_accessor :inheritance + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'inheritance' => :'inheritance' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'inheritance' => :'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::BetaFeatureServiceGetInstanceFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceGetInstanceFeaturesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'inheritance') + self.inheritance = attributes[:'inheritance'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + inheritance == o.inheritance + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [inheritance].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_get_instance_features_response.rb b/lib/zitadel/client/models/beta_feature_service_get_instance_features_response.rb new file mode 100644 index 00000000..9e18f993 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_get_instance_features_response.rb @@ -0,0 +1,311 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaFeatureServiceGetInstanceFeaturesResponse + 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 :improved_performance + + attr_accessor :web_key + + attr_accessor :debug_oidc_parent_error + + attr_accessor :oidc_single_v1_session_termination + + # 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', + :'improved_performance' => :'improvedPerformance', + :'web_key' => :'webKey', + :'debug_oidc_parent_error' => :'debugOidcParentError', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaFeatureServiceDetails', + :'login_default_org' => :'BetaFeatureServiceFeatureFlag', + :'oidc_trigger_introspection_projections' => :'BetaFeatureServiceFeatureFlag', + :'oidc_legacy_introspection' => :'BetaFeatureServiceFeatureFlag', + :'user_schema' => :'BetaFeatureServiceFeatureFlag', + :'oidc_token_exchange' => :'BetaFeatureServiceFeatureFlag', + :'improved_performance' => :'BetaFeatureServiceImprovedPerformanceFeatureFlag', + :'web_key' => :'BetaFeatureServiceFeatureFlag', + :'debug_oidc_parent_error' => :'BetaFeatureServiceFeatureFlag', + :'oidc_single_v1_session_termination' => :'BetaFeatureServiceFeatureFlag' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceGetInstanceFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceGetInstanceFeaturesResponse`. Please check the 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?(:'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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + 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 + end + + # @see the `==` method + # @param [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, improved_performance, web_key, debug_oidc_parent_error, oidc_single_v1_session_termination].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_get_organization_features_request.rb b/lib/zitadel/client/models/beta_feature_service_get_organization_features_request.rb new file mode 100644 index 00000000..36900bca --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_get_organization_features_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 BetaFeatureServiceGetOrganizationFeaturesRequest + attr_accessor :organization_id + + attr_accessor :inheritance + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'inheritance' => :'inheritance' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'inheritance' => :'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::BetaFeatureServiceGetOrganizationFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceGetOrganizationFeaturesRequest`. Please check the 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'] + end + + if attributes.key?(:'inheritance') + self.inheritance = attributes[:'inheritance'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + inheritance == o.inheritance + end + + # @see the `==` method + # @param [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, inheritance].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_get_organization_features_response.rb b/lib/zitadel/client/models/beta_feature_service_get_organization_features_response.rb new file mode 100644 index 00000000..2a55a762 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceGetOrganizationFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceGetOrganizationFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceGetOrganizationFeaturesResponse`. Please check the 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/beta_feature_service_get_system_features_response.rb b/lib/zitadel/client/models/beta_feature_service_get_system_features_response.rb new file mode 100644 index 00000000..f5c26526 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_get_system_features_response.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 BetaFeatureServiceGetSystemFeaturesResponse + 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 :improved_performance + + attr_accessor :oidc_single_v1_session_termination + + # 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', + :'improved_performance' => :'improvedPerformance', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaFeatureServiceDetails', + :'login_default_org' => :'BetaFeatureServiceFeatureFlag', + :'oidc_trigger_introspection_projections' => :'BetaFeatureServiceFeatureFlag', + :'oidc_legacy_introspection' => :'BetaFeatureServiceFeatureFlag', + :'user_schema' => :'BetaFeatureServiceFeatureFlag', + :'oidc_token_exchange' => :'BetaFeatureServiceFeatureFlag', + :'improved_performance' => :'BetaFeatureServiceImprovedPerformanceFeatureFlag', + :'oidc_single_v1_session_termination' => :'BetaFeatureServiceFeatureFlag' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceGetSystemFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceGetSystemFeaturesResponse`. Please check the 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?(:'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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + improved_performance == o.improved_performance && + oidc_single_v1_session_termination == o.oidc_single_v1_session_termination + end + + # @see the `==` method + # @param [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, improved_performance, oidc_single_v1_session_termination].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_get_user_features_request.rb b/lib/zitadel/client/models/beta_feature_service_get_user_features_request.rb new file mode 100644 index 00000000..bb52b29e --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_get_user_features_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 BetaFeatureServiceGetUserFeaturesRequest + attr_accessor :user_id + + attr_accessor :inheritance + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'inheritance' => :'inheritance' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'inheritance' => :'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::BetaFeatureServiceGetUserFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceGetUserFeaturesRequest`. Please check the 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?(:'inheritance') + self.inheritance = attributes[:'inheritance'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + inheritance == o.inheritance + end + + # @see the `==` method + # @param [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, inheritance].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_get_user_features_response.rb b/lib/zitadel/client/models/beta_feature_service_get_user_features_response.rb new file mode 100644 index 00000000..c1e31fee --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceGetUserFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceGetUserFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceGetUserFeaturesResponse`. Please check the 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/beta_feature_service_improved_performance.rb b/lib/zitadel/client/models/beta_feature_service_improved_performance.rb new file mode 100644 index 00000000..b52159c7 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceImprovedPerformance + 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 BetaFeatureServiceImprovedPerformance.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaFeatureServiceImprovedPerformance" + end + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_improved_performance_feature_flag.rb b/lib/zitadel/client/models/beta_feature_service_improved_performance_feature_flag.rb new file mode 100644 index 00000000..bdac033f --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_improved_performance_feature_flag.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 BetaFeatureServiceImprovedPerformanceFeatureFlag + 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' => :'BetaFeatureServiceSource' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceImprovedPerformanceFeatureFlag` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceImprovedPerformanceFeatureFlag`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_feature_service_reset_instance_features_response.rb b/lib/zitadel/client/models/beta_feature_service_reset_instance_features_response.rb new file mode 100644 index 00000000..8909ea3d --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceResetInstanceFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceResetInstanceFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceResetInstanceFeaturesResponse`. Please check the 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/beta_feature_service_reset_organization_features_request.rb b/lib/zitadel/client/models/beta_feature_service_reset_organization_features_request.rb new file mode 100644 index 00000000..3e435f14 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_reset_organization_features_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 BetaFeatureServiceResetOrganizationFeaturesRequest + 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::BetaFeatureServiceResetOrganizationFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceResetOrganizationFeaturesRequest`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_feature_service_reset_organization_features_response.rb b/lib/zitadel/client/models/beta_feature_service_reset_organization_features_response.rb new file mode 100644 index 00000000..ba615871 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceResetOrganizationFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceResetOrganizationFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceResetOrganizationFeaturesResponse`. Please check the 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/beta_feature_service_reset_system_features_response.rb b/lib/zitadel/client/models/beta_feature_service_reset_system_features_response.rb new file mode 100644 index 00000000..1b609ad5 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceResetSystemFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceResetSystemFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceResetSystemFeaturesResponse`. Please check the 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/beta_feature_service_reset_user_features_request.rb b/lib/zitadel/client/models/beta_feature_service_reset_user_features_request.rb new file mode 100644 index 00000000..c7bcbf56 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_reset_user_features_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 BetaFeatureServiceResetUserFeaturesRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaFeatureServiceResetUserFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceResetUserFeaturesRequest`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_reset_user_features_response.rb b/lib/zitadel/client/models/beta_feature_service_reset_user_features_response.rb new file mode 100644 index 00000000..dce76078 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceResetUserFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceResetUserFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceResetUserFeaturesResponse`. Please check the 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/beta_feature_service_set_instance_features_request.rb b/lib/zitadel/client/models/beta_feature_service_set_instance_features_request.rb new file mode 100644 index 00000000..d1151f56 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_set_instance_features_request.rb @@ -0,0 +1,312 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaFeatureServiceSetInstanceFeaturesRequest + 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 :improved_performance + + attr_accessor :web_key + + attr_accessor :debug_oidc_parent_error + + attr_accessor :oidc_single_v1_session_termination + + # 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', + :'improved_performance' => :'improvedPerformance', + :'web_key' => :'webKey', + :'debug_oidc_parent_error' => :'debugOidcParentError', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'improved_performance' => :'Array', + :'web_key' => :'Boolean', + :'debug_oidc_parent_error' => :'Boolean', + :'oidc_single_v1_session_termination' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'login_default_org', + :'oidc_trigger_introspection_projections', + :'oidc_legacy_introspection', + :'user_schema', + :'oidc_token_exchange', + :'web_key', + :'debug_oidc_parent_error', + :'oidc_single_v1_session_termination' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceSetInstanceFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetInstanceFeaturesRequest`. Please check the 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?(:'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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + 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 + end + + # @see the `==` method + # @param [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, improved_performance, web_key, debug_oidc_parent_error, oidc_single_v1_session_termination].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_set_instance_features_response.rb b/lib/zitadel/client/models/beta_feature_service_set_instance_features_response.rb new file mode 100644 index 00000000..5cc0e61c --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceSetInstanceFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceSetInstanceFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetInstanceFeaturesResponse`. Please check the 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/beta_feature_service_set_organization_features_request.rb b/lib/zitadel/client/models/beta_feature_service_set_organization_features_request.rb new file mode 100644 index 00000000..0c469917 --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_set_organization_features_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 BetaFeatureServiceSetOrganizationFeaturesRequest + 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::BetaFeatureServiceSetOrganizationFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetOrganizationFeaturesRequest`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_feature_service_set_organization_features_response.rb b/lib/zitadel/client/models/beta_feature_service_set_organization_features_response.rb new file mode 100644 index 00000000..b2a5f6b9 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceSetOrganizationFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceSetOrganizationFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetOrganizationFeaturesResponse`. Please check the 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/beta_feature_service_set_system_features_request.rb b/lib/zitadel/client/models/beta_feature_service_set_system_features_request.rb new file mode 100644 index 00000000..355cefbb --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_set_system_features_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 BetaFeatureServiceSetSystemFeaturesRequest + 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 :improved_performance + + attr_accessor :oidc_single_v1_session_termination + + # 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', + :'improved_performance' => :'improvedPerformance', + :'oidc_single_v1_session_termination' => :'oidcSingleV1SessionTermination' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'improved_performance' => :'Array', + :'oidc_single_v1_session_termination' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'login_default_org', + :'oidc_trigger_introspection_projections', + :'oidc_legacy_introspection', + :'user_schema', + :'oidc_token_exchange', + :'oidc_single_v1_session_termination' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceSetSystemFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetSystemFeaturesRequest`. Please check the 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?(:'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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + improved_performance == o.improved_performance && + oidc_single_v1_session_termination == o.oidc_single_v1_session_termination + end + + # @see the `==` method + # @param [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, improved_performance, oidc_single_v1_session_termination].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_set_system_features_response.rb b/lib/zitadel/client/models/beta_feature_service_set_system_features_response.rb new file mode 100644 index 00000000..3e2002b2 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceSetSystemFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceSetSystemFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetSystemFeaturesResponse`. Please check the 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/beta_feature_service_set_user_feature_request.rb b/lib/zitadel/client/models/beta_feature_service_set_user_feature_request.rb new file mode 100644 index 00000000..86ba7c6f --- /dev/null +++ b/lib/zitadel/client/models/beta_feature_service_set_user_feature_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 BetaFeatureServiceSetUserFeatureRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaFeatureServiceSetUserFeatureRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetUserFeatureRequest`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_feature_service_set_user_features_response.rb b/lib/zitadel/client/models/beta_feature_service_set_user_features_response.rb new file mode 100644 index 00000000..979a94eb --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceSetUserFeaturesResponse + 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' => :'BetaFeatureServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaFeatureServiceSetUserFeaturesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaFeatureServiceSetUserFeaturesResponse`. Please check the 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/beta_feature_service_source.rb b/lib/zitadel/client/models/beta_feature_service_source.rb new file mode 100644 index 00000000..eff00b29 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaFeatureServiceSource + 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 BetaFeatureServiceSource.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaFeatureServiceSource" + end + end + +end diff --git a/lib/zitadel/client/models/beta_o_i_d_c_service_any.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_any.rb new file mode 100644 index 00000000..8cc85de7 --- /dev/null +++ b/lib/zitadel/client/models/beta_o_i_d_c_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaOIDCServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaOIDCServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOIDCServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_o_i_d_c_service_auth_request.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_auth_request.rb new file mode 100644 index 00000000..da4c6d77 --- /dev/null +++ b/lib/zitadel/client/models/beta_o_i_d_c_service_auth_request.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 BetaOIDCServiceAuthRequest + attr_accessor :id + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :creation_date + + attr_accessor :client_id + + attr_accessor :scope + + attr_accessor :redirect_uri + + attr_accessor :prompt + + attr_accessor :ui_locales + + attr_accessor :login_hint + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :max_age + + 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([ + :'login_hint', + :'hint_user_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaOIDCServiceAuthRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOIDCServiceAuthRequest`. Please check the 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/beta_o_i_d_c_service_connect_error.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_connect_error.rb new file mode 100644 index 00000000..a19f1e9a --- /dev/null +++ b/lib/zitadel/client/models/beta_o_i_d_c_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaOIDCServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaOIDCServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaOIDCServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOIDCServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_o_i_d_c_service_create_callback_response.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_create_callback_response.rb new file mode 100644 index 00000000..44243acc --- /dev/null +++ b/lib/zitadel/client/models/beta_o_i_d_c_service_create_callback_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 BetaOIDCServiceCreateCallbackResponse + attr_accessor :details + + 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' => :'BetaOIDCServiceDetails', + :'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::BetaOIDCServiceCreateCallbackResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOIDCServiceCreateCallbackResponse`. Please check the 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/beta_o_i_d_c_service_details.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_details.rb new file mode 100644 index 00000000..f42a9995 --- /dev/null +++ b/lib/zitadel/client/models/beta_o_i_d_c_service_details.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 BetaOIDCServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaOIDCServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOIDCServiceDetails`. Please check the 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/beta_o_i_d_c_service_get_auth_request_request.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_get_auth_request_request.rb new file mode 100644 index 00000000..450088ff --- /dev/null +++ b/lib/zitadel/client/models/beta_o_i_d_c_service_get_auth_request_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 BetaOIDCServiceGetAuthRequestRequest + attr_accessor :auth_request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'auth_request_id' => :'authRequestId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_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::BetaOIDCServiceGetAuthRequestRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOIDCServiceGetAuthRequestRequest`. Please check the 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_id') + self.auth_request_id = attributes[:'auth_request_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 && + auth_request_id == o.auth_request_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 + [auth_request_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/beta_o_i_d_c_service_get_auth_request_response.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_get_auth_request_response.rb new file mode 100644 index 00000000..e5e772fd --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaOIDCServiceGetAuthRequestResponse + 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' => :'BetaOIDCServiceAuthRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaOIDCServiceGetAuthRequestResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOIDCServiceGetAuthRequestResponse`. Please check the 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/beta_o_i_d_c_service_prompt.rb b/lib/zitadel/client/models/beta_o_i_d_c_service_prompt.rb new file mode 100644 index 00000000..6ef56bd4 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaOIDCServicePrompt + 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 BetaOIDCServicePrompt.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaOIDCServicePrompt" + end + end + +end diff --git a/lib/zitadel/client/models/beta_oidc_service_create_callback_request.rb b/lib/zitadel/client/models/beta_oidc_service_create_callback_request.rb new file mode 100644 index 00000000..47a5d6a4 --- /dev/null +++ b/lib/zitadel/client/models/beta_oidc_service_create_callback_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaOIDCServiceCreateCallbackRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Error2', + :'Session2' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_organization_service_add_organization_request.rb b/lib/zitadel/client/models/beta_organization_service_add_organization_request.rb new file mode 100644 index 00000000..7945803a --- /dev/null +++ b/lib/zitadel/client/models/beta_organization_service_add_organization_request.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 BetaOrganizationServiceAddOrganizationRequest + 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::BetaOrganizationServiceAddOrganizationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOrganizationServiceAddOrganizationRequest`. Please check the 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + 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/beta_organization_service_add_organization_response.rb b/lib/zitadel/client/models/beta_organization_service_add_organization_response.rb new file mode 100644 index 00000000..3a97ba82 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaOrganizationServiceAddOrganizationResponse + 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' => :'BetaOrganizationServiceDetails', + :'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::BetaOrganizationServiceAddOrganizationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOrganizationServiceAddOrganizationResponse`. Please check the 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/beta_organization_service_admin.rb b/lib/zitadel/client/models/beta_organization_service_admin.rb new file mode 100644 index 00000000..4df39a66 --- /dev/null +++ b/lib/zitadel/client/models/beta_organization_service_admin.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaOrganizationServiceAdmin + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Human2', + :'UserId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_organization_service_any.rb b/lib/zitadel/client/models/beta_organization_service_any.rb new file mode 100644 index 00000000..6ad03121 --- /dev/null +++ b/lib/zitadel/client/models/beta_organization_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaOrganizationServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaOrganizationServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOrganizationServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_organization_service_connect_error.rb b/lib/zitadel/client/models/beta_organization_service_connect_error.rb new file mode 100644 index 00000000..e5cdc414 --- /dev/null +++ b/lib/zitadel/client/models/beta_organization_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaOrganizationServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaOrganizationServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaOrganizationServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOrganizationServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_organization_service_created_admin.rb b/lib/zitadel/client/models/beta_organization_service_created_admin.rb new file mode 100644 index 00000000..2ec0c967 --- /dev/null +++ b/lib/zitadel/client/models/beta_organization_service_created_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 BetaOrganizationServiceCreatedAdmin + 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([ + :'email_code', + :'phone_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaOrganizationServiceCreatedAdmin` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOrganizationServiceCreatedAdmin`. Please check the 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/beta_organization_service_details.rb b/lib/zitadel/client/models/beta_organization_service_details.rb new file mode 100644 index 00000000..ff4b4eb0 --- /dev/null +++ b/lib/zitadel/client/models/beta_organization_service_details.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 BetaOrganizationServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaOrganizationServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaOrganizationServiceDetails`. Please check the 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/beta_session_service_any.rb b/lib/zitadel/client/models/beta_session_service_any.rb new file mode 100644 index 00000000..7da0401e --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaSessionServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaSessionServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_session_service_challenges.rb b/lib/zitadel/client/models/beta_session_service_challenges.rb new file mode 100644 index 00000000..c77e7c12 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_challenges.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 BetaSessionServiceChallenges + 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' => :'BetaSessionServiceWebAuthN', + :'otp_sms' => :'String', + :'otp_email' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'otp_sms', + :'otp_email' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceChallenges` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceChallenges`. Please check the 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/beta_session_service_check_i_d_p_intent.rb b/lib/zitadel/client/models/beta_session_service_check_i_d_p_intent.rb new file mode 100644 index 00000000..b01b22cf --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_check_i_d_p_intent.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 BetaSessionServiceCheckIDPIntent + attr_accessor :idp_intent_id + + 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::BetaSessionServiceCheckIDPIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceCheckIDPIntent`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_session_service_check_o_t_p.rb b/lib/zitadel/client/models/beta_session_service_check_o_t_p.rb new file mode 100644 index 00000000..87a1fc73 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_check_o_t_p.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 BetaSessionServiceCheckOTP + 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::BetaSessionServiceCheckOTP` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceCheckOTP`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_session_service_check_password.rb b/lib/zitadel/client/models/beta_session_service_check_password.rb new file mode 100644 index 00000000..e767916f --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_check_password.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 BetaSessionServiceCheckPassword + 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::BetaSessionServiceCheckPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceCheckPassword`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_session_service_check_t_o_t_p.rb b/lib/zitadel/client/models/beta_session_service_check_t_o_t_p.rb new file mode 100644 index 00000000..0dc918ae --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_check_t_o_t_p.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 BetaSessionServiceCheckTOTP + 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::BetaSessionServiceCheckTOTP` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceCheckTOTP`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_session_service_check_user.rb b/lib/zitadel/client/models/beta_session_service_check_user.rb new file mode 100644 index 00000000..0126c7f4 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_check_user.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaSessionServiceCheckUser + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'LoginName', + :'UserId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_session_service_check_web_auth_n.rb b/lib/zitadel/client/models/beta_session_service_check_web_auth_n.rb new file mode 100644 index 00000000..8ed2de44 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_check_web_auth_n.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 BetaSessionServiceCheckWebAuthN + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + 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' => :'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::BetaSessionServiceCheckWebAuthN` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceCheckWebAuthN`. Please check the 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') + if (value = attributes[:'credential_assertion_data']).is_a?(Hash) + self.credential_assertion_data = value + end + 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 [Hash] 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/beta_session_service_checks.rb b/lib/zitadel/client/models/beta_session_service_checks.rb new file mode 100644 index 00000000..6b286e00 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceChecks + 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' => :'BetaSessionServiceCheckUser', + :'password' => :'BetaSessionServiceCheckPassword', + :'web_auth_n' => :'BetaSessionServiceCheckWebAuthN', + :'idp_intent' => :'BetaSessionServiceCheckIDPIntent', + :'totp' => :'BetaSessionServiceCheckTOTP', + :'otp_sms' => :'BetaSessionServiceCheckOTP', + :'otp_email' => :'BetaSessionServiceCheckOTP' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceChecks` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceChecks`. Please check the 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/beta_session_service_connect_error.rb b/lib/zitadel/client/models/beta_session_service_connect_error.rb new file mode 100644 index 00000000..b841d019 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaSessionServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaSessionServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_session_service_create_session_request.rb b/lib/zitadel/client/models/beta_session_service_create_session_request.rb new file mode 100644 index 00000000..e6a30bca --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_create_session_request.rb @@ -0,0 +1,269 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaSessionServiceCreateSessionRequest + attr_accessor :checks + + attr_accessor :metadata + + attr_accessor :challenges + + attr_accessor :user_agent + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + 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' => :'BetaSessionServiceChecks', + :'metadata' => :'Hash', + :'challenges' => :'BetaSessionServiceRequestChallenges', + :'user_agent' => :'BetaSessionServiceUserAgent', + :'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::BetaSessionServiceCreateSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceCreateSessionRequest`. Please check the 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/beta_session_service_create_session_response.rb b/lib/zitadel/client/models/beta_session_service_create_session_response.rb new file mode 100644 index 00000000..891f2b22 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_create_session_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 BetaSessionServiceCreateSessionResponse + attr_accessor :details + + attr_accessor :session_id + + 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' => :'BetaSessionServiceDetails', + :'session_id' => :'String', + :'session_token' => :'String', + :'challenges' => :'BetaSessionServiceChallenges' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceCreateSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceCreateSessionResponse`. Please check the 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/beta_session_service_delete_session_request.rb b/lib/zitadel/client/models/beta_session_service_delete_session_request.rb new file mode 100644 index 00000000..3866db56 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_delete_session_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 BetaSessionServiceDeleteSessionRequest + attr_accessor :session_id + + 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([ + :'session_token' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceDeleteSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceDeleteSessionRequest`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_session_service_delete_session_response.rb b/lib/zitadel/client/models/beta_session_service_delete_session_response.rb new file mode 100644 index 00000000..ed1307aa --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceDeleteSessionResponse + 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' => :'BetaSessionServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceDeleteSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceDeleteSessionResponse`. Please check the 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/beta_session_service_details.rb b/lib/zitadel/client/models/beta_session_service_details.rb new file mode 100644 index 00000000..8f02bae9 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_details.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 BetaSessionServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceDetails`. Please check the 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/beta_session_service_factors.rb b/lib/zitadel/client/models/beta_session_service_factors.rb new file mode 100644 index 00000000..499adfa9 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceFactors + 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' => :'BetaSessionServiceUserFactor', + :'password' => :'BetaSessionServicePasswordFactor', + :'web_auth_n' => :'BetaSessionServiceWebAuthNFactor', + :'intent' => :'BetaSessionServiceIntentFactor', + :'totp' => :'BetaSessionServiceTOTPFactor', + :'otp_sms' => :'BetaSessionServiceOTPFactor', + :'otp_email' => :'BetaSessionServiceOTPFactor' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceFactors` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceFactors`. Please check the 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/beta_session_service_get_session_request.rb b/lib/zitadel/client/models/beta_session_service_get_session_request.rb new file mode 100644 index 00000000..4acdf07e --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_get_session_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 BetaSessionServiceGetSessionRequest + attr_accessor :session_id + + 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([ + :'session_token' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceGetSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceGetSessionRequest`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_session_service_get_session_response.rb b/lib/zitadel/client/models/beta_session_service_get_session_response.rb new file mode 100644 index 00000000..2ac04def --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceGetSessionResponse + 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' => :'BetaSessionServiceSession' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceGetSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceGetSessionResponse`. Please check the 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/beta_session_service_header_values.rb b/lib/zitadel/client/models/beta_session_service_header_values.rb new file mode 100644 index 00000000..c76ba875 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_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 BetaSessionServiceHeaderValues + 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::BetaSessionServiceHeaderValues` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceHeaderValues`. Please check the 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/beta_session_service_intent_factor.rb b/lib/zitadel/client/models/beta_session_service_intent_factor.rb new file mode 100644 index 00000000..1357ce3c --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceIntentFactor + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaSessionServiceIntentFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceIntentFactor`. Please check the 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/beta_session_service_list_details.rb b/lib/zitadel/client/models/beta_session_service_list_details.rb new file mode 100644 index 00000000..30fff4be --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_list_details.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 BetaSessionServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'processed_sequence' => :'Object', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'processed_sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceListDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceListDetails`. Please check the 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/beta_session_service_list_query.rb b/lib/zitadel/client/models/beta_session_service_list_query.rb new file mode 100644 index 00000000..31fdc626 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_list_query.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 BetaSessionServiceListQuery + attr_accessor :offset + + attr_accessor :limit + + 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' => :'Object', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'offset', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceListQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceListQuery`. Please check the 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/beta_session_service_list_sessions_request.rb b/lib/zitadel/client/models/beta_session_service_list_sessions_request.rb new file mode 100644 index 00000000..e49e91b3 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_list_sessions_request.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 BetaSessionServiceListSessionsRequest + 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' => :'BetaSessionServiceListQuery', + :'queries' => :'Array', + :'sorting_column' => :'BetaSessionServiceSessionFieldName' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceListSessionsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceListSessionsRequest`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_session_service_list_sessions_response.rb b/lib/zitadel/client/models/beta_session_service_list_sessions_response.rb new file mode 100644 index 00000000..751bf177 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceListSessionsResponse + 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' => :'BetaSessionServiceListDetails', + :'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::BetaSessionServiceListSessionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceListSessionsResponse`. Please check the 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/beta_session_service_o_t_p_factor.rb b/lib/zitadel/client/models/beta_session_service_o_t_p_factor.rb new file mode 100644 index 00000000..e8188f95 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceOTPFactor + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaSessionServiceOTPFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceOTPFactor`. Please check the 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/beta_session_service_o_t_p_s_m_s.rb b/lib/zitadel/client/models/beta_session_service_o_t_p_s_m_s.rb new file mode 100644 index 00000000..2959ed4f --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_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 BetaSessionServiceOTPSMS + 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::BetaSessionServiceOTPSMS` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceOTPSMS`. Please check the 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/beta_session_service_otp_email.rb b/lib/zitadel/client/models/beta_session_service_otp_email.rb new file mode 100644 index 00000000..049e1382 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_otp_email.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaSessionServiceOTPEmail + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode', + :'SendCode' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_session_service_password_factor.rb b/lib/zitadel/client/models/beta_session_service_password_factor.rb new file mode 100644 index 00000000..9361de46 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServicePasswordFactor + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaSessionServicePasswordFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServicePasswordFactor`. Please check the 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/beta_session_service_request_challenges.rb b/lib/zitadel/client/models/beta_session_service_request_challenges.rb new file mode 100644 index 00000000..fd2c12f7 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceRequestChallenges + 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' => :'BetaSessionServiceWebAuthN', + :'otp_sms' => :'BetaSessionServiceOTPSMS', + :'otp_email' => :'BetaSessionServiceOTPEmail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceRequestChallenges` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceRequestChallenges`. Please check the 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/beta_session_service_search_query.rb b/lib/zitadel/client/models/beta_session_service_search_query.rb new file mode 100644 index 00000000..fce2694e --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_search_query.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaSessionServiceSearchQuery + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CreationDateQuery', + :'IdsQuery', + :'UserIdQuery' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_session_service_session.rb b/lib/zitadel/client/models/beta_session_service_session.rb new file mode 100644 index 00000000..e726cf59 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_session.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 BetaSessionServiceSession + attr_accessor :id + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :creation_date + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + attr_accessor :sequence + + attr_accessor :factors + + attr_accessor :metadata + + attr_accessor :user_agent + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'factors' => :'BetaSessionServiceFactors', + :'metadata' => :'Hash', + :'user_agent' => :'BetaSessionServiceUserAgent', + :'expiration_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceSession` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceSession`. Please check the 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/beta_session_service_session_field_name.rb b/lib/zitadel/client/models/beta_session_service_session_field_name.rb new file mode 100644 index 00000000..44f37ca9 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceSessionFieldName + 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 BetaSessionServiceSessionFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSessionServiceSessionFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/beta_session_service_set_session_request.rb b/lib/zitadel/client/models/beta_session_service_set_session_request.rb new file mode 100644 index 00000000..11562761 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_set_session_request.rb @@ -0,0 +1,278 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaSessionServiceSetSessionRequest + attr_accessor :session_id + + attr_accessor :session_token + + attr_accessor :checks + + attr_accessor :metadata + + attr_accessor :challenges + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :lifetime + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session_id' => :'sessionId', + :'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_id' => :'String', + :'session_token' => :'String', + :'checks' => :'BetaSessionServiceChecks', + :'metadata' => :'Hash', + :'challenges' => :'BetaSessionServiceRequestChallenges', + :'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::BetaSessionServiceSetSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceSetSessionRequest`. Please check the 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 + + 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + 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_id, 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/beta_session_service_set_session_response.rb b/lib/zitadel/client/models/beta_session_service_set_session_response.rb new file mode 100644 index 00000000..0cd77199 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_set_session_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 BetaSessionServiceSetSessionResponse + attr_accessor :details + + 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' => :'BetaSessionServiceDetails', + :'session_token' => :'String', + :'challenges' => :'BetaSessionServiceChallenges' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceSetSessionResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceSetSessionResponse`. Please check the 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/beta_session_service_t_o_t_p_factor.rb b/lib/zitadel/client/models/beta_session_service_t_o_t_p_factor.rb new file mode 100644 index 00000000..3fcf2f50 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceTOTPFactor + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaSessionServiceTOTPFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceTOTPFactor`. Please check the 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/beta_session_service_user_agent.rb b/lib/zitadel/client/models/beta_session_service_user_agent.rb new file mode 100644 index 00000000..faac798f --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_user_agent.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 BetaSessionServiceUserAgent + 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([ + :'fingerprint_id', + :'ip', + :'description', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceUserAgent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceUserAgent`. Please check the 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/beta_session_service_user_factor.rb b/lib/zitadel/client/models/beta_session_service_user_factor.rb new file mode 100644 index 00000000..04134735 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_user_factor.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 BetaSessionServiceUserFactor + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :verified_at + + attr_accessor :id + + attr_accessor :login_name + + attr_accessor :display_name + + 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::BetaSessionServiceUserFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceUserFactor`. Please check the 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/beta_session_service_user_verification_requirement.rb b/lib/zitadel/client/models/beta_session_service_user_verification_requirement.rb new file mode 100644 index 00000000..0d346f9f --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceUserVerificationRequirement + 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 BetaSessionServiceUserVerificationRequirement.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSessionServiceUserVerificationRequirement" + end + end + +end diff --git a/lib/zitadel/client/models/beta_session_service_value.rb b/lib/zitadel/client/models/beta_session_service_value.rb new file mode 100644 index 00000000..fb75c32e --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_value.rb @@ -0,0 +1,114 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +# `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. +module BetaSessionServiceValue + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Array', + :'Boolean', + :'Float', + :'Hash', + :'String' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_session_service_web_auth_n.rb b/lib/zitadel/client/models/beta_session_service_web_auth_n.rb new file mode 100644 index 00000000..9d158385 --- /dev/null +++ b/lib/zitadel/client/models/beta_session_service_web_auth_n.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 BetaSessionServiceWebAuthN + 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' => :'BetaSessionServiceUserVerificationRequirement' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSessionServiceWebAuthN` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceWebAuthN`. Please check the 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 = 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 @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 [String] 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 [BetaSessionServiceUserVerificationRequirement] 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/beta_session_service_web_auth_n_factor.rb b/lib/zitadel/client/models/beta_session_service_web_auth_n_factor.rb new file mode 100644 index 00000000..41536188 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSessionServiceWebAuthNFactor + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaSessionServiceWebAuthNFactor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSessionServiceWebAuthNFactor`. Please check the 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/beta_settings_service_any.rb b/lib/zitadel/client/models/beta_settings_service_any.rb new file mode 100644 index 00000000..21bb01c3 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaSettingsServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaSettingsServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_branding_settings.rb b/lib/zitadel/client/models/beta_settings_service_branding_settings.rb new file mode 100644 index 00000000..bdf27c88 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_branding_settings.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 BetaSettingsServiceBrandingSettings + attr_accessor :light_theme + + attr_accessor :dark_theme + + 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 + + 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' => :'BetaSettingsServiceTheme', + :'dark_theme' => :'BetaSettingsServiceTheme', + :'font_url' => :'String', + :'hide_login_name_suffix' => :'Boolean', + :'disable_watermark' => :'Boolean', + :'resource_owner_type' => :'BetaSettingsServiceResourceOwnerType', + :'theme_mode' => :'BetaSettingsServiceThemeMode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceBrandingSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceBrandingSettings`. Please check the 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'] + end + + if attributes.key?(:'theme_mode') + self.theme_mode = attributes[:'theme_mode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_settings_service_connect_error.rb b/lib/zitadel/client/models/beta_settings_service_connect_error.rb new file mode 100644 index 00000000..bc50358a --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaSettingsServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaSettingsServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_details.rb b/lib/zitadel/client/models/beta_settings_service_details.rb new file mode 100644 index 00000000..ea3ac5fa --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_details.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 BetaSettingsServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceDetails`. Please check the 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/beta_settings_service_domain_settings.rb b/lib/zitadel/client/models/beta_settings_service_domain_settings.rb new file mode 100644 index 00000000..e9534f2e --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_domain_settings.rb @@ -0,0 +1,279 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaSettingsServiceDomainSettings + attr_accessor :login_name_includes_domain + + attr_accessor :require_org_domain_verification + + 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' => :'BetaSettingsServiceResourceOwnerType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceDomainSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceDomainSettings`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_settings_service_embedded_iframe_settings.rb b/lib/zitadel/client/models/beta_settings_service_embedded_iframe_settings.rb new file mode 100644 index 00000000..48784730 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_embedded_iframe_settings.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 BetaSettingsServiceEmbeddedIframeSettings + attr_accessor :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::BetaSettingsServiceEmbeddedIframeSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceEmbeddedIframeSettings`. Please check the 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/beta_settings_service_get_active_identity_providers_request.rb b/lib/zitadel/client/models/beta_settings_service_get_active_identity_providers_request.rb new file mode 100644 index 00000000..20341bed --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_active_identity_providers_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 BetaSettingsServiceGetActiveIdentityProvidersRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetActiveIdentityProvidersRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetActiveIdentityProvidersRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_active_identity_providers_response.rb b/lib/zitadel/client/models/beta_settings_service_get_active_identity_providers_response.rb new file mode 100644 index 00000000..02207eee --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetActiveIdentityProvidersResponse + 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' => :'BetaSettingsServiceListDetails', + :'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::BetaSettingsServiceGetActiveIdentityProvidersResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetActiveIdentityProvidersResponse`. Please check the 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/beta_settings_service_get_branding_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_get_branding_settings_request.rb new file mode 100644 index 00000000..a6269ea2 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_branding_settings_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 BetaSettingsServiceGetBrandingSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetBrandingSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetBrandingSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_branding_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_branding_settings_response.rb new file mode 100644 index 00000000..a1aa9715 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetBrandingSettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServiceBrandingSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetBrandingSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetBrandingSettingsResponse`. Please check the 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/beta_settings_service_get_domain_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_get_domain_settings_request.rb new file mode 100644 index 00000000..7a97a061 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_domain_settings_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 BetaSettingsServiceGetDomainSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetDomainSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetDomainSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_domain_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_domain_settings_response.rb new file mode 100644 index 00000000..2f7970f9 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetDomainSettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServiceDomainSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetDomainSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetDomainSettingsResponse`. Please check the 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/beta_settings_service_get_general_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_general_settings_response.rb new file mode 100644 index 00000000..bcf782c7 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_general_settings_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 BetaSettingsServiceGetGeneralSettingsResponse + attr_accessor :default_org_id + + 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::BetaSettingsServiceGetGeneralSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetGeneralSettingsResponse`. Please check the 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/beta_settings_service_get_legal_and_support_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_get_legal_and_support_settings_request.rb new file mode 100644 index 00000000..12c3fbf7 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_legal_and_support_settings_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 BetaSettingsServiceGetLegalAndSupportSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetLegalAndSupportSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetLegalAndSupportSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_legal_and_support_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_legal_and_support_settings_response.rb new file mode 100644 index 00000000..7b9cc95f --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetLegalAndSupportSettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServiceLegalAndSupportSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetLegalAndSupportSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetLegalAndSupportSettingsResponse`. Please check the 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/beta_settings_service_get_lockout_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_get_lockout_settings_request.rb new file mode 100644 index 00000000..d579d34b --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_lockout_settings_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 BetaSettingsServiceGetLockoutSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetLockoutSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetLockoutSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_lockout_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_lockout_settings_response.rb new file mode 100644 index 00000000..4256fcc6 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetLockoutSettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServiceLockoutSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetLockoutSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetLockoutSettingsResponse`. Please check the 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/beta_settings_service_get_login_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_get_login_settings_request.rb new file mode 100644 index 00000000..c67e6118 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_login_settings_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 BetaSettingsServiceGetLoginSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetLoginSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetLoginSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_login_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_login_settings_response.rb new file mode 100644 index 00000000..c8614cfd --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetLoginSettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServiceLoginSettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetLoginSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetLoginSettingsResponse`. Please check the 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/beta_settings_service_get_password_complexity_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_get_password_complexity_settings_request.rb new file mode 100644 index 00000000..a818ee50 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_password_complexity_settings_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 BetaSettingsServiceGetPasswordComplexitySettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordComplexitySettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordComplexitySettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_password_complexity_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_password_complexity_settings_response.rb new file mode 100644 index 00000000..7e5c53fe --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetPasswordComplexitySettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServicePasswordComplexitySettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordComplexitySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordComplexitySettingsResponse`. Please check the 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/beta_settings_service_get_password_expiry_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_get_password_expiry_settings_request.rb new file mode 100644 index 00000000..78240089 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_get_password_expiry_settings_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 BetaSettingsServiceGetPasswordExpirySettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'BetaSettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordExpirySettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordExpirySettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_get_password_expiry_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_password_expiry_settings_response.rb new file mode 100644 index 00000000..33392641 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetPasswordExpirySettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServicePasswordExpirySettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordExpirySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetPasswordExpirySettingsResponse`. Please check the 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/beta_settings_service_get_security_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_get_security_settings_response.rb new file mode 100644 index 00000000..d168b597 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceGetSecuritySettingsResponse + 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' => :'BetaSettingsServiceDetails', + :'settings' => :'BetaSettingsServiceSecuritySettings' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceGetSecuritySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceGetSecuritySettingsResponse`. Please check the 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/beta_settings_service_identity_provider.rb b/lib/zitadel/client/models/beta_settings_service_identity_provider.rb new file mode 100644 index 00000000..8c8c3caf --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_identity_provider.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 BetaSettingsServiceIdentityProvider + attr_accessor :id + + attr_accessor :name + + 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 + { + :'id' => :'id', + :'name' => :'name', + :'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 + { + :'id' => :'String', + :'name' => :'String', + :'type' => :'BetaSettingsServiceIdentityProviderType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceIdentityProvider` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceIdentityProvider`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_identity_provider_type.rb b/lib/zitadel/client/models/beta_settings_service_identity_provider_type.rb new file mode 100644 index 00000000..61b225c3 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_identity_provider_type.rb @@ -0,0 +1,51 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaSettingsServiceIdentityProviderType + 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 + + 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].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 BetaSettingsServiceIdentityProviderType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSettingsServiceIdentityProviderType" + end + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_legal_and_support_settings.rb b/lib/zitadel/client/models/beta_settings_service_legal_and_support_settings.rb new file mode 100644 index 00000000..4dd53ca8 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_legal_and_support_settings.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 BetaSettingsServiceLegalAndSupportSettings + attr_accessor :tos_link + + attr_accessor :privacy_policy_link + + attr_accessor :help_link + + attr_accessor :support_email + + attr_accessor :resource_owner_type + + attr_accessor :docs_link + + attr_accessor :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' => :'BetaSettingsServiceResourceOwnerType', + :'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::BetaSettingsServiceLegalAndSupportSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceLegalAndSupportSettings`. Please check the 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'] + 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/beta_settings_service_list_details.rb b/lib/zitadel/client/models/beta_settings_service_list_details.rb new file mode 100644 index 00000000..abdccd4e --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_list_details.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 BetaSettingsServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'processed_sequence' => :'Object', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'processed_sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceListDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceListDetails`. Please check the 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/beta_settings_service_lockout_settings.rb b/lib/zitadel/client/models/beta_settings_service_lockout_settings.rb new file mode 100644 index 00000000..a8d1adcd --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_lockout_settings.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 BetaSettingsServiceLockoutSettings + attr_accessor :max_password_attempts + + attr_accessor :resource_owner_type + + 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' => :'Object', + :'resource_owner_type' => :'BetaSettingsServiceResourceOwnerType', + :'max_otp_attempts' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'max_password_attempts', + :'max_otp_attempts' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceLockoutSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceLockoutSettings`. Please check the 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'] + 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/beta_settings_service_login_settings.rb b/lib/zitadel/client/models/beta_settings_service_login_settings.rb new file mode 100644 index 00000000..ef586907 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_login_settings.rb @@ -0,0 +1,433 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaSettingsServiceLoginSettings + attr_accessor :allow_username_password + + attr_accessor :allow_register + + attr_accessor :allow_external_idp + + attr_accessor :force_mfa + + attr_accessor :passkeys_type + + attr_accessor :hide_password_reset + + attr_accessor :ignore_unknown_usernames + + attr_accessor :default_redirect_uri + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :password_check_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :external_login_check_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :mfa_init_skip_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :second_factor_check_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + 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 + + attr_accessor :disable_login_with_email + + attr_accessor :disable_login_with_phone + + attr_accessor :resource_owner_type + + 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' => :'BetaSettingsServicePasskeysType', + :'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' => :'BetaSettingsServiceResourceOwnerType', + :'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::BetaSettingsServiceLoginSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceLoginSettings`. Please check the 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'] + 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'] + 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/beta_settings_service_multi_factor_type.rb b/lib/zitadel/client/models/beta_settings_service_multi_factor_type.rb new file mode 100644 index 00000000..3ee9884c --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceMultiFactorType + 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 BetaSettingsServiceMultiFactorType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSettingsServiceMultiFactorType" + end + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_passkeys_type.rb b/lib/zitadel/client/models/beta_settings_service_passkeys_type.rb new file mode 100644 index 00000000..3e80c008 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServicePasskeysType + 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 BetaSettingsServicePasskeysType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSettingsServicePasskeysType" + end + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_password_complexity_settings.rb b/lib/zitadel/client/models/beta_settings_service_password_complexity_settings.rb new file mode 100644 index 00000000..a00506bb --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_password_complexity_settings.rb @@ -0,0 +1,298 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaSettingsServicePasswordComplexitySettings + attr_accessor :min_length + + attr_accessor :requires_uppercase + + attr_accessor :requires_lowercase + + attr_accessor :requires_number + + 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' => :'Object', + :'requires_uppercase' => :'Boolean', + :'requires_lowercase' => :'Boolean', + :'requires_number' => :'Boolean', + :'requires_symbol' => :'Boolean', + :'resource_owner_type' => :'BetaSettingsServiceResourceOwnerType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'min_length', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServicePasswordComplexitySettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServicePasswordComplexitySettings`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_settings_service_password_expiry_settings.rb b/lib/zitadel/client/models/beta_settings_service_password_expiry_settings.rb new file mode 100644 index 00000000..a8ba07e5 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServicePasswordExpirySettings + # 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' => :'Object', + :'expire_warn_days' => :'Object', + :'resource_owner_type' => :'BetaSettingsServiceResourceOwnerType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'max_age_days', + :'expire_warn_days', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServicePasswordExpirySettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServicePasswordExpirySettings`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_settings_service_request_context.rb b/lib/zitadel/client/models/beta_settings_service_request_context.rb new file mode 100644 index 00000000..b8dc8eac --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_request_context.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaSettingsServiceRequestContext + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Instance', + :'OrgId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_resource_owner_type.rb b/lib/zitadel/client/models/beta_settings_service_resource_owner_type.rb new file mode 100644 index 00000000..e8a2c0a8 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceResourceOwnerType + 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 BetaSettingsServiceResourceOwnerType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSettingsServiceResourceOwnerType" + end + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_second_factor_type.rb b/lib/zitadel/client/models/beta_settings_service_second_factor_type.rb new file mode 100644 index 00000000..9a27c168 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceSecondFactorType + 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 BetaSettingsServiceSecondFactorType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSettingsServiceSecondFactorType" + end + end + +end diff --git a/lib/zitadel/client/models/beta_settings_service_security_settings.rb b/lib/zitadel/client/models/beta_settings_service_security_settings.rb new file mode 100644 index 00000000..0ea61936 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_security_settings.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 BetaSettingsServiceSecuritySettings + attr_accessor :embedded_iframe + + 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' => :'BetaSettingsServiceEmbeddedIframeSettings', + :'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::BetaSettingsServiceSecuritySettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceSecuritySettings`. Please check the 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/beta_settings_service_set_security_settings_request.rb b/lib/zitadel/client/models/beta_settings_service_set_security_settings_request.rb new file mode 100644 index 00000000..7852a108 --- /dev/null +++ b/lib/zitadel/client/models/beta_settings_service_set_security_settings_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 BetaSettingsServiceSetSecuritySettingsRequest + attr_accessor :embedded_iframe + + 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' => :'BetaSettingsServiceEmbeddedIframeSettings', + :'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::BetaSettingsServiceSetSecuritySettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceSetSecuritySettingsRequest`. Please check the 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/beta_settings_service_set_security_settings_response.rb b/lib/zitadel/client/models/beta_settings_service_set_security_settings_response.rb new file mode 100644 index 00000000..77cb5cb9 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceSetSecuritySettingsResponse + 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' => :'BetaSettingsServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaSettingsServiceSetSecuritySettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceSetSecuritySettingsResponse`. Please check the 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/beta_settings_service_theme.rb b/lib/zitadel/client/models/beta_settings_service_theme.rb new file mode 100644 index 00000000..c500d119 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceTheme + # hex value for primary color + attr_accessor :primary_color + + # hex value for background color + attr_accessor :background_color + + # hex value for warning color + attr_accessor :warn_color + + # hex value for font color + attr_accessor :font_color + + # url where the logo is served + attr_accessor :logo_url + + # url where the icon is served + 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::BetaSettingsServiceTheme` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaSettingsServiceTheme`. Please check the 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/beta_settings_service_theme_mode.rb b/lib/zitadel/client/models/beta_settings_service_theme_mode.rb new file mode 100644 index 00000000..3479273e --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaSettingsServiceThemeMode + 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 BetaSettingsServiceThemeMode.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaSettingsServiceThemeMode" + end + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_add_human_user_request.rb b/lib/zitadel/client/models/beta_user_service_add_human_user_request.rb new file mode 100644 index 00000000..a0fbe657 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_add_human_user_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceAddHumanUserRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'HashedPassword1', + :'Password1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_add_human_user_response.rb b/lib/zitadel/client/models/beta_user_service_add_human_user_response.rb new file mode 100644 index 00000000..9eb3ec2e --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_add_human_user_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 BetaUserServiceAddHumanUserResponse + 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' => :'BetaUserServiceDetails', + :'email_code' => :'String', + :'phone_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'email_code', + :'phone_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceAddHumanUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAddHumanUserResponse`. Please check the 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/beta_user_service_add_i_d_p_link_request.rb b/lib/zitadel/client/models/beta_user_service_add_i_d_p_link_request.rb new file mode 100644 index 00000000..4d261d89 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_add_i_d_p_link_request.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceAddIDPLinkRequest + attr_accessor :user_id + + attr_accessor :idp_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'idp_link' => :'BetaUserServiceIDPLink' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceAddIDPLinkRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAddIDPLinkRequest`. Please check the 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'] + else + self.user_id = nil + end + + 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 + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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/beta_user_service_add_i_d_p_link_response.rb b/lib/zitadel/client/models/beta_user_service_add_i_d_p_link_response.rb new file mode 100644 index 00000000..1d5785fb --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceAddIDPLinkResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceAddIDPLinkResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAddIDPLinkResponse`. Please check the 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/beta_user_service_add_o_t_p_email_request.rb b/lib/zitadel/client/models/beta_user_service_add_o_t_p_email_request.rb new file mode 100644 index 00000000..19273b24 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_add_o_t_p_email_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceAddOTPEmailRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceAddOTPEmailRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAddOTPEmailRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_add_o_t_p_email_response.rb b/lib/zitadel/client/models/beta_user_service_add_o_t_p_email_response.rb new file mode 100644 index 00000000..466c38bd --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceAddOTPEmailResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceAddOTPEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAddOTPEmailResponse`. Please check the 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/beta_user_service_add_o_t_p_s_m_s_request.rb b/lib/zitadel/client/models/beta_user_service_add_o_t_p_s_m_s_request.rb new file mode 100644 index 00000000..8c8ec44b --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_add_o_t_p_s_m_s_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceAddOTPSMSRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceAddOTPSMSRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAddOTPSMSRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_add_o_t_p_s_m_s_response.rb b/lib/zitadel/client/models/beta_user_service_add_o_t_p_s_m_s_response.rb new file mode 100644 index 00000000..b2c10e12 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceAddOTPSMSResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceAddOTPSMSResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAddOTPSMSResponse`. Please check the 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/beta_user_service_any.rb b/lib/zitadel/client/models/beta_user_service_any.rb new file mode 100644 index 00000000..af76861b --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaUserServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaUserServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_authentication_method_type.rb b/lib/zitadel/client/models/beta_user_service_authentication_method_type.rb new file mode 100644 index 00000000..b72c16a4 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceAuthenticationMethodType + 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 BetaUserServiceAuthenticationMethodType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaUserServiceAuthenticationMethodType" + end + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_connect_error.rb b/lib/zitadel/client/models/beta_user_service_connect_error.rb new file mode 100644 index 00000000..5492573b --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaUserServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaUserServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_create_passkey_registration_link_request.rb b/lib/zitadel/client/models/beta_user_service_create_passkey_registration_link_request.rb new file mode 100644 index 00000000..ff8a3ac0 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_create_passkey_registration_link_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceCreatePasskeyRegistrationLinkRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode9', + :'SendLink2' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_create_passkey_registration_link_response.rb b/lib/zitadel/client/models/beta_user_service_create_passkey_registration_link_response.rb new file mode 100644 index 00000000..e307a941 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceCreatePasskeyRegistrationLinkResponse + 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' => :'BetaUserServiceDetails', + :'code' => :'BetaUserServicePasskeyRegistrationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceCreatePasskeyRegistrationLinkResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceCreatePasskeyRegistrationLinkResponse`. Please check the 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/beta_user_service_deactivate_user_request.rb b/lib/zitadel/client/models/beta_user_service_deactivate_user_request.rb new file mode 100644 index 00000000..8e00d2b3 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_deactivate_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceDeactivateUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceDeactivateUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceDeactivateUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_deactivate_user_response.rb b/lib/zitadel/client/models/beta_user_service_deactivate_user_response.rb new file mode 100644 index 00000000..7c862eb3 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceDeactivateUserResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceDeactivateUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceDeactivateUserResponse`. Please check the 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/beta_user_service_delete_user_request.rb b/lib/zitadel/client/models/beta_user_service_delete_user_request.rb new file mode 100644 index 00000000..fb7c1577 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_delete_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceDeleteUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceDeleteUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceDeleteUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_delete_user_response.rb b/lib/zitadel/client/models/beta_user_service_delete_user_response.rb new file mode 100644 index 00000000..d514e78f --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceDeleteUserResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceDeleteUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceDeleteUserResponse`. Please check the 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/beta_user_service_details.rb b/lib/zitadel/client/models/beta_user_service_details.rb new file mode 100644 index 00000000..e88fd437 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_details.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 BetaUserServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceDetails`. Please check the 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/beta_user_service_gender.rb b/lib/zitadel/client/models/beta_user_service_gender.rb new file mode 100644 index 00000000..12d755e4 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceGender + 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 BetaUserServiceGender.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaUserServiceGender" + end + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_get_user_by_i_d_request.rb b/lib/zitadel/client/models/beta_user_service_get_user_by_i_d_request.rb new file mode 100644 index 00000000..9d0590ef --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_get_user_by_i_d_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceGetUserByIDRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceGetUserByIDRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceGetUserByIDRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_get_user_by_i_d_response.rb b/lib/zitadel/client/models/beta_user_service_get_user_by_i_d_response.rb new file mode 100644 index 00000000..2d1b693c --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceGetUserByIDResponse + 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' => :'BetaUserServiceDetails', + :'user' => :'BetaUserServiceUser' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceGetUserByIDResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceGetUserByIDResponse`. Please check the 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/beta_user_service_hashed_password.rb b/lib/zitadel/client/models/beta_user_service_hashed_password.rb new file mode 100644 index 00000000..36731de6 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_hashed_password.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceHashedPassword + 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::BetaUserServiceHashedPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceHashedPassword`. Please check the 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] hash Value to be assigned + def hash=(hash) + if hash.nil? + fail ArgumentError, 'hash cannot be nil' + 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/beta_user_service_i_d_p_link.rb b/lib/zitadel/client/models/beta_user_service_i_d_p_link.rb new file mode 100644 index 00000000..483ef2df --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_i_d_p_link.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 BetaUserServiceIDPLink + attr_accessor :idp_id + + attr_accessor :user_id + + 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::BetaUserServiceIDPLink` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceIDPLink`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_user_service_idp_information.rb b/lib/zitadel/client/models/beta_user_service_idp_information.rb new file mode 100644 index 00000000..7f31e98d --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_idp_information.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceIDPInformation + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Ldap4', + :'Oauth2', + :'Saml2' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_list_authentication_method_types_request.rb b/lib/zitadel/client/models/beta_user_service_list_authentication_method_types_request.rb new file mode 100644 index 00000000..871c3e00 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_list_authentication_method_types_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceListAuthenticationMethodTypesRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceListAuthenticationMethodTypesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceListAuthenticationMethodTypesRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_list_authentication_method_types_response.rb b/lib/zitadel/client/models/beta_user_service_list_authentication_method_types_response.rb new file mode 100644 index 00000000..762ff1bd --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceListAuthenticationMethodTypesResponse + 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' => :'BetaUserServiceListDetails', + :'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::BetaUserServiceListAuthenticationMethodTypesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceListAuthenticationMethodTypesResponse`. Please check the 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/beta_user_service_list_details.rb b/lib/zitadel/client/models/beta_user_service_list_details.rb new file mode 100644 index 00000000..6b85ff18 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_list_details.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 BetaUserServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'processed_sequence' => :'Object', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'processed_sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceListDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceListDetails`. Please check the 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/beta_user_service_list_query.rb b/lib/zitadel/client/models/beta_user_service_list_query.rb new file mode 100644 index 00000000..59e2e88d --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_list_query.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 BetaUserServiceListQuery + attr_accessor :offset + + attr_accessor :limit + + 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' => :'Object', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'offset', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceListQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceListQuery`. Please check the 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/beta_user_service_list_users_request.rb b/lib/zitadel/client/models/beta_user_service_list_users_request.rb new file mode 100644 index 00000000..eb7eedab --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_list_users_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 BetaUserServiceListUsersRequest + attr_accessor :query + + attr_accessor :sorting_column + + # criteria the client is looking for + 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' => :'BetaUserServiceListQuery', + :'sorting_column' => :'BetaUserServiceUserFieldName', + :'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::BetaUserServiceListUsersRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceListUsersRequest`. Please check the 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'] + 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/beta_user_service_list_users_response.rb b/lib/zitadel/client/models/beta_user_service_list_users_response.rb new file mode 100644 index 00000000..8937eec1 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_list_users_response.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 BetaUserServiceListUsersResponse + 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' => :'BetaUserServiceListDetails', + :'sorting_column' => :'BetaUserServiceUserFieldName', + :'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::BetaUserServiceListUsersResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceListUsersResponse`. Please check the 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'] + 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/beta_user_service_lock_user_request.rb b/lib/zitadel/client/models/beta_user_service_lock_user_request.rb new file mode 100644 index 00000000..efc03c2c --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_lock_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceLockUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceLockUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceLockUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_lock_user_response.rb b/lib/zitadel/client/models/beta_user_service_lock_user_response.rb new file mode 100644 index 00000000..199e66d4 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceLockUserResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceLockUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceLockUserResponse`. Please check the 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/beta_user_service_organization.rb b/lib/zitadel/client/models/beta_user_service_organization.rb new file mode 100644 index 00000000..90b612d5 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_organization.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceOrganization + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'OrgDomain', + :'OrgId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_passkey_authenticator.rb b/lib/zitadel/client/models/beta_user_service_passkey_authenticator.rb new file mode 100644 index 00000000..ba1c8b72 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServicePasskeyAuthenticator + 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 BetaUserServicePasskeyAuthenticator.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaUserServicePasskeyAuthenticator" + end + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_passkey_registration_code.rb b/lib/zitadel/client/models/beta_user_service_passkey_registration_code.rb new file mode 100644 index 00000000..87343664 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_passkey_registration_code.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 BetaUserServicePasskeyRegistrationCode + attr_accessor :id + + 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::BetaUserServicePasskeyRegistrationCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServicePasskeyRegistrationCode`. Please check the 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 @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 @id.nil? + return false if @code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [String] 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 && + 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/beta_user_service_password.rb b/lib/zitadel/client/models/beta_user_service_password.rb new file mode 100644 index 00000000..404326ab --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_password.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServicePassword + 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::BetaUserServicePassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServicePassword`. Please check the 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + 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/beta_user_service_password_reset_request.rb b/lib/zitadel/client/models/beta_user_service_password_reset_request.rb new file mode 100644 index 00000000..898079e8 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_password_reset_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServicePasswordResetRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode10', + :'SendLink3' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_password_reset_response.rb b/lib/zitadel/client/models/beta_user_service_password_reset_response.rb new file mode 100644 index 00000000..0fe183ff --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_password_reset_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 BetaUserServicePasswordResetResponse + attr_accessor :details + + # in case the medium was set to return_code, the code will be returned + 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' => :'BetaUserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServicePasswordResetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServicePasswordResetResponse`. Please check the 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/beta_user_service_reactivate_user_request.rb b/lib/zitadel/client/models/beta_user_service_reactivate_user_request.rb new file mode 100644 index 00000000..0ece5207 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_reactivate_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceReactivateUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceReactivateUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceReactivateUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_reactivate_user_response.rb b/lib/zitadel/client/models/beta_user_service_reactivate_user_response.rb new file mode 100644 index 00000000..fa166231 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceReactivateUserResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceReactivateUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceReactivateUserResponse`. Please check the 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/beta_user_service_register_passkey_request.rb b/lib/zitadel/client/models/beta_user_service_register_passkey_request.rb new file mode 100644 index 00000000..545814d7 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_register_passkey_request.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 BetaUserServiceRegisterPasskeyRequest + attr_accessor :user_id + + attr_accessor :code + + attr_accessor :authenticator + + 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 + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'code' => :'BetaUserServicePasskeyRegistrationCode', + :'authenticator' => :'BetaUserServicePasskeyAuthenticator', + :'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::BetaUserServiceRegisterPasskeyRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRegisterPasskeyRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'authenticator') + self.authenticator = attributes[:'authenticator'] + 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 + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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/beta_user_service_register_passkey_response.rb b/lib/zitadel/client/models/beta_user_service_register_passkey_response.rb new file mode 100644 index 00000000..891dca91 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_register_passkey_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 BetaUserServiceRegisterPasskeyResponse + attr_accessor :details + + attr_accessor :passkey_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + 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' => :'BetaUserServiceDetails', + :'passkey_id' => :'String', + :'public_key_credential_creation_options' => :'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::BetaUserServiceRegisterPasskeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRegisterPasskeyResponse`. Please check the 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') + if (value = attributes[:'public_key_credential_creation_options']).is_a?(Hash) + self.public_key_credential_creation_options = 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 && + 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/beta_user_service_register_t_o_t_p_request.rb b/lib/zitadel/client/models/beta_user_service_register_t_o_t_p_request.rb new file mode 100644 index 00000000..fe54c502 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_register_t_o_t_p_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceRegisterTOTPRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceRegisterTOTPRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRegisterTOTPRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_register_t_o_t_p_response.rb b/lib/zitadel/client/models/beta_user_service_register_t_o_t_p_response.rb new file mode 100644 index 00000000..38f318ef --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceRegisterTOTPResponse + 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' => :'BetaUserServiceDetails', + :'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::BetaUserServiceRegisterTOTPResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRegisterTOTPResponse`. Please check the 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/beta_user_service_register_u2_f_request.rb b/lib/zitadel/client/models/beta_user_service_register_u2_f_request.rb new file mode 100644 index 00000000..aaaee5cd --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_register_u2_f_request.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceRegisterU2FRequest + attr_accessor :user_id + + attr_accessor :domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'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::BetaUserServiceRegisterU2FRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRegisterU2FRequest`. Please check the 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'] + else + self.user_id = nil + 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 + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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/beta_user_service_register_u2_f_response.rb b/lib/zitadel/client/models/beta_user_service_register_u2_f_response.rb new file mode 100644 index 00000000..b858d25a --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_register_u2_f_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 BetaUserServiceRegisterU2FResponse + attr_accessor :details + + attr_accessor :u2f_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + 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' => :'BetaUserServiceDetails', + :'u2f_id' => :'String', + :'public_key_credential_creation_options' => :'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::BetaUserServiceRegisterU2FResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRegisterU2FResponse`. Please check the 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') + if (value = attributes[:'public_key_credential_creation_options']).is_a?(Hash) + self.public_key_credential_creation_options = 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 && + 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/beta_user_service_remove_o_t_p_email_request.rb b/lib/zitadel/client/models/beta_user_service_remove_o_t_p_email_request.rb new file mode 100644 index 00000000..3423abd7 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_remove_o_t_p_email_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceRemoveOTPEmailRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceRemoveOTPEmailRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemoveOTPEmailRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_remove_o_t_p_email_response.rb b/lib/zitadel/client/models/beta_user_service_remove_o_t_p_email_response.rb new file mode 100644 index 00000000..0c8b2757 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceRemoveOTPEmailResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceRemoveOTPEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemoveOTPEmailResponse`. Please check the 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/beta_user_service_remove_o_t_p_s_m_s_request.rb b/lib/zitadel/client/models/beta_user_service_remove_o_t_p_s_m_s_request.rb new file mode 100644 index 00000000..471897c0 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_remove_o_t_p_s_m_s_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceRemoveOTPSMSRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceRemoveOTPSMSRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemoveOTPSMSRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_remove_o_t_p_s_m_s_response.rb b/lib/zitadel/client/models/beta_user_service_remove_o_t_p_s_m_s_response.rb new file mode 100644 index 00000000..12ecd647 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceRemoveOTPSMSResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceRemoveOTPSMSResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemoveOTPSMSResponse`. Please check the 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/beta_user_service_remove_phone_request.rb b/lib/zitadel/client/models/beta_user_service_remove_phone_request.rb new file mode 100644 index 00000000..61ba1dca --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_remove_phone_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceRemovePhoneRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceRemovePhoneRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemovePhoneRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_remove_phone_response.rb b/lib/zitadel/client/models/beta_user_service_remove_phone_response.rb new file mode 100644 index 00000000..18cc3324 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceRemovePhoneResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceRemovePhoneResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemovePhoneResponse`. Please check the 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/beta_user_service_remove_t_o_t_p_request.rb b/lib/zitadel/client/models/beta_user_service_remove_t_o_t_p_request.rb new file mode 100644 index 00000000..b1ec870e --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_remove_t_o_t_p_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceRemoveTOTPRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceRemoveTOTPRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemoveTOTPRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_remove_t_o_t_p_response.rb b/lib/zitadel/client/models/beta_user_service_remove_t_o_t_p_response.rb new file mode 100644 index 00000000..c96e4a60 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceRemoveTOTPResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceRemoveTOTPResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRemoveTOTPResponse`. Please check the 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/beta_user_service_resend_email_code_request.rb b/lib/zitadel/client/models/beta_user_service_resend_email_code_request.rb new file mode 100644 index 00000000..b6b35bf0 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_resend_email_code_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceResendEmailCodeRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode7', + :'SendCode5' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_resend_email_code_response.rb b/lib/zitadel/client/models/beta_user_service_resend_email_code_response.rb new file mode 100644 index 00000000..9ba2ce02 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_resend_email_code_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 BetaUserServiceResendEmailCodeResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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' => :'BetaUserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceResendEmailCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceResendEmailCodeResponse`. Please check the 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/beta_user_service_resend_phone_code_request.rb b/lib/zitadel/client/models/beta_user_service_resend_phone_code_request.rb new file mode 100644 index 00000000..10fe4468 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_resend_phone_code_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceResendPhoneCodeRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode8', + :'SendCode6' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_resend_phone_code_response.rb b/lib/zitadel/client/models/beta_user_service_resend_phone_code_response.rb new file mode 100644 index 00000000..efbbd739 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_resend_phone_code_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 BetaUserServiceResendPhoneCodeResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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' => :'BetaUserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceResendPhoneCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceResendPhoneCodeResponse`. Please check the 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/beta_user_service_retrieve_identity_provider_intent_request.rb b/lib/zitadel/client/models/beta_user_service_retrieve_identity_provider_intent_request.rb new file mode 100644 index 00000000..98bcdf59 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_retrieve_identity_provider_intent_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 BetaUserServiceRetrieveIdentityProviderIntentRequest + attr_accessor :idp_intent_id + + 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::BetaUserServiceRetrieveIdentityProviderIntentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRetrieveIdentityProviderIntentRequest`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/beta_user_service_retrieve_identity_provider_intent_response.rb b/lib/zitadel/client/models/beta_user_service_retrieve_identity_provider_intent_response.rb new file mode 100644 index 00000000..bfd6a290 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_retrieve_identity_provider_intent_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 BetaUserServiceRetrieveIdentityProviderIntentResponse + attr_accessor :details + + attr_accessor :idp_information + + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'details' => :'details', + :'idp_information' => :'idpInformation', + :'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 + { + :'details' => :'BetaUserServiceDetails', + :'idp_information' => :'BetaUserServiceIDPInformation', + :'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::BetaUserServiceRetrieveIdentityProviderIntentResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceRetrieveIdentityProviderIntentResponse`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_search_query.rb b/lib/zitadel/client/models/beta_user_service_search_query.rb new file mode 100644 index 00000000..084b22a2 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_search_query.rb @@ -0,0 +1,124 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceSearchQuery + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AndQuery1', + :'DisplayNameQuery1', + :'EmailQuery1', + :'FirstNameQuery1', + :'InUserEmailsQuery1', + :'InUserIdsQuery1', + :'LastNameQuery1', + :'LoginNameQuery1', + :'NickNameQuery1', + :'NotQuery1', + :'OrQuery1', + :'OrganizationIdQuery1', + :'PhoneQuery1', + :'StateQuery2', + :'TypeQuery1', + :'UserNameQuery1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_set_email_request.rb b/lib/zitadel/client/models/beta_user_service_set_email_request.rb new file mode 100644 index 00000000..9a11827f --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_email_request.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceSetEmailRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode7', + :'SendCode5' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_set_email_response.rb b/lib/zitadel/client/models/beta_user_service_set_email_response.rb new file mode 100644 index 00000000..e5b1f75c --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_email_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 BetaUserServiceSetEmailResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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' => :'BetaUserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceSetEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceSetEmailResponse`. Please check the 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/beta_user_service_set_human_email.rb b/lib/zitadel/client/models/beta_user_service_set_human_email.rb new file mode 100644 index 00000000..27c0952f --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_human_email.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceSetHumanEmail + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode7', + :'SendCode5' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_set_human_phone.rb b/lib/zitadel/client/models/beta_user_service_set_human_phone.rb new file mode 100644 index 00000000..587cc45a --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_human_phone.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceSetHumanPhone + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode8', + :'SendCode6' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_set_human_profile.rb b/lib/zitadel/client/models/beta_user_service_set_human_profile.rb new file mode 100644 index 00000000..d913962d --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_human_profile.rb @@ -0,0 +1,334 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceSetHumanProfile + 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' => :'BetaUserServiceGender' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'nick_name', + :'display_name', + :'preferred_language', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceSetHumanProfile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceSetHumanProfile`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return 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 @family_name.nil? + invalid_properties.push('invalid value for "family_name", family_name 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 @given_name.nil? + return false if @family_name.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] given_name Value to be assigned + def given_name=(given_name) + if given_name.nil? + fail ArgumentError, 'given_name cannot be nil' + end + + @given_name = given_name + end + + # Custom attribute writer method with validation + # @param [String] family_name Value to be assigned + def family_name=(family_name) + if family_name.nil? + fail ArgumentError, 'family_name cannot be nil' + end + + @family_name = family_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 && + 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/beta_user_service_set_metadata_entry.rb b/lib/zitadel/client/models/beta_user_service_set_metadata_entry.rb new file mode 100644 index 00000000..7389fd78 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_metadata_entry.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 BetaUserServiceSetMetadataEntry + attr_accessor :key + + 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::BetaUserServiceSetMetadataEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceSetMetadataEntry`. Please check the 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 @value.nil? + invalid_properties.push('invalid value for "value", value 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 @key.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] key Value to be assigned + def key=(key) + if key.nil? + fail ArgumentError, 'key cannot be nil' + end + + @key = key + end + + # Custom attribute writer method with validation + # @param [String] value Value to be assigned + def value=(value) + if value.nil? + fail ArgumentError, 'value cannot be nil' + 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/beta_user_service_set_password.rb b/lib/zitadel/client/models/beta_user_service_set_password.rb new file mode 100644 index 00000000..dedf38d9 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_password.rb @@ -0,0 +1,325 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceSetPassword + attr_accessor :hashed_password + + attr_accessor :password + + attr_accessor :current_password + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'hashed_password' => :'hashedPassword', + :'password' => :'password', + :'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 + { + :'hashed_password' => :'BetaUserServiceHashedPassword', + :'password' => :'BetaUserServicePassword', + :'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::BetaUserServiceSetPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceSetPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'hashed_password') + self.hashed_password = attributes[:'hashed_password'] + else + self.hashed_password = nil + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + else + self.password = nil + 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 @hashed_password.nil? + invalid_properties.push('invalid value for "hashed_password", hashed_password cannot be nil.') + end + + if @password.nil? + invalid_properties.push('invalid value for "password", password cannot be nil.') + end + + if @current_password.nil? + invalid_properties.push('invalid value for "current_password", current_password cannot be nil.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_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 @hashed_password.nil? + return false if @password.nil? + return false if @current_password.nil? + return false if @verification_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceHashedPassword] hashed_password Value to be assigned + def hashed_password=(hashed_password) + if hashed_password.nil? + fail ArgumentError, 'hashed_password cannot be nil' + end + + @hashed_password = hashed_password + end + + # Custom attribute writer method with validation + # @param [BetaUserServicePassword] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + end + + @password = password + end + + # Custom attribute writer method with validation + # @param [String] current_password Value to be assigned + def current_password=(current_password) + if current_password.nil? + fail ArgumentError, 'current_password cannot be nil' + end + + @current_password = current_password + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 && + hashed_password == o.hashed_password && + password == o.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 + [hashed_password, 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/beta_user_service_set_password_request.rb b/lib/zitadel/client/models/beta_user_service_set_password_request.rb new file mode 100644 index 00000000..0b94f78d --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_password_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceSetPasswordRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CurrentPassword', + :'VerificationCode' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_set_password_response.rb b/lib/zitadel/client/models/beta_user_service_set_password_response.rb new file mode 100644 index 00000000..3299a9fb --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceSetPasswordResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceSetPasswordResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceSetPasswordResponse`. Please check the 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/beta_user_service_set_phone_request.rb b/lib/zitadel/client/models/beta_user_service_set_phone_request.rb new file mode 100644 index 00000000..a09b5e5c --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_phone_request.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceSetPhoneRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode8', + :'SendCode6' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_set_phone_response.rb b/lib/zitadel/client/models/beta_user_service_set_phone_response.rb new file mode 100644 index 00000000..c9f3ddcf --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_set_phone_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 BetaUserServiceSetPhoneResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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' => :'BetaUserServiceDetails', + :'verification_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceSetPhoneResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceSetPhoneResponse`. Please check the 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/beta_user_service_start_identity_provider_intent_request.rb b/lib/zitadel/client/models/beta_user_service_start_identity_provider_intent_request.rb new file mode 100644 index 00000000..f3a65afb --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_start_identity_provider_intent_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceStartIdentityProviderIntentRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Ldap3', + :'Urls1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_start_identity_provider_intent_response.rb b/lib/zitadel/client/models/beta_user_service_start_identity_provider_intent_response.rb new file mode 100644 index 00000000..3ff2662b --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_start_identity_provider_intent_response.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceStartIdentityProviderIntentResponse + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AuthUrl', + :'IdpIntent1', + :'PostForm' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_unlock_user_request.rb b/lib/zitadel/client/models/beta_user_service_unlock_user_request.rb new file mode 100644 index 00000000..ecf40913 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_unlock_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaUserServiceUnlockUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::BetaUserServiceUnlockUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceUnlockUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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/beta_user_service_unlock_user_response.rb b/lib/zitadel/client/models/beta_user_service_unlock_user_response.rb new file mode 100644 index 00000000..384f9c54 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceUnlockUserResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceUnlockUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceUnlockUserResponse`. Please check the 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/beta_user_service_update_human_user_request.rb b/lib/zitadel/client/models/beta_user_service_update_human_user_request.rb new file mode 100644 index 00000000..31aa9b85 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_update_human_user_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 BetaUserServiceUpdateHumanUserRequest + attr_accessor :user_id + + 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 + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'username' => :'String', + :'profile' => :'BetaUserServiceSetHumanProfile', + :'email' => :'BetaUserServiceSetHumanEmail', + :'phone' => :'BetaUserServiceSetHumanPhone', + :'password' => :'BetaUserServiceSetPassword' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'username', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceUpdateHumanUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceUpdateHumanUserRequest`. Please check the 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?(:'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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + 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 + [user_id, 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/beta_user_service_update_human_user_response.rb b/lib/zitadel/client/models/beta_user_service_update_human_user_response.rb new file mode 100644 index 00000000..ae2f7d23 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_update_human_user_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 BetaUserServiceUpdateHumanUserResponse + 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' => :'BetaUserServiceDetails', + :'email_code' => :'String', + :'phone_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'email_code', + :'phone_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceUpdateHumanUserResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceUpdateHumanUserResponse`. Please check the 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/beta_user_service_user.rb b/lib/zitadel/client/models/beta_user_service_user.rb new file mode 100644 index 00000000..bea7458b --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_user.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaUserServiceUser + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Human1', + :'Machine' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_user_field_name.rb b/lib/zitadel/client/models/beta_user_service_user_field_name.rb new file mode 100644 index 00000000..143e2a6d --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceUserFieldName + 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 BetaUserServiceUserFieldName.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaUserServiceUserFieldName" + end + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_user_state.rb b/lib/zitadel/client/models/beta_user_service_user_state.rb new file mode 100644 index 00000000..d5f54256 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceUserState + 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 BetaUserServiceUserState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaUserServiceUserState" + end + end + +end diff --git a/lib/zitadel/client/models/beta_user_service_value.rb b/lib/zitadel/client/models/beta_user_service_value.rb new file mode 100644 index 00000000..83a06e7a --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_value.rb @@ -0,0 +1,114 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +# `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. +module BetaUserServiceValue + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Array', + :'Boolean', + :'Float', + :'Hash', + :'String' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_user_service_verify_email_request.rb b/lib/zitadel/client/models/beta_user_service_verify_email_request.rb new file mode 100644 index 00000000..689efc7c --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_verify_email_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 BetaUserServiceVerifyEmailRequest + attr_accessor :user_id + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'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::BetaUserServiceVerifyEmailRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyEmailRequest`. Please check the 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'] + else + self.user_id = 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_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 @user_id.nil? + return false if @verification_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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/beta_user_service_verify_email_response.rb b/lib/zitadel/client/models/beta_user_service_verify_email_response.rb new file mode 100644 index 00000000..97ae7902 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceVerifyEmailResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceVerifyEmailResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyEmailResponse`. Please check the 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/beta_user_service_verify_passkey_registration_request.rb b/lib/zitadel/client/models/beta_user_service_verify_passkey_registration_request.rb new file mode 100644 index 00000000..7d3c54c5 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_verify_passkey_registration_request.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 BetaUserServiceVerifyPasskeyRegistrationRequest + attr_accessor :user_id + + attr_accessor :passkey_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + attr_accessor :public_key_credential + + attr_accessor :passkey_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'passkey_id' => :'passkeyId', + :'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 + { + :'user_id' => :'String', + :'passkey_id' => :'String', + :'public_key_credential' => :'Hash', + :'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::BetaUserServiceVerifyPasskeyRegistrationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyPasskeyRegistrationRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'passkey_id') + self.passkey_id = attributes[:'passkey_id'] + else + self.passkey_id = nil + end + + if attributes.key?(:'public_key_credential') + if (value = attributes[:'public_key_credential']).is_a?(Hash) + self.public_key_credential = value + end + 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @passkey_id.nil? + invalid_properties.push('invalid value for "passkey_id", passkey_id cannot be nil.') + end + + 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 + + invalid_properties + end + + # Check to see if the 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? + return false if @passkey_id.nil? + return false if @public_key_credential.nil? + return false if @passkey_name.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] passkey_id Value to be assigned + def passkey_id=(passkey_id) + if passkey_id.nil? + fail ArgumentError, 'passkey_id cannot be nil' + end + + @passkey_id = passkey_id + end + + # Custom attribute writer method with validation + # @param [Hash] 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 [String] passkey_name Value to be assigned + def passkey_name=(passkey_name) + if passkey_name.nil? + fail ArgumentError, 'passkey_name cannot be nil' + 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 && + user_id == o.user_id && + passkey_id == o.passkey_id && + 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 + [user_id, passkey_id, 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/beta_user_service_verify_passkey_registration_response.rb b/lib/zitadel/client/models/beta_user_service_verify_passkey_registration_response.rb new file mode 100644 index 00000000..6fffa22c --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceVerifyPasskeyRegistrationResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceVerifyPasskeyRegistrationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyPasskeyRegistrationResponse`. Please check the 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/beta_user_service_verify_phone_request.rb b/lib/zitadel/client/models/beta_user_service_verify_phone_request.rb new file mode 100644 index 00000000..248f62d7 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_verify_phone_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 BetaUserServiceVerifyPhoneRequest + attr_accessor :user_id + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'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::BetaUserServiceVerifyPhoneRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyPhoneRequest`. Please check the 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'] + else + self.user_id = 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_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 @user_id.nil? + return false if @verification_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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/beta_user_service_verify_phone_response.rb b/lib/zitadel/client/models/beta_user_service_verify_phone_response.rb new file mode 100644 index 00000000..1b13e2d9 --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceVerifyPhoneResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceVerifyPhoneResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyPhoneResponse`. Please check the 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/beta_user_service_verify_t_o_t_p_registration_request.rb b/lib/zitadel/client/models/beta_user_service_verify_t_o_t_p_registration_request.rb new file mode 100644 index 00000000..5e58943a --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_verify_t_o_t_p_registration_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 BetaUserServiceVerifyTOTPRegistrationRequest + attr_accessor :user_id + + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_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::BetaUserServiceVerifyTOTPRegistrationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyTOTPRegistrationRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + 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 @user_id.nil? + return false if @code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] 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 && + user_id == o.user_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 + [user_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/beta_user_service_verify_t_o_t_p_registration_response.rb b/lib/zitadel/client/models/beta_user_service_verify_t_o_t_p_registration_response.rb new file mode 100644 index 00000000..a7eef4aa --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceVerifyTOTPRegistrationResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceVerifyTOTPRegistrationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyTOTPRegistrationResponse`. Please check the 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/beta_user_service_verify_u2_f_registration_request.rb b/lib/zitadel/client/models/beta_user_service_verify_u2_f_registration_request.rb new file mode 100644 index 00000000..08986145 --- /dev/null +++ b/lib/zitadel/client/models/beta_user_service_verify_u2_f_registration_request.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 BetaUserServiceVerifyU2FRegistrationRequest + attr_accessor :user_id + + attr_accessor :u2f_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + attr_accessor :public_key_credential + + attr_accessor :token_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'u2f_id' => :'u2fId', + :'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 + { + :'user_id' => :'String', + :'u2f_id' => :'String', + :'public_key_credential' => :'Hash', + :'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::BetaUserServiceVerifyU2FRegistrationRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyU2FRegistrationRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'u2f_id') + self.u2f_id = attributes[:'u2f_id'] + else + self.u2f_id = nil + end + + if attributes.key?(:'public_key_credential') + if (value = attributes[:'public_key_credential']).is_a?(Hash) + self.public_key_credential = value + end + 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @u2f_id.nil? + invalid_properties.push('invalid value for "u2f_id", u2f_id cannot be nil.') + end + + 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 + + invalid_properties + end + + # Check to see if the 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? + return false if @u2f_id.nil? + return false if @public_key_credential.nil? + return false if @token_name.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] u2f_id Value to be assigned + def u2f_id=(u2f_id) + if u2f_id.nil? + fail ArgumentError, 'u2f_id cannot be nil' + end + + @u2f_id = u2f_id + end + + # Custom attribute writer method with validation + # @param [Hash] 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 [String] token_name Value to be assigned + def token_name=(token_name) + if token_name.nil? + fail ArgumentError, 'token_name cannot be nil' + 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 && + user_id == o.user_id && + u2f_id == o.u2f_id && + 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 + [user_id, u2f_id, 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/beta_user_service_verify_u2_f_registration_response.rb b/lib/zitadel/client/models/beta_user_service_verify_u2_f_registration_response.rb new file mode 100644 index 00000000..307c3b7c --- /dev/null +++ b/lib/zitadel/client/models/beta_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 BetaUserServiceVerifyU2FRegistrationResponse + 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' => :'BetaUserServiceDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaUserServiceVerifyU2FRegistrationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaUserServiceVerifyU2FRegistrationResponse`. Please check the 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/beta_web_key_service_activate_web_key_request.rb b/lib/zitadel/client/models/beta_web_key_service_activate_web_key_request.rb new file mode 100644 index 00000000..93840472 --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_activate_web_key_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaWebKeyServiceActivateWebKeyRequest + 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::BetaWebKeyServiceActivateWebKeyRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceActivateWebKeyRequest`. Please check the 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + 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/beta_web_key_service_activate_web_key_response.rb b/lib/zitadel/client/models/beta_web_key_service_activate_web_key_response.rb new file mode 100644 index 00000000..85effa3a --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_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 BetaWebKeyServiceActivateWebKeyResponse + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaWebKeyServiceActivateWebKeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceActivateWebKeyResponse`. Please check the 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/beta_web_key_service_any.rb b/lib/zitadel/client/models/beta_web_key_service_any.rb new file mode 100644 index 00000000..ffce64a2 --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class BetaWebKeyServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::BetaWebKeyServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_web_key_service_connect_error.rb b/lib/zitadel/client/models/beta_web_key_service_connect_error.rb new file mode 100644 index 00000000..56b41032 --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class BetaWebKeyServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'BetaWebKeyServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::BetaWebKeyServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/beta_web_key_service_create_web_key_request.rb b/lib/zitadel/client/models/beta_web_key_service_create_web_key_request.rb new file mode 100644 index 00000000..e4c2e849 --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_create_web_key_request.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaWebKeyServiceCreateWebKeyRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Ecdsa', + :'Ed25519', + :'Rsa' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/beta_web_key_service_create_web_key_response.rb b/lib/zitadel/client/models/beta_web_key_service_create_web_key_response.rb new file mode 100644 index 00000000..6534231a --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_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 BetaWebKeyServiceCreateWebKeyResponse + # The unique identifier of the newly created key. + attr_accessor :id + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaWebKeyServiceCreateWebKeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceCreateWebKeyResponse`. Please check the 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/beta_web_key_service_delete_web_key_request.rb b/lib/zitadel/client/models/beta_web_key_service_delete_web_key_request.rb new file mode 100644 index 00000000..769c5fce --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_delete_web_key_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class BetaWebKeyServiceDeleteWebKeyRequest + 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::BetaWebKeyServiceDeleteWebKeyRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceDeleteWebKeyRequest`. Please check the 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + 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/beta_web_key_service_delete_web_key_response.rb b/lib/zitadel/client/models/beta_web_key_service_delete_web_key_response.rb new file mode 100644 index 00000000..04cc954b --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_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 BetaWebKeyServiceDeleteWebKeyResponse + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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::BetaWebKeyServiceDeleteWebKeyResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceDeleteWebKeyResponse`. Please check the 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/beta_web_key_service_list_web_keys_response.rb b/lib/zitadel/client/models/beta_web_key_service_list_web_keys_response.rb new file mode 100644 index 00000000..896b601e --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_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 BetaWebKeyServiceListWebKeysResponse + 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::BetaWebKeyServiceListWebKeysResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::BetaWebKeyServiceListWebKeysResponse`. Please check the 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/beta_web_key_service_state.rb b/lib/zitadel/client/models/beta_web_key_service_state.rb new file mode 100644 index 00000000..537d6007 --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_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 BetaWebKeyServiceState + 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 BetaWebKeyServiceState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::BetaWebKeyServiceState" + end + end + +end diff --git a/lib/zitadel/client/models/beta_web_key_service_web_key.rb b/lib/zitadel/client/models/beta_web_key_service_web_key.rb new file mode 100644 index 00000000..aef20f0c --- /dev/null +++ b/lib/zitadel/client/models/beta_web_key_service_web_key.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module BetaWebKeyServiceWebKey + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Ecdsa', + :'Ed25519', + :'Rsa' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/creation_date_query.rb b/lib/zitadel/client/models/creation_date_query.rb new file mode 100644 index 00000000..a852962d --- /dev/null +++ b/lib/zitadel/client/models/creation_date_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class CreationDateQuery + attr_accessor :creation_date_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'creation_date_query' => :'creationDateQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaSessionServiceCreationDateQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::CreationDateQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::CreationDateQuery`. Please check the 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_query') + self.creation_date_query = attributes[:'creation_date_query'] + else + self.creation_date_query = 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 @creation_date_query.nil? + invalid_properties.push('invalid value for "creation_date_query", creation_date_query 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 @creation_date_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaSessionServiceCreationDateQuery] creation_date_query Value to be assigned + def creation_date_query=(creation_date_query) + if creation_date_query.nil? + fail ArgumentError, 'creation_date_query cannot be nil' + end + + @creation_date_query = creation_date_query + end + + # 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_query == o.creation_date_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 + [creation_date_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/creation_date_query1.rb b/lib/zitadel/client/models/creation_date_query1.rb new file mode 100644 index 00000000..a87a67ca --- /dev/null +++ b/lib/zitadel/client/models/creation_date_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class CreationDateQuery1 + attr_accessor :creation_date_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'creation_date_query' => :'creationDateQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'SessionServiceCreationDateQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::CreationDateQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::CreationDateQuery1`. Please check the 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_query') + self.creation_date_query = attributes[:'creation_date_query'] + else + self.creation_date_query = 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 @creation_date_query.nil? + invalid_properties.push('invalid value for "creation_date_query", creation_date_query 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 @creation_date_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [SessionServiceCreationDateQuery] creation_date_query Value to be assigned + def creation_date_query=(creation_date_query) + if creation_date_query.nil? + fail ArgumentError, 'creation_date_query cannot be nil' + end + + @creation_date_query = creation_date_query + end + + # 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_query == o.creation_date_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 + [creation_date_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/creator_query.rb b/lib/zitadel/client/models/creator_query.rb new file mode 100644 index 00000000..7ab1d7ca --- /dev/null +++ b/lib/zitadel/client/models/creator_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class CreatorQuery + attr_accessor :creator_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'creator_query' => :'creatorQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'creator_query' => :'SessionServiceCreatorQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::CreatorQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::CreatorQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'creator_query') + self.creator_query = attributes[:'creator_query'] + else + self.creator_query = 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 @creator_query.nil? + invalid_properties.push('invalid value for "creator_query", creator_query 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 @creator_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [SessionServiceCreatorQuery] creator_query Value to be assigned + def creator_query=(creator_query) + if creator_query.nil? + fail ArgumentError, 'creator_query cannot be nil' + end + + @creator_query = creator_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + creator_query == o.creator_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 + [creator_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/current_password.rb b/lib/zitadel/client/models/current_password.rb new file mode 100644 index 00000000..a543330e --- /dev/null +++ b/lib/zitadel/client/models/current_password.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class CurrentPassword + attr_accessor :current_password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'current_password' => :'currentPassword' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'current_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::CurrentPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::CurrentPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'current_password') + self.current_password = attributes[:'current_password'] + else + self.current_password = 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] current_password Value to be assigned + def current_password=(current_password) + if current_password.nil? + fail ArgumentError, 'current_password cannot be nil' + end + + @current_password = current_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 && + current_password == o.current_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 + [current_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/default_query.rb b/lib/zitadel/client/models/default_query.rb new file mode 100644 index 00000000..368b95d9 --- /dev/null +++ b/lib/zitadel/client/models/default_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class DefaultQuery + attr_accessor :default_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'default_query' => :'OrganizationServiceDefaultOrganizationQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::DefaultQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::DefaultQuery`. Please check the 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_query') + self.default_query = attributes[:'default_query'] + else + self.default_query = 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 @default_query.nil? + invalid_properties.push('invalid value for "default_query", default_query 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 @default_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [OrganizationServiceDefaultOrganizationQuery] default_query Value to be assigned + def default_query=(default_query) + if default_query.nil? + fail ArgumentError, 'default_query cannot be nil' + end + + @default_query = default_query + end + + # 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_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 + [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/deny.rb b/lib/zitadel/client/models/deny.rb new file mode 100644 index 00000000..1443b006 --- /dev/null +++ b/lib/zitadel/client/models/deny.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Deny + attr_accessor :deny + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'deny' => :'OIDCServiceDeny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Deny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Deny`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deny') + self.deny = attributes[:'deny'] + else + self.deny = 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 @deny.nil? + invalid_properties.push('invalid value for "deny", deny 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 @deny.nil? + true + end + + # Custom attribute writer method with validation + # @param [OIDCServiceDeny] deny Value to be assigned + def deny=(deny) + if deny.nil? + fail ArgumentError, 'deny cannot be nil' + end + + @deny = deny + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/display_name_query.rb b/lib/zitadel/client/models/display_name_query.rb new file mode 100644 index 00000000..9ef09738 --- /dev/null +++ b/lib/zitadel/client/models/display_name_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class DisplayNameQuery + attr_accessor :display_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'display_name_query' => :'displayNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceDisplayNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::DisplayNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::DisplayNameQuery`. Please check the 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_query') + self.display_name_query = attributes[:'display_name_query'] + else + self.display_name_query = 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 @display_name_query.nil? + invalid_properties.push('invalid value for "display_name_query", display_name_query 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 @display_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceDisplayNameQuery] display_name_query Value to be assigned + def display_name_query=(display_name_query) + if display_name_query.nil? + fail ArgumentError, 'display_name_query cannot be nil' + end + + @display_name_query = display_name_query + end + + # 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_query == o.display_name_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 + [display_name_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/display_name_query1.rb b/lib/zitadel/client/models/display_name_query1.rb new file mode 100644 index 00000000..160db224 --- /dev/null +++ b/lib/zitadel/client/models/display_name_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class DisplayNameQuery1 + attr_accessor :display_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'display_name_query' => :'displayNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceDisplayNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::DisplayNameQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::DisplayNameQuery1`. Please check the 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_query') + self.display_name_query = attributes[:'display_name_query'] + else + self.display_name_query = 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 @display_name_query.nil? + invalid_properties.push('invalid value for "display_name_query", display_name_query 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 @display_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceDisplayNameQuery] display_name_query Value to be assigned + def display_name_query=(display_name_query) + if display_name_query.nil? + fail ArgumentError, 'display_name_query cannot be nil' + end + + @display_name_query = display_name_query + end + + # 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_query == o.display_name_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 + [display_name_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/domain_query.rb b/lib/zitadel/client/models/domain_query.rb new file mode 100644 index 00000000..dfc77a72 --- /dev/null +++ b/lib/zitadel/client/models/domain_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class DomainQuery + attr_accessor :domain_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain_query' => :'domainQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'OrganizationServiceOrganizationDomainQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::DomainQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::DomainQuery`. Please check the 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_query') + self.domain_query = attributes[:'domain_query'] + else + self.domain_query = 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 @domain_query.nil? + invalid_properties.push('invalid value for "domain_query", domain_query 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_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [OrganizationServiceOrganizationDomainQuery] domain_query Value to be assigned + def domain_query=(domain_query) + if domain_query.nil? + fail ArgumentError, 'domain_query cannot be nil' + end + + @domain_query = domain_query + end + + # 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_query == o.domain_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 + [domain_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/ecdsa.rb b/lib/zitadel/client/models/ecdsa.rb new file mode 100644 index 00000000..97dc10c9 --- /dev/null +++ b/lib/zitadel/client/models/ecdsa.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Ecdsa + attr_accessor :ecdsa + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ecdsa' => :'ecdsa' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ecdsa' => :'BetaWebKeyServiceECDSA' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Ecdsa` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Ecdsa`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ecdsa') + self.ecdsa = attributes[:'ecdsa'] + else + self.ecdsa = 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 @ecdsa.nil? + invalid_properties.push('invalid value for "ecdsa", ecdsa 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 @ecdsa.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaWebKeyServiceECDSA] ecdsa Value to be assigned + def ecdsa=(ecdsa) + if ecdsa.nil? + fail ArgumentError, 'ecdsa cannot be nil' + end + + @ecdsa = ecdsa + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ecdsa == o.ecdsa + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ecdsa].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/ed25519.rb b/lib/zitadel/client/models/ed25519.rb new file mode 100644 index 00000000..c31e7ad2 --- /dev/null +++ b/lib/zitadel/client/models/ed25519.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Ed25519 + attr_accessor :ed25519 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'ed25519' => :'BetaWebKeyServiceED25519' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Ed25519` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Ed25519`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ed25519') + self.ed25519 = attributes[:'ed25519'] + else + self.ed25519 = 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 @ed25519.nil? + invalid_properties.push('invalid value for "ed25519", ed25519 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 @ed25519.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaWebKeyServiceED25519] ed25519 Value to be assigned + def ed25519=(ed25519) + if ed25519.nil? + fail ArgumentError, 'ed25519 cannot be nil' + end + + @ed25519 = ed25519 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/email_query.rb b/lib/zitadel/client/models/email_query.rb new file mode 100644 index 00000000..421b1f20 --- /dev/null +++ b/lib/zitadel/client/models/email_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class EmailQuery + attr_accessor :email_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email_query' => :'emailQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceEmailQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::EmailQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::EmailQuery`. Please check the 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_query') + self.email_query = attributes[:'email_query'] + else + self.email_query = 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 @email_query.nil? + invalid_properties.push('invalid value for "email_query", email_query 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 @email_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceEmailQuery] email_query Value to be assigned + def email_query=(email_query) + if email_query.nil? + fail ArgumentError, 'email_query cannot be nil' + end + + @email_query = email_query + end + + # 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_query == o.email_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 + [email_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/email_query1.rb b/lib/zitadel/client/models/email_query1.rb new file mode 100644 index 00000000..e7ea1ed6 --- /dev/null +++ b/lib/zitadel/client/models/email_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class EmailQuery1 + attr_accessor :email_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email_query' => :'emailQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceEmailQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::EmailQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::EmailQuery1`. Please check the 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_query') + self.email_query = attributes[:'email_query'] + else + self.email_query = 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 @email_query.nil? + invalid_properties.push('invalid value for "email_query", email_query 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 @email_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceEmailQuery] email_query Value to be assigned + def email_query=(email_query) + if email_query.nil? + fail ArgumentError, 'email_query cannot be nil' + end + + @email_query = email_query + end + + # 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_query == o.email_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 + [email_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/error.rb b/lib/zitadel/client/models/error.rb new file mode 100644 index 00000000..9d8429aa --- /dev/null +++ b/lib/zitadel/client/models/error.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Error + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::Error` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Error`. Please check the 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 = 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 @error.nil? + invalid_properties.push('invalid value for "error", error 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 @error.nil? + true + end + + # Custom attribute writer method with validation + # @param [OIDCServiceAuthorizationError] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/error1.rb b/lib/zitadel/client/models/error1.rb new file mode 100644 index 00000000..d09f2723 --- /dev/null +++ b/lib/zitadel/client/models/error1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Error1 + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::Error1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Error1`. Please check the 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 = 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 @error.nil? + invalid_properties.push('invalid value for "error", error 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 @error.nil? + true + end + + # Custom attribute writer method with validation + # @param [SAMLServiceAuthorizationError] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/error2.rb b/lib/zitadel/client/models/error2.rb new file mode 100644 index 00000000..42149fa7 --- /dev/null +++ b/lib/zitadel/client/models/error2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Error2 + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'error' => :'BetaOIDCServiceAuthorizationError' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Error2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Error2`. Please check the 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 = 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 @error.nil? + invalid_properties.push('invalid value for "error", error 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 @error.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaOIDCServiceAuthorizationError] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/event.rb b/lib/zitadel/client/models/event.rb new file mode 100644 index 00000000..777a8ef2 --- /dev/null +++ b/lib/zitadel/client/models/event.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Event + attr_accessor :event + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'event' => :'BetaActionServiceEventExecution' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Event` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Event`. Please check the 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'] + else + self.event = 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 @event.nil? + invalid_properties.push('invalid value for "event", event 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 @event.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceEventExecution] event Value to be assigned + def event=(event) + if event.nil? + fail ArgumentError, 'event cannot be nil' + end + + @event = event + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/execution_type_filter.rb b/lib/zitadel/client/models/execution_type_filter.rb new file mode 100644 index 00000000..3cea3054 --- /dev/null +++ b/lib/zitadel/client/models/execution_type_filter.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ExecutionTypeFilter + attr_accessor :execution_type_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'execution_type_filter' => :'executionTypeFilter' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_type_filter' => :'BetaActionServiceExecutionTypeFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ExecutionTypeFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ExecutionTypeFilter`. Please check the 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_type_filter') + self.execution_type_filter = attributes[:'execution_type_filter'] + else + self.execution_type_filter = 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 @execution_type_filter.nil? + invalid_properties.push('invalid value for "execution_type_filter", execution_type_filter 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 @execution_type_filter.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceExecutionTypeFilter] execution_type_filter Value to be assigned + def execution_type_filter=(execution_type_filter) + if execution_type_filter.nil? + fail ArgumentError, 'execution_type_filter cannot be nil' + end + + @execution_type_filter = execution_type_filter + end + + # 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_type_filter == o.execution_type_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 + [execution_type_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/feature_service_any.rb b/lib/zitadel/client/models/feature_service_any.rb new file mode 100644 index 00000000..71dfcab6 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class FeatureServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::FeatureServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_connect_error.rb b/lib/zitadel/client/models/feature_service_connect_error.rb new file mode 100644 index 00000000..f4845aed --- /dev/null +++ b/lib/zitadel/client/models/feature_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class FeatureServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'FeatureServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FeatureServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..a5fc4744 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_details.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 FeatureServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..d6ba6279 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_feature_flag.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 + # FeatureFlag is a simple boolean Feature setting, without further payload. + class FeatureServiceFeatureFlag + 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_request.rb b/lib/zitadel/client/models/feature_service_get_instance_features_request.rb new file mode 100644 index 00000000..0a810b2b --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_instance_features_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 FeatureServiceGetInstanceFeaturesRequest + attr_accessor :inheritance + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'inheritance' => :'inheritance' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'inheritance' => :'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::FeatureServiceGetInstanceFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetInstanceFeaturesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'inheritance') + self.inheritance = attributes[:'inheritance'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + inheritance == o.inheritance + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [inheritance].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..44a7f246 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_instance_features_response.rb @@ -0,0 +1,356 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 :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', + :'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', + :'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?(:'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 && + 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, 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_request.rb b/lib/zitadel/client/models/feature_service_get_organization_features_request.rb new file mode 100644 index 00000000..f47bbcc7 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_organization_features_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 FeatureServiceGetOrganizationFeaturesRequest + attr_accessor :organization_id + + attr_accessor :inheritance + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'inheritance' => :'inheritance' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'inheritance' => :'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::FeatureServiceGetOrganizationFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetOrganizationFeaturesRequest`. Please check the 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'] + end + + if attributes.key?(:'inheritance') + self.inheritance = attributes[:'inheritance'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + inheritance == o.inheritance + end + + # @see the `==` method + # @param [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, inheritance].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..399d5204 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_system_features_response.rb @@ -0,0 +1,329 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 :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', + :'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', + :'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?(:'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 && + 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, 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_request.rb b/lib/zitadel/client/models/feature_service_get_user_features_request.rb new file mode 100644 index 00000000..e59e2eea --- /dev/null +++ b/lib/zitadel/client/models/feature_service_get_user_features_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 FeatureServiceGetUserFeaturesRequest + attr_accessor :user_id + + attr_accessor :inheritance + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'inheritance' => :'inheritance' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'inheritance' => :'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::FeatureServiceGetUserFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceGetUserFeaturesRequest`. Please check the 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?(:'inheritance') + self.inheritance = attributes[:'inheritance'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + inheritance == o.inheritance + end + + # @see the `==` method + # @param [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, inheritance].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..970d351a --- /dev/null +++ b/lib/zitadel/client/models/feature_service_improved_performance_feature_flag.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 FeatureServiceImprovedPerformanceFeatureFlag + 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..b3b0886c --- /dev/null +++ b/lib/zitadel/client/models/feature_service_login_v2.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 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([ + :'base_uri' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..75d019f6 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_login_v2_feature_flag.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 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([ + :'base_uri', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_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_request.rb b/lib/zitadel/client/models/feature_service_reset_organization_features_request.rb new file mode 100644 index 00000000..30531482 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_reset_organization_features_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 FeatureServiceResetOrganizationFeaturesRequest + 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::FeatureServiceResetOrganizationFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetOrganizationFeaturesRequest`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/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_request.rb b/lib/zitadel/client/models/feature_service_reset_user_features_request.rb new file mode 100644 index 00000000..bdd47a04 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_reset_user_features_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 FeatureServiceResetUserFeaturesRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::FeatureServiceResetUserFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceResetUserFeaturesRequest`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_set_instance_features_request.rb b/lib/zitadel/client/models/feature_service_set_instance_features_request.rb new file mode 100644 index 00000000..cff42312 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_instance_features_request.rb @@ -0,0 +1,361 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + 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 :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 + { + :'login_default_org' => :'loginDefaultOrg', + :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', + :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', + :'user_schema' => :'userSchema', + :'oidc_token_exchange' => :'oidcTokenExchange', + :'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', + :'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([ + :'login_default_org', + :'oidc_trigger_introspection_projections', + :'oidc_legacy_introspection', + :'user_schema', + :'oidc_token_exchange', + :'web_key', + :'debug_oidc_parent_error', + :'oidc_single_v1_session_termination', + :'disable_user_token_event', + :'enable_back_channel_logout', + :'permission_check_v2', + :'console_use_v2_user_api' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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?(:'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 && + 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, 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_request.rb b/lib/zitadel/client/models/feature_service_set_organization_features_request.rb new file mode 100644 index 00000000..63a7b545 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_organization_features_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 FeatureServiceSetOrganizationFeaturesRequest + 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::FeatureServiceSetOrganizationFeaturesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetOrganizationFeaturesRequest`. Please check the 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/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..2f407c9c --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_system_features_request.rb @@ -0,0 +1,331 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + 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 :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 + { + :'login_default_org' => :'loginDefaultOrg', + :'oidc_trigger_introspection_projections' => :'oidcTriggerIntrospectionProjections', + :'oidc_legacy_introspection' => :'oidcLegacyIntrospection', + :'user_schema' => :'userSchema', + :'oidc_token_exchange' => :'oidcTokenExchange', + :'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', + :'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([ + :'login_default_org', + :'oidc_trigger_introspection_projections', + :'oidc_legacy_introspection', + :'user_schema', + :'oidc_token_exchange', + :'oidc_single_v1_session_termination', + :'disable_user_token_event', + :'enable_back_channel_logout', + :'permission_check_v2' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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?(:'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 && + 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, 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_feature_request.rb b/lib/zitadel/client/models/feature_service_set_user_feature_request.rb new file mode 100644 index 00000000..98260078 --- /dev/null +++ b/lib/zitadel/client/models/feature_service_set_user_feature_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 FeatureServiceSetUserFeatureRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::FeatureServiceSetUserFeatureRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FeatureServiceSetUserFeatureRequest`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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/first_name_query.rb b/lib/zitadel/client/models/first_name_query.rb new file mode 100644 index 00000000..03d82df2 --- /dev/null +++ b/lib/zitadel/client/models/first_name_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FirstNameQuery + attr_accessor :first_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name_query' => :'firstNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceFirstNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FirstNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FirstNameQuery`. Please check the 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_query') + self.first_name_query = attributes[:'first_name_query'] + else + self.first_name_query = 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 @first_name_query.nil? + invalid_properties.push('invalid value for "first_name_query", first_name_query 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 @first_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceFirstNameQuery] first_name_query Value to be assigned + def first_name_query=(first_name_query) + if first_name_query.nil? + fail ArgumentError, 'first_name_query cannot be nil' + end + + @first_name_query = first_name_query + end + + # 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_query == o.first_name_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 + [first_name_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/first_name_query1.rb b/lib/zitadel/client/models/first_name_query1.rb new file mode 100644 index 00000000..e4920c71 --- /dev/null +++ b/lib/zitadel/client/models/first_name_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class FirstNameQuery1 + attr_accessor :first_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name_query' => :'firstNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceFirstNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::FirstNameQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::FirstNameQuery1`. Please check the 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_query') + self.first_name_query = attributes[:'first_name_query'] + else + self.first_name_query = 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 @first_name_query.nil? + invalid_properties.push('invalid value for "first_name_query", first_name_query 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 @first_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceFirstNameQuery] first_name_query Value to be assigned + def first_name_query=(first_name_query) + if first_name_query.nil? + fail ArgumentError, 'first_name_query cannot be nil' + end + + @first_name_query = first_name_query + end + + # 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_query == o.first_name_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 + [first_name_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/function.rb b/lib/zitadel/client/models/function.rb new file mode 100644 index 00000000..8bb48f98 --- /dev/null +++ b/lib/zitadel/client/models/function.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Function + attr_accessor :function + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'function' => :'function' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'function' => :'BetaActionServiceFunctionExecution' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Function` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Function`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'function') + self.function = attributes[:'function'] + else + self.function = 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 @function.nil? + invalid_properties.push('invalid value for "function", function 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 @function.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceFunctionExecution] function Value to be assigned + def function=(function) + if function.nil? + fail ArgumentError, 'function cannot be nil' + end + + @function = function + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + function == o.function + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [function].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/github.rb b/lib/zitadel/client/models/github.rb new file mode 100644 index 00000000..4e58735f --- /dev/null +++ b/lib/zitadel/client/models/github.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Github + attr_accessor :github + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'github' => :'github' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'github' => :'IdentityProviderServiceGitHubConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Github` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Github`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'github') + self.github = attributes[:'github'] + else + self.github = 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 @github.nil? + invalid_properties.push('invalid value for "github", github 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 @github.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceGitHubConfig] github Value to be assigned + def github=(github) + if github.nil? + fail ArgumentError, 'github cannot be nil' + end + + @github = github + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + github == o.github + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [github].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/github_es.rb b/lib/zitadel/client/models/github_es.rb new file mode 100644 index 00000000..b9b62a6c --- /dev/null +++ b/lib/zitadel/client/models/github_es.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class GithubEs + attr_accessor :github_es + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'github_es' => :'githubEs' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'github_es' => :'IdentityProviderServiceGitHubEnterpriseServerConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::GithubEs` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::GithubEs`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'github_es') + self.github_es = attributes[:'github_es'] + else + self.github_es = 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 @github_es.nil? + invalid_properties.push('invalid value for "github_es", github_es 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 @github_es.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceGitHubEnterpriseServerConfig] github_es Value to be assigned + def github_es=(github_es) + if github_es.nil? + fail ArgumentError, 'github_es cannot be nil' + end + + @github_es = github_es + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + github_es == o.github_es + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [github_es].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/gitlab.rb b/lib/zitadel/client/models/gitlab.rb new file mode 100644 index 00000000..2bd60a64 --- /dev/null +++ b/lib/zitadel/client/models/gitlab.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Gitlab + attr_accessor :gitlab + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'gitlab' => :'gitlab' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'gitlab' => :'IdentityProviderServiceGitLabConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Gitlab` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Gitlab`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'gitlab') + self.gitlab = attributes[:'gitlab'] + else + self.gitlab = 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 @gitlab.nil? + invalid_properties.push('invalid value for "gitlab", gitlab 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 @gitlab.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceGitLabConfig] gitlab Value to be assigned + def gitlab=(gitlab) + if gitlab.nil? + fail ArgumentError, 'gitlab cannot be nil' + end + + @gitlab = gitlab + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + gitlab == o.gitlab + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [gitlab].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/gitlab_self_hosted.rb b/lib/zitadel/client/models/gitlab_self_hosted.rb new file mode 100644 index 00000000..4d2ae8b9 --- /dev/null +++ b/lib/zitadel/client/models/gitlab_self_hosted.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class GitlabSelfHosted + attr_accessor :gitlab_self_hosted + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'gitlab_self_hosted' => :'gitlabSelfHosted' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'gitlab_self_hosted' => :'IdentityProviderServiceGitLabSelfHostedConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::GitlabSelfHosted` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::GitlabSelfHosted`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'gitlab_self_hosted') + self.gitlab_self_hosted = attributes[:'gitlab_self_hosted'] + else + self.gitlab_self_hosted = 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 @gitlab_self_hosted.nil? + invalid_properties.push('invalid value for "gitlab_self_hosted", gitlab_self_hosted 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 @gitlab_self_hosted.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceGitLabSelfHostedConfig] gitlab_self_hosted Value to be assigned + def gitlab_self_hosted=(gitlab_self_hosted) + if gitlab_self_hosted.nil? + fail ArgumentError, 'gitlab_self_hosted cannot be nil' + end + + @gitlab_self_hosted = gitlab_self_hosted + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + gitlab_self_hosted == o.gitlab_self_hosted + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [gitlab_self_hosted].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/google.rb b/lib/zitadel/client/models/google.rb new file mode 100644 index 00000000..a52ad60a --- /dev/null +++ b/lib/zitadel/client/models/google.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Google + attr_accessor :google + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'google' => :'google' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'google' => :'IdentityProviderServiceGoogleConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Google` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Google`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'google') + self.google = attributes[:'google'] + else + self.google = 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 @google.nil? + invalid_properties.push('invalid value for "google", google 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 @google.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceGoogleConfig] google Value to be assigned + def google=(google) + if google.nil? + fail ArgumentError, 'google cannot be nil' + end + + @google = google + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + google == o.google + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [google].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/hashed_password.rb b/lib/zitadel/client/models/hashed_password.rb new file mode 100644 index 00000000..4a5a9ec0 --- /dev/null +++ b/lib/zitadel/client/models/hashed_password.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class HashedPassword + attr_accessor :hashed_password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'hashed_password' => :'hashedPassword' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'hashed_password' => :'UserServiceHashedPassword' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::HashedPassword` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::HashedPassword`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'hashed_password') + self.hashed_password = attributes[:'hashed_password'] + else + self.hashed_password = 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 @hashed_password.nil? + invalid_properties.push('invalid value for "hashed_password", hashed_password 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 @hashed_password.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceHashedPassword] hashed_password Value to be assigned + def hashed_password=(hashed_password) + if hashed_password.nil? + fail ArgumentError, 'hashed_password cannot be nil' + end + + @hashed_password = hashed_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 && + hashed_password == o.hashed_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 + [hashed_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/hashed_password1.rb b/lib/zitadel/client/models/hashed_password1.rb new file mode 100644 index 00000000..c5c05911 --- /dev/null +++ b/lib/zitadel/client/models/hashed_password1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class HashedPassword1 + attr_accessor :hashed_password + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'hashed_password' => :'hashedPassword' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'hashed_password' => :'BetaUserServiceHashedPassword' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::HashedPassword1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::HashedPassword1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'hashed_password') + self.hashed_password = attributes[:'hashed_password'] + else + self.hashed_password = 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 @hashed_password.nil? + invalid_properties.push('invalid value for "hashed_password", hashed_password 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 @hashed_password.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceHashedPassword] hashed_password Value to be assigned + def hashed_password=(hashed_password) + if hashed_password.nil? + fail ArgumentError, 'hashed_password cannot be nil' + end + + @hashed_password = hashed_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 && + hashed_password == o.hashed_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 + [hashed_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/human.rb b/lib/zitadel/client/models/human.rb new file mode 100644 index 00000000..ce978d87 --- /dev/null +++ b/lib/zitadel/client/models/human.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Human + attr_accessor :human + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'human' => :'human' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'human' => :'OrganizationServiceAddHumanUserRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Human` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Human`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'human') + self.human = attributes[:'human'] + else + self.human = 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 @human.nil? + invalid_properties.push('invalid value for "human", human 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 @human.nil? + true + end + + # Custom attribute writer method with validation + # @param [OrganizationServiceAddHumanUserRequest] human Value to be assigned + def human=(human) + if human.nil? + fail ArgumentError, 'human cannot be nil' + end + + @human = human + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + human == o.human + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [human].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/human1.rb b/lib/zitadel/client/models/human1.rb new file mode 100644 index 00000000..50a5f14d --- /dev/null +++ b/lib/zitadel/client/models/human1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Human1 + attr_accessor :human + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'human' => :'human' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'human' => :'BetaUserServiceHumanUser' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Human1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Human1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'human') + self.human = attributes[:'human'] + else + self.human = 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 @human.nil? + invalid_properties.push('invalid value for "human", human 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 @human.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceHumanUser] human Value to be assigned + def human=(human) + if human.nil? + fail ArgumentError, 'human cannot be nil' + end + + @human = human + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + human == o.human + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [human].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/human2.rb b/lib/zitadel/client/models/human2.rb new file mode 100644 index 00000000..9ed2c681 --- /dev/null +++ b/lib/zitadel/client/models/human2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Human2 + attr_accessor :human + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'human' => :'human' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'human' => :'BetaOrganizationServiceAddHumanUserRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Human2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Human2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'human') + self.human = attributes[:'human'] + else + self.human = 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 @human.nil? + invalid_properties.push('invalid value for "human", human 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 @human.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaOrganizationServiceAddHumanUserRequest] human Value to be assigned + def human=(human) + if human.nil? + fail ArgumentError, 'human cannot be nil' + end + + @human = human + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + human == o.human + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [human].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/id_query.rb b/lib/zitadel/client/models/id_query.rb new file mode 100644 index 00000000..8671a52a --- /dev/null +++ b/lib/zitadel/client/models/id_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdQuery + attr_accessor :id_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id_query' => :'idQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'OrganizationServiceOrganizationIDQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdQuery`. Please check the 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_query') + self.id_query = attributes[:'id_query'] + else + self.id_query = 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_query.nil? + invalid_properties.push('invalid value for "id_query", id_query 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 @id_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [OrganizationServiceOrganizationIDQuery] id_query Value to be assigned + def id_query=(id_query) + if id_query.nil? + fail ArgumentError, 'id_query cannot be nil' + end + + @id_query = id_query + end + + # 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_query == o.id_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 + [id_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/identity_provider_service_any.rb b/lib/zitadel/client/models/identity_provider_service_any.rb new file mode 100644 index 00000000..840b3e00 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class IdentityProviderServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::IdentityProviderServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_connect_error.rb b/lib/zitadel/client/models/identity_provider_service_connect_error.rb new file mode 100644 index 00000000..1fbf781a --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class IdentityProviderServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'IdentityProviderServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdentityProviderServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_details.rb b/lib/zitadel/client/models/identity_provider_service_details.rb new file mode 100644 index 00000000..f1198f16 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_details.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 IdentityProviderServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_get_i_d_p_by_i_d_request.rb b/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_request.rb new file mode 100644 index 00000000..fa182f2c --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_get_i_d_p_by_i_d_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 IdentityProviderServiceGetIDPByIDRequest + 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::IdentityProviderServiceGetIDPByIDRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdentityProviderServiceGetIDPByIDRequest`. Please check the 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/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_i_d_p.rb b/lib/zitadel/client/models/identity_provider_service_i_d_p.rb new file mode 100644 index 00000000..3bb95de2 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_i_d_p.rb @@ -0,0 +1,298 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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_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_idp_config.rb b/lib/zitadel/client/models/identity_provider_service_idp_config.rb new file mode 100644 index 00000000..7ad4af43 --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_idp_config.rb @@ -0,0 +1,120 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module IdentityProviderServiceIDPConfig + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Apple', + :'AzureAd', + :'Github', + :'GithubEs', + :'Gitlab', + :'GitlabSelfHosted', + :'Google', + :'Jwt', + :'Ldap', + :'Oauth', + :'Oidc', + :'Saml' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..4014783f --- /dev/null +++ b/lib/zitadel/client/models/identity_provider_service_options.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 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/idp_intent.rb b/lib/zitadel/client/models/idp_intent.rb new file mode 100644 index 00000000..a5e7ed11 --- /dev/null +++ b/lib/zitadel/client/models/idp_intent.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdpIntent + attr_accessor :idp_intent + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_intent' => :'idpIntent' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'UserServiceIDPIntent' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdpIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdpIntent`. Please check the 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') + self.idp_intent = attributes[:'idp_intent'] + else + self.idp_intent = 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 @idp_intent.nil? + invalid_properties.push('invalid value for "idp_intent", idp_intent 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 @idp_intent.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceIDPIntent] idp_intent Value to be assigned + def idp_intent=(idp_intent) + if idp_intent.nil? + fail ArgumentError, 'idp_intent cannot be nil' + end + + @idp_intent = idp_intent + end + + # 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 == o.idp_intent + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/idp_intent1.rb b/lib/zitadel/client/models/idp_intent1.rb new file mode 100644 index 00000000..6db06873 --- /dev/null +++ b/lib/zitadel/client/models/idp_intent1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdpIntent1 + attr_accessor :idp_intent + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'idp_intent' => :'idpIntent' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaUserServiceIDPIntent' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdpIntent1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdpIntent1`. Please check the 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') + self.idp_intent = attributes[:'idp_intent'] + else + self.idp_intent = 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 @idp_intent.nil? + invalid_properties.push('invalid value for "idp_intent", idp_intent 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 @idp_intent.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceIDPIntent] idp_intent Value to be assigned + def idp_intent=(idp_intent) + if idp_intent.nil? + fail ArgumentError, 'idp_intent cannot be nil' + end + + @idp_intent = idp_intent + end + + # 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 == o.idp_intent + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/ids_query.rb b/lib/zitadel/client/models/ids_query.rb new file mode 100644 index 00000000..a48d03bc --- /dev/null +++ b/lib/zitadel/client/models/ids_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdsQuery + attr_accessor :ids_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids_query' => :'idsQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaSessionServiceIDsQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdsQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdsQuery`. Please check the 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'] + else + self.ids_query = 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 @ids_query.nil? + invalid_properties.push('invalid value for "ids_query", ids_query 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 @ids_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaSessionServiceIDsQuery] ids_query Value to be assigned + def ids_query=(ids_query) + if ids_query.nil? + fail ArgumentError, 'ids_query cannot be nil' + end + + @ids_query = ids_query + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/ids_query1.rb b/lib/zitadel/client/models/ids_query1.rb new file mode 100644 index 00000000..b60c9afd --- /dev/null +++ b/lib/zitadel/client/models/ids_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IdsQuery1 + attr_accessor :ids_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids_query' => :'idsQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::IdsQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IdsQuery1`. Please check the 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'] + else + self.ids_query = 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 @ids_query.nil? + invalid_properties.push('invalid value for "ids_query", ids_query 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 @ids_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [SessionServiceIDsQuery] ids_query Value to be assigned + def ids_query=(ids_query) + if ids_query.nil? + fail ArgumentError, 'ids_query cannot be nil' + end + + @ids_query = ids_query + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/in_conditions_filter.rb b/lib/zitadel/client/models/in_conditions_filter.rb new file mode 100644 index 00000000..1a52f2a6 --- /dev/null +++ b/lib/zitadel/client/models/in_conditions_filter.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class InConditionsFilter + attr_accessor :in_conditions_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'in_conditions_filter' => :'inConditionsFilter' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'in_conditions_filter' => :'BetaActionServiceInConditionsFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::InConditionsFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::InConditionsFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'in_conditions_filter') + self.in_conditions_filter = attributes[:'in_conditions_filter'] + else + self.in_conditions_filter = 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 @in_conditions_filter.nil? + invalid_properties.push('invalid value for "in_conditions_filter", in_conditions_filter 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 @in_conditions_filter.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceInConditionsFilter] in_conditions_filter Value to be assigned + def in_conditions_filter=(in_conditions_filter) + if in_conditions_filter.nil? + fail ArgumentError, 'in_conditions_filter cannot be nil' + end + + @in_conditions_filter = in_conditions_filter + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + in_conditions_filter == o.in_conditions_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 + [in_conditions_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/in_target_ids_filter.rb b/lib/zitadel/client/models/in_target_ids_filter.rb new file mode 100644 index 00000000..0b7fc6ab --- /dev/null +++ b/lib/zitadel/client/models/in_target_ids_filter.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class InTargetIdsFilter + attr_accessor :in_target_ids_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'in_target_ids_filter' => :'BetaActionServiceInTargetIDsFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::InTargetIdsFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::InTargetIdsFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'in_target_ids_filter') + self.in_target_ids_filter = attributes[:'in_target_ids_filter'] + else + self.in_target_ids_filter = 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 @in_target_ids_filter.nil? + invalid_properties.push('invalid value for "in_target_ids_filter", in_target_ids_filter 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 @in_target_ids_filter.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceInTargetIDsFilter] in_target_ids_filter Value to be assigned + def in_target_ids_filter=(in_target_ids_filter) + if in_target_ids_filter.nil? + fail ArgumentError, 'in_target_ids_filter cannot be nil' + end + + @in_target_ids_filter = in_target_ids_filter + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/in_user_emails_query.rb b/lib/zitadel/client/models/in_user_emails_query.rb new file mode 100644 index 00000000..93c483ca --- /dev/null +++ b/lib/zitadel/client/models/in_user_emails_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class InUserEmailsQuery + attr_accessor :in_user_emails_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'in_user_emails_query' => :'inUserEmailsQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'in_user_emails_query' => :'UserServiceInUserEmailsQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::InUserEmailsQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::InUserEmailsQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'in_user_emails_query') + self.in_user_emails_query = attributes[:'in_user_emails_query'] + else + self.in_user_emails_query = 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 @in_user_emails_query.nil? + invalid_properties.push('invalid value for "in_user_emails_query", in_user_emails_query 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 @in_user_emails_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceInUserEmailsQuery] in_user_emails_query Value to be assigned + def in_user_emails_query=(in_user_emails_query) + if in_user_emails_query.nil? + fail ArgumentError, 'in_user_emails_query cannot be nil' + end + + @in_user_emails_query = in_user_emails_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + in_user_emails_query == o.in_user_emails_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 + [in_user_emails_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/in_user_emails_query1.rb b/lib/zitadel/client/models/in_user_emails_query1.rb new file mode 100644 index 00000000..3ca6b3d0 --- /dev/null +++ b/lib/zitadel/client/models/in_user_emails_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class InUserEmailsQuery1 + attr_accessor :in_user_emails_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'in_user_emails_query' => :'inUserEmailsQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'in_user_emails_query' => :'BetaUserServiceInUserEmailsQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::InUserEmailsQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::InUserEmailsQuery1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'in_user_emails_query') + self.in_user_emails_query = attributes[:'in_user_emails_query'] + else + self.in_user_emails_query = 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 @in_user_emails_query.nil? + invalid_properties.push('invalid value for "in_user_emails_query", in_user_emails_query 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 @in_user_emails_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceInUserEmailsQuery] in_user_emails_query Value to be assigned + def in_user_emails_query=(in_user_emails_query) + if in_user_emails_query.nil? + fail ArgumentError, 'in_user_emails_query cannot be nil' + end + + @in_user_emails_query = in_user_emails_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + in_user_emails_query == o.in_user_emails_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 + [in_user_emails_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/in_user_ids_query.rb b/lib/zitadel/client/models/in_user_ids_query.rb new file mode 100644 index 00000000..6808a9e4 --- /dev/null +++ b/lib/zitadel/client/models/in_user_ids_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class InUserIdsQuery + attr_accessor :in_user_ids_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'in_user_ids_query' => :'inUserIdsQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'in_user_ids_query' => :'UserServiceInUserIDQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::InUserIdsQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::InUserIdsQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'in_user_ids_query') + self.in_user_ids_query = attributes[:'in_user_ids_query'] + else + self.in_user_ids_query = 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 @in_user_ids_query.nil? + invalid_properties.push('invalid value for "in_user_ids_query", in_user_ids_query 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 @in_user_ids_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceInUserIDQuery] in_user_ids_query Value to be assigned + def in_user_ids_query=(in_user_ids_query) + if in_user_ids_query.nil? + fail ArgumentError, 'in_user_ids_query cannot be nil' + end + + @in_user_ids_query = in_user_ids_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + in_user_ids_query == o.in_user_ids_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 + [in_user_ids_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/in_user_ids_query1.rb b/lib/zitadel/client/models/in_user_ids_query1.rb new file mode 100644 index 00000000..f9cc1461 --- /dev/null +++ b/lib/zitadel/client/models/in_user_ids_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class InUserIdsQuery1 + attr_accessor :in_user_ids_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'in_user_ids_query' => :'inUserIdsQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'in_user_ids_query' => :'BetaUserServiceInUserIDQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::InUserIdsQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::InUserIdsQuery1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'in_user_ids_query') + self.in_user_ids_query = attributes[:'in_user_ids_query'] + else + self.in_user_ids_query = 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 @in_user_ids_query.nil? + invalid_properties.push('invalid value for "in_user_ids_query", in_user_ids_query 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 @in_user_ids_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceInUserIDQuery] in_user_ids_query Value to be assigned + def in_user_ids_query=(in_user_ids_query) + if in_user_ids_query.nil? + fail ArgumentError, 'in_user_ids_query cannot be nil' + end + + @in_user_ids_query = in_user_ids_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + in_user_ids_query == o.in_user_ids_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 + [in_user_ids_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/instance.rb b/lib/zitadel/client/models/instance.rb new file mode 100644 index 00000000..1e89c1cd --- /dev/null +++ b/lib/zitadel/client/models/instance.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Instance + attr_accessor :instance + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'instance' => :'instance' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'instance' => :'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::Instance` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Instance`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'instance') + self.instance = attributes[:'instance'] + else + self.instance = 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 @instance.nil? + invalid_properties.push('invalid value for "instance", instance 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 @instance.nil? + true + end + + # Custom attribute writer method with validation + # @param [Boolean] instance Value to be assigned + def instance=(instance) + if instance.nil? + fail ArgumentError, 'instance cannot be nil' + end + + @instance = instance + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + instance == o.instance + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [instance].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/is_verified.rb b/lib/zitadel/client/models/is_verified.rb new file mode 100644 index 00000000..d81ab98b --- /dev/null +++ b/lib/zitadel/client/models/is_verified.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class IsVerified + attr_accessor :is_verified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::IsVerified` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::IsVerified`. Please check the 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_verified') + self.is_verified = attributes[:'is_verified'] + else + self.is_verified = 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 @is_verified.nil? + invalid_properties.push('invalid value for "is_verified", is_verified 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 @is_verified.nil? + true + end + + # Custom attribute writer method with validation + # @param [Boolean] is_verified Value to be assigned + def is_verified=(is_verified) + if is_verified.nil? + fail ArgumentError, 'is_verified cannot be nil' + end + + @is_verified = is_verified + end + + # 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_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 + [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/jwt.rb b/lib/zitadel/client/models/jwt.rb new file mode 100644 index 00000000..f745ad33 --- /dev/null +++ b/lib/zitadel/client/models/jwt.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Jwt + attr_accessor :jwt + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'jwt' => :'jwt' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'IdentityProviderServiceJWTConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Jwt` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Jwt`. Please check the 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') + self.jwt = attributes[:'jwt'] + else + self.jwt = 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 @jwt.nil? + invalid_properties.push('invalid value for "jwt", jwt 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 @jwt.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceJWTConfig] jwt Value to be assigned + def jwt=(jwt) + if jwt.nil? + fail ArgumentError, 'jwt cannot be nil' + end + + @jwt = jwt + end + + # 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 == o.jwt + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/last_name_query.rb b/lib/zitadel/client/models/last_name_query.rb new file mode 100644 index 00000000..fa556908 --- /dev/null +++ b/lib/zitadel/client/models/last_name_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class LastNameQuery + attr_accessor :last_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'last_name_query' => :'lastNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceLastNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::LastNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::LastNameQuery`. Please check the 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_query') + self.last_name_query = attributes[:'last_name_query'] + else + self.last_name_query = 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 @last_name_query.nil? + invalid_properties.push('invalid value for "last_name_query", last_name_query 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 @last_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceLastNameQuery] last_name_query Value to be assigned + def last_name_query=(last_name_query) + if last_name_query.nil? + fail ArgumentError, 'last_name_query cannot be nil' + end + + @last_name_query = last_name_query + end + + # 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_query == o.last_name_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 + [last_name_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/last_name_query1.rb b/lib/zitadel/client/models/last_name_query1.rb new file mode 100644 index 00000000..491f58c2 --- /dev/null +++ b/lib/zitadel/client/models/last_name_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class LastNameQuery1 + attr_accessor :last_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'last_name_query' => :'lastNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceLastNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::LastNameQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::LastNameQuery1`. Please check the 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_query') + self.last_name_query = attributes[:'last_name_query'] + else + self.last_name_query = 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 @last_name_query.nil? + invalid_properties.push('invalid value for "last_name_query", last_name_query 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 @last_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceLastNameQuery] last_name_query Value to be assigned + def last_name_query=(last_name_query) + if last_name_query.nil? + fail ArgumentError, 'last_name_query cannot be nil' + end + + @last_name_query = last_name_query + end + + # 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_query == o.last_name_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 + [last_name_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/ldap.rb b/lib/zitadel/client/models/ldap.rb new file mode 100644 index 00000000..a94e8cf0 --- /dev/null +++ b/lib/zitadel/client/models/ldap.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Ldap + attr_accessor :ldap + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'ldap' => :'IdentityProviderServiceLDAPConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Ldap` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Ldap`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + else + self.ldap = 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 @ldap.nil? + invalid_properties.push('invalid value for "ldap", ldap 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 @ldap.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceLDAPConfig] ldap Value to be assigned + def ldap=(ldap) + if ldap.nil? + fail ArgumentError, 'ldap cannot be nil' + end + + @ldap = ldap + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/ldap1.rb b/lib/zitadel/client/models/ldap1.rb new file mode 100644 index 00000000..743b259b --- /dev/null +++ b/lib/zitadel/client/models/ldap1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Ldap1 + attr_accessor :ldap + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::Ldap1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Ldap1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + else + self.ldap = 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 @ldap.nil? + invalid_properties.push('invalid value for "ldap", ldap 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 @ldap.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceLDAPCredentials] ldap Value to be assigned + def ldap=(ldap) + if ldap.nil? + fail ArgumentError, 'ldap cannot be nil' + end + + @ldap = ldap + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/ldap2.rb b/lib/zitadel/client/models/ldap2.rb new file mode 100644 index 00000000..e5931fd6 --- /dev/null +++ b/lib/zitadel/client/models/ldap2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Ldap2 + attr_accessor :ldap + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'ldap' => :'UserServiceIDPLDAPAccessInformation' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Ldap2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Ldap2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + else + self.ldap = 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 @ldap.nil? + invalid_properties.push('invalid value for "ldap", ldap 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 @ldap.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceIDPLDAPAccessInformation] ldap Value to be assigned + def ldap=(ldap) + if ldap.nil? + fail ArgumentError, 'ldap cannot be nil' + end + + @ldap = ldap + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/ldap3.rb b/lib/zitadel/client/models/ldap3.rb new file mode 100644 index 00000000..b8ca468d --- /dev/null +++ b/lib/zitadel/client/models/ldap3.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Ldap3 + attr_accessor :ldap + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'ldap' => :'BetaUserServiceLDAPCredentials' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Ldap3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Ldap3`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + else + self.ldap = 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 @ldap.nil? + invalid_properties.push('invalid value for "ldap", ldap 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 @ldap.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceLDAPCredentials] ldap Value to be assigned + def ldap=(ldap) + if ldap.nil? + fail ArgumentError, 'ldap cannot be nil' + end + + @ldap = ldap + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/ldap4.rb b/lib/zitadel/client/models/ldap4.rb new file mode 100644 index 00000000..706bffd0 --- /dev/null +++ b/lib/zitadel/client/models/ldap4.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Ldap4 + attr_accessor :ldap + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'ldap' => :'BetaUserServiceIDPLDAPAccessInformation' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Ldap4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Ldap4`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ldap') + self.ldap = attributes[:'ldap'] + else + self.ldap = 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 @ldap.nil? + invalid_properties.push('invalid value for "ldap", ldap 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 @ldap.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceIDPLDAPAccessInformation] ldap Value to be assigned + def ldap=(ldap) + if ldap.nil? + fail ArgumentError, 'ldap cannot be nil' + end + + @ldap = ldap + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/login_name.rb b/lib/zitadel/client/models/login_name.rb new file mode 100644 index 00000000..130272c1 --- /dev/null +++ b/lib/zitadel/client/models/login_name.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class LoginName + attr_accessor :login_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::LoginName` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::LoginName`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] login_name Value to be assigned + def login_name=(login_name) + if login_name.nil? + fail ArgumentError, 'login_name cannot be nil' + 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/login_name_query.rb b/lib/zitadel/client/models/login_name_query.rb new file mode 100644 index 00000000..c5f9ecb7 --- /dev/null +++ b/lib/zitadel/client/models/login_name_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class LoginNameQuery + attr_accessor :login_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'login_name_query' => :'loginNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceLoginNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::LoginNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::LoginNameQuery`. Please check the 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_query') + self.login_name_query = attributes[:'login_name_query'] + else + self.login_name_query = 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 @login_name_query.nil? + invalid_properties.push('invalid value for "login_name_query", login_name_query 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 @login_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceLoginNameQuery] login_name_query Value to be assigned + def login_name_query=(login_name_query) + if login_name_query.nil? + fail ArgumentError, 'login_name_query cannot be nil' + end + + @login_name_query = login_name_query + end + + # 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_query == o.login_name_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 + [login_name_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/login_name_query1.rb b/lib/zitadel/client/models/login_name_query1.rb new file mode 100644 index 00000000..f4ee2171 --- /dev/null +++ b/lib/zitadel/client/models/login_name_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class LoginNameQuery1 + attr_accessor :login_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'login_name_query' => :'loginNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceLoginNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::LoginNameQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::LoginNameQuery1`. Please check the 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_query') + self.login_name_query = attributes[:'login_name_query'] + else + self.login_name_query = 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 @login_name_query.nil? + invalid_properties.push('invalid value for "login_name_query", login_name_query 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 @login_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceLoginNameQuery] login_name_query Value to be assigned + def login_name_query=(login_name_query) + if login_name_query.nil? + fail ArgumentError, 'login_name_query cannot be nil' + end + + @login_name_query = login_name_query + end + + # 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_query == o.login_name_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 + [login_name_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/machine.rb b/lib/zitadel/client/models/machine.rb new file mode 100644 index 00000000..f03958fe --- /dev/null +++ b/lib/zitadel/client/models/machine.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Machine + attr_accessor :machine + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'machine' => :'BetaUserServiceMachineUser' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Machine` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Machine`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'machine') + self.machine = attributes[:'machine'] + else + self.machine = 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 @machine.nil? + invalid_properties.push('invalid value for "machine", machine 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 @machine.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceMachineUser] machine Value to be assigned + def machine=(machine) + if machine.nil? + fail ArgumentError, 'machine cannot be nil' + end + + @machine = machine + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/name_query.rb b/lib/zitadel/client/models/name_query.rb new file mode 100644 index 00000000..fb6ea92f --- /dev/null +++ b/lib/zitadel/client/models/name_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class NameQuery + attr_accessor :name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name_query' => :'nameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::NameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::NameQuery`. Please check the 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'] + else + self.name_query = 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 @name_query.nil? + invalid_properties.push('invalid value for "name_query", name_query 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 @name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [OrganizationServiceOrganizationNameQuery] name_query Value to be assigned + def name_query=(name_query) + if name_query.nil? + fail ArgumentError, 'name_query cannot be nil' + end + + @name_query = name_query + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/nick_name_query.rb b/lib/zitadel/client/models/nick_name_query.rb new file mode 100644 index 00000000..1a41ac34 --- /dev/null +++ b/lib/zitadel/client/models/nick_name_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class NickNameQuery + attr_accessor :nick_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'nick_name_query' => :'nickNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceNickNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::NickNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::NickNameQuery`. Please check the 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_query') + self.nick_name_query = attributes[:'nick_name_query'] + else + self.nick_name_query = 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 @nick_name_query.nil? + invalid_properties.push('invalid value for "nick_name_query", nick_name_query 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 @nick_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceNickNameQuery] nick_name_query Value to be assigned + def nick_name_query=(nick_name_query) + if nick_name_query.nil? + fail ArgumentError, 'nick_name_query cannot be nil' + end + + @nick_name_query = nick_name_query + end + + # 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_query == o.nick_name_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 + [nick_name_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/nick_name_query1.rb b/lib/zitadel/client/models/nick_name_query1.rb new file mode 100644 index 00000000..2615211a --- /dev/null +++ b/lib/zitadel/client/models/nick_name_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class NickNameQuery1 + attr_accessor :nick_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'nick_name_query' => :'nickNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceNickNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::NickNameQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::NickNameQuery1`. Please check the 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_query') + self.nick_name_query = attributes[:'nick_name_query'] + else + self.nick_name_query = 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 @nick_name_query.nil? + invalid_properties.push('invalid value for "nick_name_query", nick_name_query 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 @nick_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceNickNameQuery] nick_name_query Value to be assigned + def nick_name_query=(nick_name_query) + if nick_name_query.nil? + fail ArgumentError, 'nick_name_query cannot be nil' + end + + @nick_name_query = nick_name_query + end + + # 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_query == o.nick_name_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 + [nick_name_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/not_query.rb b/lib/zitadel/client/models/not_query.rb new file mode 100644 index 00000000..3ec312f4 --- /dev/null +++ b/lib/zitadel/client/models/not_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class NotQuery + attr_accessor :not_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'not_query' => :'notQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'not_query' => :'UserServiceNotQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::NotQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::NotQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'not_query') + self.not_query = attributes[:'not_query'] + else + self.not_query = 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 @not_query.nil? + invalid_properties.push('invalid value for "not_query", not_query 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 @not_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceNotQuery] not_query Value to be assigned + def not_query=(not_query) + if not_query.nil? + fail ArgumentError, 'not_query cannot be nil' + end + + @not_query = not_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + not_query == o.not_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 + [not_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/not_query1.rb b/lib/zitadel/client/models/not_query1.rb new file mode 100644 index 00000000..d1e708f3 --- /dev/null +++ b/lib/zitadel/client/models/not_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class NotQuery1 + attr_accessor :not_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'not_query' => :'notQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'not_query' => :'BetaUserServiceNotQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::NotQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::NotQuery1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'not_query') + self.not_query = attributes[:'not_query'] + else + self.not_query = 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 @not_query.nil? + invalid_properties.push('invalid value for "not_query", not_query 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 @not_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceNotQuery] not_query Value to be assigned + def not_query=(not_query) + if not_query.nil? + fail ArgumentError, 'not_query cannot be nil' + end + + @not_query = not_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + not_query == o.not_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 + [not_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/o_i_d_c_service_any.rb b/lib/zitadel/client/models/o_i_d_c_service_any.rb new file mode 100644 index 00000000..3f7d307e --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class OIDCServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::OIDCServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_auth_request.rb b/lib/zitadel/client/models/o_i_d_c_service_auth_request.rb new file mode 100644 index 00000000..a5db6063 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_auth_request.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 OIDCServiceAuthRequest + attr_accessor :id + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :creation_date + + attr_accessor :client_id + + attr_accessor :scope + + attr_accessor :redirect_uri + + attr_accessor :prompt + + attr_accessor :ui_locales + + attr_accessor :login_hint + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :max_age + + 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([ + :'login_hint', + :'hint_user_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_connect_error.rb b/lib/zitadel/client/models/o_i_d_c_service_connect_error.rb new file mode 100644 index 00000000..f784c188 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class OIDCServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'OIDCServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OIDCServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..0e268c04 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_create_callback_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 OIDCServiceCreateCallbackResponse + attr_accessor :details + + 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..e596ea29 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_details.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 OIDCServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_get_auth_request_request.rb b/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_request.rb new file mode 100644 index 00000000..bc39bbf5 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_get_auth_request_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 OIDCServiceGetAuthRequestRequest + attr_accessor :auth_request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'auth_request_id' => :'authRequestId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_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::OIDCServiceGetAuthRequestRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceGetAuthRequestRequest`. Please check the 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_id') + self.auth_request_id = attributes[:'auth_request_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 && + auth_request_id == o.auth_request_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 + [auth_request_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_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_request.rb b/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_request.rb new file mode 100644 index 00000000..11933812 --- /dev/null +++ b/lib/zitadel/client/models/o_i_d_c_service_get_device_authorization_request_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 OIDCServiceGetDeviceAuthorizationRequestRequest + # The user_code returned by the device authorization request and provided to the user by the device. + attr_accessor :user_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_code' => :'userCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_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::OIDCServiceGetDeviceAuthorizationRequestRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OIDCServiceGetDeviceAuthorizationRequestRequest`. Please check the 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_code') + self.user_code = attributes[:'user_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_code == o.user_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_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/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/oauth.rb b/lib/zitadel/client/models/oauth.rb new file mode 100644 index 00000000..4930d672 --- /dev/null +++ b/lib/zitadel/client/models/oauth.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Oauth + attr_accessor :oauth + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'oauth' => :'oauth' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'IdentityProviderServiceOAuthConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Oauth` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Oauth`. Please check the 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'] + else + self.oauth = 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 @oauth.nil? + invalid_properties.push('invalid value for "oauth", oauth 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 @oauth.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceOAuthConfig] oauth Value to be assigned + def oauth=(oauth) + if oauth.nil? + fail ArgumentError, 'oauth cannot be nil' + end + + @oauth = oauth + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/oauth1.rb b/lib/zitadel/client/models/oauth1.rb new file mode 100644 index 00000000..b87a590b --- /dev/null +++ b/lib/zitadel/client/models/oauth1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Oauth1 + attr_accessor :oauth + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'oauth' => :'oauth' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Oauth1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Oauth1`. Please check the 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'] + else + self.oauth = 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 @oauth.nil? + invalid_properties.push('invalid value for "oauth", oauth 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 @oauth.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceIDPOAuthAccessInformation] oauth Value to be assigned + def oauth=(oauth) + if oauth.nil? + fail ArgumentError, 'oauth cannot be nil' + end + + @oauth = oauth + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/oauth2.rb b/lib/zitadel/client/models/oauth2.rb new file mode 100644 index 00000000..7a71e627 --- /dev/null +++ b/lib/zitadel/client/models/oauth2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Oauth2 + attr_accessor :oauth + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'oauth' => :'oauth' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaUserServiceIDPOAuthAccessInformation' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Oauth2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Oauth2`. Please check the 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'] + else + self.oauth = 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 @oauth.nil? + invalid_properties.push('invalid value for "oauth", oauth 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 @oauth.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceIDPOAuthAccessInformation] oauth Value to be assigned + def oauth=(oauth) + if oauth.nil? + fail ArgumentError, 'oauth cannot be nil' + end + + @oauth = oauth + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/oidc.rb b/lib/zitadel/client/models/oidc.rb new file mode 100644 index 00000000..eb128b30 --- /dev/null +++ b/lib/zitadel/client/models/oidc.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Oidc + attr_accessor :oidc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'oidc' => :'oidc' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'oidc' => :'IdentityProviderServiceGenericOIDCConfig' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Oidc` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Oidc`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'oidc') + self.oidc = attributes[:'oidc'] + else + self.oidc = 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 @oidc.nil? + invalid_properties.push('invalid value for "oidc", oidc 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 @oidc.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceGenericOIDCConfig] oidc Value to be assigned + def oidc=(oidc) + if oidc.nil? + fail ArgumentError, 'oidc cannot be nil' + end + + @oidc = oidc + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + oidc == o.oidc + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [oidc].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/oidc_service_authorize_or_deny_device_authorization_request.rb b/lib/zitadel/client/models/oidc_service_authorize_or_deny_device_authorization_request.rb new file mode 100644 index 00000000..3c9d3e58 --- /dev/null +++ b/lib/zitadel/client/models/oidc_service_authorize_or_deny_device_authorization_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Deny', + :'Session' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/oidc_service_create_callback_request.rb b/lib/zitadel/client/models/oidc_service_create_callback_request.rb new file mode 100644 index 00000000..ed417f0f --- /dev/null +++ b/lib/zitadel/client/models/oidc_service_create_callback_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module OIDCServiceCreateCallbackRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Error', + :'Session' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/or_query.rb b/lib/zitadel/client/models/or_query.rb new file mode 100644 index 00000000..551269d1 --- /dev/null +++ b/lib/zitadel/client/models/or_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrQuery + attr_accessor :or_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'or_query' => :'orQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'or_query' => :'UserServiceOrQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'or_query') + self.or_query = attributes[:'or_query'] + else + self.or_query = 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 @or_query.nil? + invalid_properties.push('invalid value for "or_query", or_query 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 @or_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceOrQuery] or_query Value to be assigned + def or_query=(or_query) + if or_query.nil? + fail ArgumentError, 'or_query cannot be nil' + end + + @or_query = or_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + or_query == o.or_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 + [or_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/or_query1.rb b/lib/zitadel/client/models/or_query1.rb new file mode 100644 index 00000000..7b79f0a2 --- /dev/null +++ b/lib/zitadel/client/models/or_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrQuery1 + attr_accessor :or_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'or_query' => :'orQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'or_query' => :'BetaUserServiceOrQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrQuery1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'or_query') + self.or_query = attributes[:'or_query'] + else + self.or_query = 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 @or_query.nil? + invalid_properties.push('invalid value for "or_query", or_query 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 @or_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceOrQuery] or_query Value to be assigned + def or_query=(or_query) + if or_query.nil? + fail ArgumentError, 'or_query cannot be nil' + end + + @or_query = or_query + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + or_query == o.or_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 + [or_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/org_domain.rb b/lib/zitadel/client/models/org_domain.rb new file mode 100644 index 00000000..9dc5be2f --- /dev/null +++ b/lib/zitadel/client/models/org_domain.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrgDomain + attr_accessor :org_domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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_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::OrgDomain` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrgDomain`. Please check the 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_domain') + self.org_domain = attributes[:'org_domain'] + else + self.org_domain = 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 @org_domain.nil? + invalid_properties.push('invalid value for "org_domain", org_domain 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 @org_domain.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] org_domain Value to be assigned + def org_domain=(org_domain) + if org_domain.nil? + fail ArgumentError, 'org_domain cannot be nil' + end + + @org_domain = org_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 && + 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_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/org_id.rb b/lib/zitadel/client/models/org_id.rb new file mode 100644 index 00000000..b6068b2a --- /dev/null +++ b/lib/zitadel/client/models/org_id.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrgId + attr_accessor :org_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'org_id' => :'orgId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrgId` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrgId`. Please check the 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'] + else + self.org_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 @org_id.nil? + invalid_properties.push('invalid value for "org_id", org_id 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 @org_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] org_id Value to be assigned + def org_id=(org_id) + if org_id.nil? + fail ArgumentError, 'org_id cannot be nil' + end + + @org_id = org_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 && + org_id == o.org_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 + [org_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_id_query.rb b/lib/zitadel/client/models/organization_id_query.rb new file mode 100644 index 00000000..d3147d1b --- /dev/null +++ b/lib/zitadel/client/models/organization_id_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationIdQuery + attr_accessor :organization_id_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id_query' => :'organizationIdQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceOrganizationIdQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationIdQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationIdQuery`. Please check the 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_query') + self.organization_id_query = attributes[:'organization_id_query'] + else + self.organization_id_query = 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_query.nil? + invalid_properties.push('invalid value for "organization_id_query", organization_id_query 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 @organization_id_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceOrganizationIdQuery] organization_id_query Value to be assigned + def organization_id_query=(organization_id_query) + if organization_id_query.nil? + fail ArgumentError, 'organization_id_query cannot be nil' + end + + @organization_id_query = organization_id_query + end + + # 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_query == o.organization_id_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 + [organization_id_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_id_query1.rb b/lib/zitadel/client/models/organization_id_query1.rb new file mode 100644 index 00000000..28f6a229 --- /dev/null +++ b/lib/zitadel/client/models/organization_id_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OrganizationIdQuery1 + attr_accessor :organization_id_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id_query' => :'organizationIdQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceOrganizationIdQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationIdQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationIdQuery1`. Please check the 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_query') + self.organization_id_query = attributes[:'organization_id_query'] + else + self.organization_id_query = 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_query.nil? + invalid_properties.push('invalid value for "organization_id_query", organization_id_query 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 @organization_id_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceOrganizationIdQuery] organization_id_query Value to be assigned + def organization_id_query=(organization_id_query) + if organization_id_query.nil? + fail ArgumentError, 'organization_id_query cannot be nil' + end + + @organization_id_query = organization_id_query + end + + # 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_query == o.organization_id_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 + [organization_id_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_add_organization_request.rb b/lib/zitadel/client/models/organization_service_add_organization_request.rb new file mode 100644 index 00000000..731bf2f0 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_add_organization_request.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 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + 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_response.rb b/lib/zitadel/client/models/organization_service_add_organization_response.rb new file mode 100644 index 00000000..634cceb6 --- /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_admin.rb b/lib/zitadel/client/models/organization_service_admin.rb new file mode 100644 index 00000000..1ca755dc --- /dev/null +++ b/lib/zitadel/client/models/organization_service_admin.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module OrganizationServiceAdmin + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Human', + :'UserId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/organization_service_any.rb b/lib/zitadel/client/models/organization_service_any.rb new file mode 100644 index 00000000..97fbcec5 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class OrganizationServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::OrganizationServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_connect_error.rb b/lib/zitadel/client/models/organization_service_connect_error.rb new file mode 100644 index 00000000..c8927309 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class OrganizationServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'OrganizationServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_created_admin.rb b/lib/zitadel/client/models/organization_service_created_admin.rb new file mode 100644 index 00000000..3d40d8f1 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_created_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 OrganizationServiceCreatedAdmin + 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([ + :'email_code', + :'phone_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OrganizationServiceCreatedAdmin` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceCreatedAdmin`. Please check the 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..71bb6564 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_details.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 OrganizationServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_list_details.rb b/lib/zitadel/client/models/organization_service_list_details.rb new file mode 100644 index 00000000..f46dbfa8 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_details.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 OrganizationServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'processed_sequence' => :'Object', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'processed_sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..74a371ff --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_organizations_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 OrganizationServiceListOrganizationsRequest + attr_accessor :query + + attr_accessor :sorting_column + + # criteria the client is looking for + 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'] + 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..4f1cbbf9 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_organizations_response.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 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'] + 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..faccd65e --- /dev/null +++ b/lib/zitadel/client/models/organization_service_list_query.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 OrganizationServiceListQuery + attr_accessor :offset + + attr_accessor :limit + + 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' => :'Object', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'offset', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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.rb b/lib/zitadel/client/models/organization_service_organization.rb new file mode 100644 index 00000000..fc54e9c2 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_organization.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 + class OrganizationServiceOrganization + # 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::OrganizationServiceOrganization` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OrganizationServiceOrganization`. Please check the 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'] + 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 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_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_search_query.rb b/lib/zitadel/client/models/organization_service_search_query.rb new file mode 100644 index 00000000..3e8fa138 --- /dev/null +++ b/lib/zitadel/client/models/organization_service_search_query.rb @@ -0,0 +1,113 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module OrganizationServiceSearchQuery + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'DefaultQuery', + :'DomainQuery', + :'IdQuery', + :'NameQuery', + :'StateQuery1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/otp.rb b/lib/zitadel/client/models/otp.rb new file mode 100644 index 00000000..727c1df4 --- /dev/null +++ b/lib/zitadel/client/models/otp.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Otp + attr_accessor :otp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp' => :'otp' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp' => :'UserServiceAuthFactorOTP' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Otp` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Otp`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp') + self.otp = attributes[:'otp'] + else + self.otp = 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 @otp.nil? + invalid_properties.push('invalid value for "otp", otp 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 @otp.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceAuthFactorOTP] otp Value to be assigned + def otp=(otp) + if otp.nil? + fail ArgumentError, 'otp cannot be nil' + end + + @otp = otp + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp == o.otp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/otp_email.rb b/lib/zitadel/client/models/otp_email.rb new file mode 100644 index 00000000..389f9fda --- /dev/null +++ b/lib/zitadel/client/models/otp_email.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OtpEmail + attr_accessor :otp_email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'otp_email' => :'UserServiceAuthFactorOTPEmail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OtpEmail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OtpEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp_email') + self.otp_email = attributes[:'otp_email'] + else + self.otp_email = 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 @otp_email.nil? + invalid_properties.push('invalid value for "otp_email", otp_email 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 @otp_email.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceAuthFactorOTPEmail] otp_email Value to be assigned + def otp_email=(otp_email) + if otp_email.nil? + fail ArgumentError, 'otp_email cannot be nil' + end + + @otp_email = otp_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 && + 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 + [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/otp_sms.rb b/lib/zitadel/client/models/otp_sms.rb new file mode 100644 index 00000000..b7f6898c --- /dev/null +++ b/lib/zitadel/client/models/otp_sms.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class OtpSms + attr_accessor :otp_sms + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp_sms' => :'otpSms' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp_sms' => :'UserServiceAuthFactorOTPSMS' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::OtpSms` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::OtpSms`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp_sms') + self.otp_sms = attributes[:'otp_sms'] + else + self.otp_sms = 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 @otp_sms.nil? + invalid_properties.push('invalid value for "otp_sms", otp_sms 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 @otp_sms.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceAuthFactorOTPSMS] otp_sms Value to be assigned + def otp_sms=(otp_sms) + if otp_sms.nil? + fail ArgumentError, 'otp_sms cannot be nil' + end + + @otp_sms = otp_sms + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp_sms == o.otp_sms + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp_sms].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/password.rb b/lib/zitadel/client/models/password.rb new file mode 100644 index 00000000..52f06d70 --- /dev/null +++ b/lib/zitadel/client/models/password.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Password + 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' => :'UserServicePassword' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Password` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Password`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [UserServicePassword] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + 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/password1.rb b/lib/zitadel/client/models/password1.rb new file mode 100644 index 00000000..ee73d8b9 --- /dev/null +++ b/lib/zitadel/client/models/password1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Password1 + 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' => :'BetaUserServicePassword' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Password1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Password1`. Please check the 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 + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServicePassword] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + 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/phone_query.rb b/lib/zitadel/client/models/phone_query.rb new file mode 100644 index 00000000..4770f17c --- /dev/null +++ b/lib/zitadel/client/models/phone_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class PhoneQuery + attr_accessor :phone_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::PhoneQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::PhoneQuery`. Please check the 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_query') + self.phone_query = attributes[:'phone_query'] + else + self.phone_query = 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 @phone_query.nil? + invalid_properties.push('invalid value for "phone_query", phone_query 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 @phone_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServicePhoneQuery] phone_query Value to be assigned + def phone_query=(phone_query) + if phone_query.nil? + fail ArgumentError, 'phone_query cannot be nil' + end + + @phone_query = phone_query + end + + # 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_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 + [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/phone_query1.rb b/lib/zitadel/client/models/phone_query1.rb new file mode 100644 index 00000000..a8673c78 --- /dev/null +++ b/lib/zitadel/client/models/phone_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class PhoneQuery1 + attr_accessor :phone_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'phone_query' => :'BetaUserServicePhoneQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::PhoneQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::PhoneQuery1`. Please check the 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_query') + self.phone_query = attributes[:'phone_query'] + else + self.phone_query = 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 @phone_query.nil? + invalid_properties.push('invalid value for "phone_query", phone_query 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 @phone_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServicePhoneQuery] phone_query Value to be assigned + def phone_query=(phone_query) + if phone_query.nil? + fail ArgumentError, 'phone_query cannot be nil' + end + + @phone_query = phone_query + end + + # 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_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 + [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/post.rb b/lib/zitadel/client/models/post.rb new file mode 100644 index 00000000..e2448c7b --- /dev/null +++ b/lib/zitadel/client/models/post.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Post + attr_accessor :post + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::Post` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Post`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'post') + self.post = attributes[:'post'] + else + self.post = 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 @post.nil? + invalid_properties.push('invalid value for "post", post 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 @post.nil? + true + end + + # Custom attribute writer method with validation + # @param [SAMLServicePostResponse] post Value to be assigned + def post=(post) + if post.nil? + fail ArgumentError, 'post cannot be nil' + end + + @post = post + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/post_form.rb b/lib/zitadel/client/models/post_form.rb new file mode 100644 index 00000000..47a03723 --- /dev/null +++ b/lib/zitadel/client/models/post_form.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class PostForm + attr_accessor :post_form + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::PostForm` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::PostForm`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'post_form') + self.post_form = attributes[:'post_form'] + else + self.post_form = 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 @post_form.nil? + invalid_properties.push('invalid value for "post_form", post_form 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 @post_form.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] post_form Value to be assigned + def post_form=(post_form) + if post_form.nil? + fail ArgumentError, 'post_form cannot be nil' + end + + @post_form = post_form + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + 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 + [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/redirect.rb b/lib/zitadel/client/models/redirect.rb new file mode 100644 index 00000000..5b8d4223 --- /dev/null +++ b/lib/zitadel/client/models/redirect.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Redirect + attr_accessor :redirect + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'redirect' => :'redirect' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'redirect' => :'SAMLServiceRedirectResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Redirect` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Redirect`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'redirect') + self.redirect = attributes[:'redirect'] + else + self.redirect = 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 @redirect.nil? + invalid_properties.push('invalid value for "redirect", redirect 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 @redirect.nil? + true + end + + # Custom attribute writer method with validation + # @param [SAMLServiceRedirectResponse] redirect Value to be assigned + def redirect=(redirect) + if redirect.nil? + fail ArgumentError, 'redirect cannot be nil' + end + + @redirect = redirect + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + redirect == o.redirect + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [redirect].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/request.rb b/lib/zitadel/client/models/request.rb new file mode 100644 index 00000000..153e3331 --- /dev/null +++ b/lib/zitadel/client/models/request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Request + attr_accessor :request + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'request' => :'request' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaActionServiceRequestExecution' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Request` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Request`. Please check the 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'] + else + self.request = 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 @request.nil? + invalid_properties.push('invalid value for "request", request 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 @request.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceRequestExecution] request Value to be assigned + def request=(request) + if request.nil? + fail ArgumentError, 'request cannot be nil' + end + + @request = request + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/response.rb b/lib/zitadel/client/models/response.rb new file mode 100644 index 00000000..212a7bf2 --- /dev/null +++ b/lib/zitadel/client/models/response.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Response + attr_accessor :response + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'response' => :'response' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'response' => :'BetaActionServiceResponseExecution' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'response') + self.response = attributes[:'response'] + else + self.response = 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 @response.nil? + invalid_properties.push('invalid value for "response", response 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 @response.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceResponseExecution] response Value to be assigned + def response=(response) + if response.nil? + fail ArgumentError, 'response cannot be nil' + end + + @response = response + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + response == o.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 + [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/rest_async.rb b/lib/zitadel/client/models/rest_async.rb new file mode 100644 index 00000000..e7aed631 --- /dev/null +++ b/lib/zitadel/client/models/rest_async.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class RestAsync + attr_accessor :rest_async + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rest_async' => :'restAsync' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'rest_async' => :'BetaActionServiceRESTAsync' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::RestAsync` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::RestAsync`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'rest_async') + self.rest_async = attributes[:'rest_async'] + else + self.rest_async = 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 @rest_async.nil? + invalid_properties.push('invalid value for "rest_async", rest_async 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 @rest_async.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceRESTAsync] rest_async Value to be assigned + def rest_async=(rest_async) + if rest_async.nil? + fail ArgumentError, 'rest_async cannot be nil' + end + + @rest_async = rest_async + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rest_async == o.rest_async + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [rest_async].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/rest_call.rb b/lib/zitadel/client/models/rest_call.rb new file mode 100644 index 00000000..e01ba98b --- /dev/null +++ b/lib/zitadel/client/models/rest_call.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class RestCall + attr_accessor :rest_call + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rest_call' => :'restCall' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'rest_call' => :'BetaActionServiceRESTCall' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::RestCall` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::RestCall`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'rest_call') + self.rest_call = attributes[:'rest_call'] + else + self.rest_call = 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 @rest_call.nil? + invalid_properties.push('invalid value for "rest_call", rest_call 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 @rest_call.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceRESTCall] rest_call Value to be assigned + def rest_call=(rest_call) + if rest_call.nil? + fail ArgumentError, 'rest_call cannot be nil' + end + + @rest_call = rest_call + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rest_call == o.rest_call + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [rest_call].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/rest_webhook.rb b/lib/zitadel/client/models/rest_webhook.rb new file mode 100644 index 00000000..55c9e48c --- /dev/null +++ b/lib/zitadel/client/models/rest_webhook.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class RestWebhook + attr_accessor :rest_webhook + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rest_webhook' => :'restWebhook' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'rest_webhook' => :'BetaActionServiceRESTWebhook' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::RestWebhook` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::RestWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'rest_webhook') + self.rest_webhook = attributes[:'rest_webhook'] + else + self.rest_webhook = 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 @rest_webhook.nil? + invalid_properties.push('invalid value for "rest_webhook", rest_webhook 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 @rest_webhook.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceRESTWebhook] rest_webhook Value to be assigned + def rest_webhook=(rest_webhook) + if rest_webhook.nil? + fail ArgumentError, 'rest_webhook cannot be nil' + end + + @rest_webhook = rest_webhook + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rest_webhook == o.rest_webhook + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [rest_webhook].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/return_code.rb b/lib/zitadel/client/models/return_code.rb new file mode 100644 index 00000000..56f7013e --- /dev/null +++ b/lib/zitadel/client/models/return_code.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode + 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' => :'BetaSessionServiceReturnCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaSessionServiceReturnCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code1.rb b/lib/zitadel/client/models/return_code1.rb new file mode 100644 index 00000000..31ee9e3c --- /dev/null +++ b/lib/zitadel/client/models/return_code1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode1 + 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' => :'SessionServiceReturnCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode1`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [SessionServiceReturnCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code10.rb b/lib/zitadel/client/models/return_code10.rb new file mode 100644 index 00000000..2b7e78c6 --- /dev/null +++ b/lib/zitadel/client/models/return_code10.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode10 + 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' => :'BetaUserServiceReturnPasswordResetCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode10` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode10`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceReturnPasswordResetCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code2.rb b/lib/zitadel/client/models/return_code2.rb new file mode 100644 index 00000000..1f0b4346 --- /dev/null +++ b/lib/zitadel/client/models/return_code2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode2 + 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' => :'UserServiceReturnEmailVerificationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode2`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceReturnEmailVerificationCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code3.rb b/lib/zitadel/client/models/return_code3.rb new file mode 100644 index 00000000..0fadc87e --- /dev/null +++ b/lib/zitadel/client/models/return_code3.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode3 + 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' => :'UserServiceReturnPhoneVerificationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode3`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceReturnPhoneVerificationCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code4.rb b/lib/zitadel/client/models/return_code4.rb new file mode 100644 index 00000000..048b9e0c --- /dev/null +++ b/lib/zitadel/client/models/return_code4.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode4 + 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' => :'UserServiceReturnPasskeyRegistrationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode4`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceReturnPasskeyRegistrationCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code5.rb b/lib/zitadel/client/models/return_code5.rb new file mode 100644 index 00000000..b2d6d688 --- /dev/null +++ b/lib/zitadel/client/models/return_code5.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode5 + 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' => :'UserServiceReturnPasswordResetCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode5` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode5`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceReturnPasswordResetCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code6.rb b/lib/zitadel/client/models/return_code6.rb new file mode 100644 index 00000000..f02fd2e3 --- /dev/null +++ b/lib/zitadel/client/models/return_code6.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode6 + 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' => :'UserServiceReturnInviteCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode6` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode6`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceReturnInviteCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code7.rb b/lib/zitadel/client/models/return_code7.rb new file mode 100644 index 00000000..583b379a --- /dev/null +++ b/lib/zitadel/client/models/return_code7.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode7 + 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' => :'BetaUserServiceReturnEmailVerificationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode7` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode7`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceReturnEmailVerificationCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code8.rb b/lib/zitadel/client/models/return_code8.rb new file mode 100644 index 00000000..40071017 --- /dev/null +++ b/lib/zitadel/client/models/return_code8.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode8 + 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' => :'BetaUserServiceReturnPhoneVerificationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode8` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode8`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceReturnPhoneVerificationCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/return_code9.rb b/lib/zitadel/client/models/return_code9.rb new file mode 100644 index 00000000..1545a4b5 --- /dev/null +++ b/lib/zitadel/client/models/return_code9.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class ReturnCode9 + 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' => :'BetaUserServiceReturnPasskeyRegistrationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::ReturnCode9` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::ReturnCode9`. Please check the 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'] + else + self.return_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 @return_code.nil? + invalid_properties.push('invalid value for "return_code", return_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 @return_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceReturnPasskeyRegistrationCode] return_code Value to be assigned + def return_code=(return_code) + if return_code.nil? + fail ArgumentError, 'return_code cannot be nil' + end + + @return_code = return_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 && + 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/rsa.rb b/lib/zitadel/client/models/rsa.rb new file mode 100644 index 00000000..a2d687da --- /dev/null +++ b/lib/zitadel/client/models/rsa.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Rsa + attr_accessor :rsa + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rsa' => :'rsa' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaWebKeyServiceRSA' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Rsa` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Rsa`. Please check the 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'] + else + self.rsa = 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 @rsa.nil? + invalid_properties.push('invalid value for "rsa", rsa 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 @rsa.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaWebKeyServiceRSA] rsa Value to be assigned + def rsa=(rsa) + if rsa.nil? + fail ArgumentError, 'rsa cannot be nil' + end + + @rsa = rsa + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_any.rb b/lib/zitadel/client/models/s_a_m_l_service_any.rb new file mode 100644 index 00000000..eaec809a --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class SAMLServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::SAMLServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_connect_error.rb b/lib/zitadel/client/models/s_a_m_l_service_connect_error.rb new file mode 100644 index 00000000..33246eea --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class SAMLServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'SAMLServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SAMLServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..d519fc09 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_details.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 SAMLServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_get_s_a_m_l_request_request.rb b/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_request.rb new file mode 100644 index 00000000..a53933f0 --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_get_s_a_m_l_request_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 SAMLServiceGetSAMLRequestRequest + # ID of the SAML Request, as obtained from the redirect URL. + attr_accessor :saml_request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'saml_request_id' => :'samlRequestId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_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::SAMLServiceGetSAMLRequestRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SAMLServiceGetSAMLRequestRequest`. Please check the 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_id') + self.saml_request_id = attributes[:'saml_request_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 && + saml_request_id == o.saml_request_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 + [saml_request_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/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_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..7bed540e --- /dev/null +++ b/lib/zitadel/client/models/s_a_m_l_service_s_a_m_l_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 SAMLServiceSAMLRequest + attr_accessor :id + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :creation_date + + attr_accessor :issuer + + attr_accessor :assertion_consumer_service + + attr_accessor :relay_state + + 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/saml.rb b/lib/zitadel/client/models/saml.rb new file mode 100644 index 00000000..07716e11 --- /dev/null +++ b/lib/zitadel/client/models/saml.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Saml + attr_accessor :saml + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::Saml` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Saml`. Please check the 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') + self.saml = attributes[:'saml'] + else + self.saml = 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 @saml.nil? + invalid_properties.push('invalid value for "saml", saml 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 @saml.nil? + true + end + + # Custom attribute writer method with validation + # @param [IdentityProviderServiceSAMLConfig] saml Value to be assigned + def saml=(saml) + if saml.nil? + fail ArgumentError, 'saml cannot be nil' + end + + @saml = saml + end + + # 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 == 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 + [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/saml1.rb b/lib/zitadel/client/models/saml1.rb new file mode 100644 index 00000000..fc0ef8d1 --- /dev/null +++ b/lib/zitadel/client/models/saml1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Saml1 + attr_accessor :saml + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'saml' => :'UserServiceIDPSAMLAccessInformation' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Saml1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Saml1`. Please check the 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') + self.saml = attributes[:'saml'] + else + self.saml = 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 @saml.nil? + invalid_properties.push('invalid value for "saml", saml 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 @saml.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceIDPSAMLAccessInformation] saml Value to be assigned + def saml=(saml) + if saml.nil? + fail ArgumentError, 'saml cannot be nil' + end + + @saml = saml + end + + # 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 == 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 + [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/saml2.rb b/lib/zitadel/client/models/saml2.rb new file mode 100644 index 00000000..8b90244f --- /dev/null +++ b/lib/zitadel/client/models/saml2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Saml2 + attr_accessor :saml + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'saml' => :'BetaUserServiceIDPSAMLAccessInformation' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Saml2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Saml2`. Please check the 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') + self.saml = attributes[:'saml'] + else + self.saml = 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 @saml.nil? + invalid_properties.push('invalid value for "saml", saml 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 @saml.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceIDPSAMLAccessInformation] saml Value to be assigned + def saml=(saml) + if saml.nil? + fail ArgumentError, 'saml cannot be nil' + end + + @saml = saml + end + + # 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 == 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 + [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/saml_service_create_response_request.rb b/lib/zitadel/client/models/saml_service_create_response_request.rb new file mode 100644 index 00000000..683c74a1 --- /dev/null +++ b/lib/zitadel/client/models/saml_service_create_response_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module SAMLServiceCreateResponseRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Error1', + :'Session1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/saml_service_create_response_response.rb b/lib/zitadel/client/models/saml_service_create_response_response.rb new file mode 100644 index 00000000..13e34151 --- /dev/null +++ b/lib/zitadel/client/models/saml_service_create_response_response.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module SAMLServiceCreateResponseResponse + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Post', + :'Redirect' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/send_code.rb b/lib/zitadel/client/models/send_code.rb new file mode 100644 index 00000000..bf619eeb --- /dev/null +++ b/lib/zitadel/client/models/send_code.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendCode + attr_accessor :send_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaSessionServiceSendCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendCode`. Please check the 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'] + else + self.send_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 @send_code.nil? + invalid_properties.push('invalid value for "send_code", send_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 @send_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaSessionServiceSendCode] send_code Value to be assigned + def send_code=(send_code) + if send_code.nil? + fail ArgumentError, 'send_code cannot be nil' + end + + @send_code = send_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 && + send_code == o.send_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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_code1.rb b/lib/zitadel/client/models/send_code1.rb new file mode 100644 index 00000000..b75bd8bf --- /dev/null +++ b/lib/zitadel/client/models/send_code1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendCode1 + attr_accessor :send_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'SessionServiceSendCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendCode1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendCode1`. Please check the 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'] + else + self.send_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 @send_code.nil? + invalid_properties.push('invalid value for "send_code", send_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 @send_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [SessionServiceSendCode] send_code Value to be assigned + def send_code=(send_code) + if send_code.nil? + fail ArgumentError, 'send_code cannot be nil' + end + + @send_code = send_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 && + send_code == o.send_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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_code2.rb b/lib/zitadel/client/models/send_code2.rb new file mode 100644 index 00000000..a0049133 --- /dev/null +++ b/lib/zitadel/client/models/send_code2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendCode2 + attr_accessor :send_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendCode2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendCode2`. Please check the 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'] + else + self.send_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 @send_code.nil? + invalid_properties.push('invalid value for "send_code", send_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 @send_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceSendEmailVerificationCode] send_code Value to be assigned + def send_code=(send_code) + if send_code.nil? + fail ArgumentError, 'send_code cannot be nil' + end + + @send_code = send_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 && + send_code == o.send_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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_code3.rb b/lib/zitadel/client/models/send_code3.rb new file mode 100644 index 00000000..628115ae --- /dev/null +++ b/lib/zitadel/client/models/send_code3.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendCode3 + attr_accessor :send_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'UserServiceSendPhoneVerificationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendCode3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendCode3`. Please check the 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'] + else + self.send_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 @send_code.nil? + invalid_properties.push('invalid value for "send_code", send_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 @send_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceSendPhoneVerificationCode] send_code Value to be assigned + def send_code=(send_code) + if send_code.nil? + fail ArgumentError, 'send_code cannot be nil' + end + + @send_code = send_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 && + send_code == o.send_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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_code4.rb b/lib/zitadel/client/models/send_code4.rb new file mode 100644 index 00000000..7bf673ce --- /dev/null +++ b/lib/zitadel/client/models/send_code4.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendCode4 + attr_accessor :send_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendCode4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendCode4`. Please check the 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'] + else + self.send_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 @send_code.nil? + invalid_properties.push('invalid value for "send_code", send_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 @send_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceSendInviteCode] send_code Value to be assigned + def send_code=(send_code) + if send_code.nil? + fail ArgumentError, 'send_code cannot be nil' + end + + @send_code = send_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 && + send_code == o.send_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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_code5.rb b/lib/zitadel/client/models/send_code5.rb new file mode 100644 index 00000000..42630ac2 --- /dev/null +++ b/lib/zitadel/client/models/send_code5.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendCode5 + attr_accessor :send_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaUserServiceSendEmailVerificationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendCode5` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendCode5`. Please check the 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'] + else + self.send_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 @send_code.nil? + invalid_properties.push('invalid value for "send_code", send_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 @send_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceSendEmailVerificationCode] send_code Value to be assigned + def send_code=(send_code) + if send_code.nil? + fail ArgumentError, 'send_code cannot be nil' + end + + @send_code = send_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 && + send_code == o.send_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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_code6.rb b/lib/zitadel/client/models/send_code6.rb new file mode 100644 index 00000000..8bab0c48 --- /dev/null +++ b/lib/zitadel/client/models/send_code6.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendCode6 + attr_accessor :send_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_code' => :'sendCode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaUserServiceSendPhoneVerificationCode' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendCode6` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendCode6`. Please check the 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'] + else + self.send_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 @send_code.nil? + invalid_properties.push('invalid value for "send_code", send_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 @send_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceSendPhoneVerificationCode] send_code Value to be assigned + def send_code=(send_code) + if send_code.nil? + fail ArgumentError, 'send_code cannot be nil' + end + + @send_code = send_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 && + send_code == o.send_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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_link.rb b/lib/zitadel/client/models/send_link.rb new file mode 100644 index 00000000..3eaca1c1 --- /dev/null +++ b/lib/zitadel/client/models/send_link.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendLink + attr_accessor :send_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_link' => :'sendLink' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendLink` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendLink`. Please check the 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'] + else + self.send_link = 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 @send_link.nil? + invalid_properties.push('invalid value for "send_link", send_link 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 @send_link.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceSendPasskeyRegistrationLink] send_link Value to be assigned + def send_link=(send_link) + if send_link.nil? + fail ArgumentError, 'send_link cannot be nil' + end + + @send_link = send_link + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_link1.rb b/lib/zitadel/client/models/send_link1.rb new file mode 100644 index 00000000..8a37d84b --- /dev/null +++ b/lib/zitadel/client/models/send_link1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendLink1 + attr_accessor :send_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_link' => :'sendLink' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendLink1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendLink1`. Please check the 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'] + else + self.send_link = 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 @send_link.nil? + invalid_properties.push('invalid value for "send_link", send_link 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 @send_link.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceSendPasswordResetLink] send_link Value to be assigned + def send_link=(send_link) + if send_link.nil? + fail ArgumentError, 'send_link cannot be nil' + end + + @send_link = send_link + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_link2.rb b/lib/zitadel/client/models/send_link2.rb new file mode 100644 index 00000000..1c97292a --- /dev/null +++ b/lib/zitadel/client/models/send_link2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendLink2 + attr_accessor :send_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_link' => :'sendLink' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaUserServiceSendPasskeyRegistrationLink' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendLink2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendLink2`. Please check the 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'] + else + self.send_link = 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 @send_link.nil? + invalid_properties.push('invalid value for "send_link", send_link 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 @send_link.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceSendPasskeyRegistrationLink] send_link Value to be assigned + def send_link=(send_link) + if send_link.nil? + fail ArgumentError, 'send_link cannot be nil' + end + + @send_link = send_link + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/send_link3.rb b/lib/zitadel/client/models/send_link3.rb new file mode 100644 index 00000000..4a289dea --- /dev/null +++ b/lib/zitadel/client/models/send_link3.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class SendLink3 + attr_accessor :send_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_link' => :'sendLink' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaUserServiceSendPasswordResetLink' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SendLink3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SendLink3`. Please check the 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'] + else + self.send_link = 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 @send_link.nil? + invalid_properties.push('invalid value for "send_link", send_link 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 @send_link.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceSendPasswordResetLink] send_link Value to be assigned + def send_link=(send_link) + if send_link.nil? + fail ArgumentError, 'send_link cannot be nil' + end + + @send_link = send_link + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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.rb b/lib/zitadel/client/models/session.rb new file mode 100644 index 00000000..aaf229ce --- /dev/null +++ b/lib/zitadel/client/models/session.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Session + 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' => :'OIDCServiceSession' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Session` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Session`. Please check the 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'] + else + self.session = 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 @session.nil? + invalid_properties.push('invalid value for "session", session 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 @session.nil? + true + end + + # Custom attribute writer method with validation + # @param [OIDCServiceSession] session Value to be assigned + def session=(session) + if session.nil? + fail ArgumentError, 'session cannot be nil' + end + + @session = session + end + + # 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/session1.rb b/lib/zitadel/client/models/session1.rb new file mode 100644 index 00000000..9a31bff9 --- /dev/null +++ b/lib/zitadel/client/models/session1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Session1 + 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' => :'SAMLServiceSession' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Session1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Session1`. Please check the 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'] + else + self.session = 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 @session.nil? + invalid_properties.push('invalid value for "session", session 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 @session.nil? + true + end + + # Custom attribute writer method with validation + # @param [SAMLServiceSession] session Value to be assigned + def session=(session) + if session.nil? + fail ArgumentError, 'session cannot be nil' + end + + @session = session + end + + # 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/session2.rb b/lib/zitadel/client/models/session2.rb new file mode 100644 index 00000000..5ed92b8c --- /dev/null +++ b/lib/zitadel/client/models/session2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Session2 + 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' => :'BetaOIDCServiceSession' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Session2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Session2`. Please check the 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'] + else + self.session = 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 @session.nil? + invalid_properties.push('invalid value for "session", session 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 @session.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaOIDCServiceSession] session Value to be assigned + def session=(session) + if session.nil? + fail ArgumentError, 'session cannot be nil' + end + + @session = session + end + + # 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_any.rb b/lib/zitadel/client/models/session_service_any.rb new file mode 100644 index 00000000..6139c1e5 --- /dev/null +++ b/lib/zitadel/client/models/session_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class SessionServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::SessionServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..8717a6d9 --- /dev/null +++ b/lib/zitadel/client/models/session_service_challenges.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 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' => :'SessionServiceWebAuthN', + :'otp_sms' => :'String', + :'otp_email' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'otp_sms', + :'otp_email' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_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..e7af7efd --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_i_d_p_intent.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 SessionServiceCheckIDPIntent + attr_accessor :idp_intent_id + + 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..0aa725b7 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_o_t_p.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 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..fed3c1a4 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_password.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 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..9b19783f --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_t_o_t_p.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 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..5a6b300d --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_user.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module SessionServiceCheckUser + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'LoginName', + :'UserId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..3fa65b73 --- /dev/null +++ b/lib/zitadel/client/models/session_service_check_web_auth_n.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 SessionServiceCheckWebAuthN + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + 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' => :'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::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') + if (value = attributes[:'credential_assertion_data']).is_a?(Hash) + self.credential_assertion_data = value + end + 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 [Hash] 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_connect_error.rb b/lib/zitadel/client/models/session_service_connect_error.rb new file mode 100644 index 00000000..e0b99b47 --- /dev/null +++ b/lib/zitadel/client/models/session_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class SessionServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'SessionServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..dc67294b --- /dev/null +++ b/lib/zitadel/client/models/session_service_create_session_request.rb @@ -0,0 +1,269 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + + attr_accessor :metadata + + attr_accessor :challenges + + attr_accessor :user_agent + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + 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..314de2e8 --- /dev/null +++ b/lib/zitadel/client/models/session_service_create_session_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 SessionServiceCreateSessionResponse + attr_accessor :details + + attr_accessor :session_id + + 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_delete_session_request.rb b/lib/zitadel/client/models/session_service_delete_session_request.rb new file mode 100644 index 00000000..d90b4733 --- /dev/null +++ b/lib/zitadel/client/models/session_service_delete_session_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 SessionServiceDeleteSessionRequest + attr_accessor :session_id + + 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([ + :'session_token' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_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..97b09d68 --- /dev/null +++ b/lib/zitadel/client/models/session_service_details.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 SessionServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_request.rb b/lib/zitadel/client/models/session_service_get_session_request.rb new file mode 100644 index 00000000..d8df75d7 --- /dev/null +++ b/lib/zitadel/client/models/session_service_get_session_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 SessionServiceGetSessionRequest + attr_accessor :session_id + + 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([ + :'session_token' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SessionServiceGetSessionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceGetSessionRequest`. Please check the 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_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_header_values.rb b/lib/zitadel/client/models/session_service_header_values.rb new file mode 100644 index 00000000..485ae2f8 --- /dev/null +++ b/lib/zitadel/client/models/session_service_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 SessionServiceHeaderValues + 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::SessionServiceHeaderValues` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceHeaderValues`. Please check the 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_intent_factor.rb b/lib/zitadel/client/models/session_service_intent_factor.rb new file mode 100644 index 00000000..702d20ea --- /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 + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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..abb22678 --- /dev/null +++ b/lib/zitadel/client/models/session_service_list_details.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 SessionServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'processed_sequence' => :'Object', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'processed_sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..3b4e1a15 --- /dev/null +++ b/lib/zitadel/client/models/session_service_list_query.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 SessionServiceListQuery + attr_accessor :offset + + attr_accessor :limit + + 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' => :'Object', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'offset', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..103b1715 --- /dev/null +++ b/lib/zitadel/client/models/session_service_list_sessions_request.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 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_factor.rb b/lib/zitadel/client/models/session_service_o_t_p_factor.rb new file mode 100644 index 00000000..011707fc --- /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 + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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_o_t_p_s_m_s.rb b/lib/zitadel/client/models/session_service_o_t_p_s_m_s.rb new file mode 100644 index 00000000..e4a9b641 --- /dev/null +++ b/lib/zitadel/client/models/session_service_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 SessionServiceOTPSMS + 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::SessionServiceOTPSMS` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceOTPSMS`. Please check the 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_otp_email.rb b/lib/zitadel/client/models/session_service_otp_email.rb new file mode 100644 index 00000000..18db1c9b --- /dev/null +++ b/lib/zitadel/client/models/session_service_otp_email.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module SessionServiceOTPEmail + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode1', + :'SendCode1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..eb9854e5 --- /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 + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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_request_challenges.rb b/lib/zitadel/client/models/session_service_request_challenges.rb new file mode 100644 index 00000000..5286e506 --- /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' => :'SessionServiceWebAuthN', + :'otp_sms' => :'SessionServiceOTPSMS', + :'otp_email' => :'SessionServiceOTPEmail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_search_query.rb b/lib/zitadel/client/models/session_service_search_query.rb new file mode 100644 index 00000000..b5dd9efe --- /dev/null +++ b/lib/zitadel/client/models/session_service_search_query.rb @@ -0,0 +1,113 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module SessionServiceSearchQuery + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CreationDateQuery1', + :'CreatorQuery', + :'IdsQuery1', + :'UserAgentQuery', + :'UserIdQuery1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..b993eab4 --- /dev/null +++ b/lib/zitadel/client/models/session_service_session.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 SessionServiceSession + attr_accessor :id + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :creation_date + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + attr_accessor :sequence + + attr_accessor :factors + + attr_accessor :metadata + + attr_accessor :user_agent + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'factors' => :'SessionServiceFactors', + :'metadata' => :'Hash', + :'user_agent' => :'SessionServiceUserAgent', + :'expiration_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..b98c486b --- /dev/null +++ b/lib/zitadel/client/models/session_service_set_session_request.rb @@ -0,0 +1,278 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + attr_accessor :session_id + + attr_accessor :session_token + + attr_accessor :checks + + attr_accessor :metadata + + attr_accessor :challenges + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :lifetime + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'session_id' => :'sessionId', + :'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_id' => :'String', + :'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_id') + self.session_id = attributes[:'session_id'] + end + + 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + 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_id, 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..a9cee80a --- /dev/null +++ b/lib/zitadel/client/models/session_service_set_session_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 SessionServiceSetSessionResponse + attr_accessor :details + + 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..a6b336d9 --- /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 + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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_user_agent.rb b/lib/zitadel/client/models/session_service_user_agent.rb new file mode 100644 index 00000000..db87bda0 --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_agent.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 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([ + :'fingerprint_id', + :'ip', + :'description', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_factor.rb b/lib/zitadel/client/models/session_service_user_factor.rb new file mode 100644 index 00000000..1db8cbf6 --- /dev/null +++ b/lib/zitadel/client/models/session_service_user_factor.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 SessionServiceUserFactor + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :verified_at + + attr_accessor :id + + attr_accessor :login_name + + attr_accessor :display_name + + 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_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_value.rb b/lib/zitadel/client/models/session_service_value.rb new file mode 100644 index 00000000..f621f0df --- /dev/null +++ b/lib/zitadel/client/models/session_service_value.rb @@ -0,0 +1,114 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +# `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. +module SessionServiceValue + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Array', + :'Boolean', + :'Float', + :'Hash', + :'String' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/session_service_web_auth_n.rb b/lib/zitadel/client/models/session_service_web_auth_n.rb new file mode 100644 index 00000000..b3927ebb --- /dev/null +++ b/lib/zitadel/client/models/session_service_web_auth_n.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 SessionServiceWebAuthN + 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::SessionServiceWebAuthN` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SessionServiceWebAuthN`. Please check the 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 = 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 @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 [String] 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 [SessionServiceUserVerificationRequirement] 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_web_auth_n_factor.rb b/lib/zitadel/client/models/session_service_web_auth_n_factor.rb new file mode 100644 index 00000000..4c999c41 --- /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 + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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_any.rb b/lib/zitadel/client/models/settings_service_any.rb new file mode 100644 index 00000000..d55b308b --- /dev/null +++ b/lib/zitadel/client/models/settings_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class SettingsServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::SettingsServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..1db53c0b --- /dev/null +++ b/lib/zitadel/client/models/settings_service_branding_settings.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 SettingsServiceBrandingSettings + attr_accessor :light_theme + + attr_accessor :dark_theme + + 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 + + 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'] + end + + if attributes.key?(:'theme_mode') + self.theme_mode = attributes[:'theme_mode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_connect_error.rb b/lib/zitadel/client/models/settings_service_connect_error.rb new file mode 100644 index 00000000..76ac55bc --- /dev/null +++ b/lib/zitadel/client/models/settings_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class SettingsServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'SettingsServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..624af636 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_details.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 SettingsServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..5a11bfa4 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_domain_settings.rb @@ -0,0 +1,279 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + attr_accessor :login_name_includes_domain + + attr_accessor :require_org_domain_verification + + 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..e52fac89 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_embedded_iframe_settings.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 SettingsServiceEmbeddedIframeSettings + attr_accessor :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_request.rb b/lib/zitadel/client/models/settings_service_get_active_identity_providers_request.rb new file mode 100644 index 00000000..25751a7b --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_active_identity_providers_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 SettingsServiceGetActiveIdentityProvidersRequest + attr_accessor :ctx + + attr_accessor :creation_allowed + + attr_accessor :linking_allowed + + attr_accessor :auto_creation + + attr_accessor :auto_linking + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx', + :'creation_allowed' => :'creationAllowed', + :'linking_allowed' => :'linkingAllowed', + :'auto_creation' => :'autoCreation', + :'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 + { + :'ctx' => :'SettingsServiceRequestContext', + :'creation_allowed' => :'Boolean', + :'linking_allowed' => :'Boolean', + :'auto_creation' => :'Boolean', + :'auto_linking' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'creation_allowed', + :'linking_allowed', + :'auto_creation', + :'auto_linking' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetActiveIdentityProvidersRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetActiveIdentityProvidersRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + + if attributes.key?(:'creation_allowed') + self.creation_allowed = attributes[:'creation_allowed'] + end + + if attributes.key?(:'linking_allowed') + self.linking_allowed = attributes[:'linking_allowed'] + end + + if attributes.key?(:'auto_creation') + self.auto_creation = attributes[:'auto_creation'] + end + + if attributes.key?(:'auto_linking') + self.auto_linking = attributes[:'auto_linking'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx && + creation_allowed == o.creation_allowed && + linking_allowed == o.linking_allowed && + auto_creation == o.auto_creation && + 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 + [ctx, creation_allowed, linking_allowed, auto_creation, 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_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_request.rb b/lib/zitadel/client/models/settings_service_get_branding_settings_request.rb new file mode 100644 index 00000000..a2c13122 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_branding_settings_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 SettingsServiceGetBrandingSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'SettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetBrandingSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetBrandingSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_request.rb b/lib/zitadel/client/models/settings_service_get_domain_settings_request.rb new file mode 100644 index 00000000..86191cba --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_domain_settings_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 SettingsServiceGetDomainSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'SettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetDomainSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetDomainSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..0a79ef50 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_general_settings_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 SettingsServiceGetGeneralSettingsResponse + attr_accessor :default_org_id + + 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_request.rb b/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_request.rb new file mode 100644 index 00000000..596da15c --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_legal_and_support_settings_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 SettingsServiceGetLegalAndSupportSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'SettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLegalAndSupportSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLegalAndSupportSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_request.rb b/lib/zitadel/client/models/settings_service_get_lockout_settings_request.rb new file mode 100644 index 00000000..08d3c0df --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_lockout_settings_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 SettingsServiceGetLockoutSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'SettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLockoutSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLockoutSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_request.rb b/lib/zitadel/client/models/settings_service_get_login_settings_request.rb new file mode 100644 index 00000000..bfa69046 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_login_settings_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 SettingsServiceGetLoginSettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'SettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetLoginSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetLoginSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_request.rb b/lib/zitadel/client/models/settings_service_get_password_complexity_settings_request.rb new file mode 100644 index 00000000..5caabc53 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_password_complexity_settings_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 SettingsServiceGetPasswordComplexitySettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'SettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetPasswordComplexitySettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetPasswordComplexitySettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_request.rb b/lib/zitadel/client/models/settings_service_get_password_expiry_settings_request.rb new file mode 100644 index 00000000..97911576 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_get_password_expiry_settings_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 SettingsServiceGetPasswordExpirySettingsRequest + attr_accessor :ctx + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ctx' => :'ctx' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ctx' => :'SettingsServiceRequestContext' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::SettingsServiceGetPasswordExpirySettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::SettingsServiceGetPasswordExpirySettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ctx') + self.ctx = attributes[:'ctx'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ctx == o.ctx + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ctx].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..6d2dd477 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_identity_provider.rb @@ -0,0 +1,279 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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'] + 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..21b29118 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_legal_and_support_settings.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 SettingsServiceLegalAndSupportSettings + attr_accessor :tos_link + + attr_accessor :privacy_policy_link + + attr_accessor :help_link + + attr_accessor :support_email + + attr_accessor :resource_owner_type + + attr_accessor :docs_link + + attr_accessor :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'] + 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..9f1d9ea4 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_list_details.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 SettingsServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'processed_sequence' => :'Object', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'processed_sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..b5974e02 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_lockout_settings.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 SettingsServiceLockoutSettings + attr_accessor :max_password_attempts + + attr_accessor :resource_owner_type + + 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' => :'Object', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType', + :'max_otp_attempts' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'max_password_attempts', + :'max_otp_attempts' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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'] + 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..26bd1974 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_login_settings.rb @@ -0,0 +1,433 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + attr_accessor :allow_username_password + + attr_accessor :allow_register + + attr_accessor :allow_external_idp + + attr_accessor :force_mfa + + attr_accessor :passkeys_type + + attr_accessor :hide_password_reset + + attr_accessor :ignore_unknown_usernames + + attr_accessor :default_redirect_uri + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :password_check_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :external_login_check_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :mfa_init_skip_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + attr_accessor :second_factor_check_lifetime + + # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\". + 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 + + attr_accessor :disable_login_with_email + + attr_accessor :disable_login_with_phone + + attr_accessor :resource_owner_type + + 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'] + 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'] + 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..28d0cc41 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_options.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 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..c9f6c7fa --- /dev/null +++ b/lib/zitadel/client/models/settings_service_password_complexity_settings.rb @@ -0,0 +1,298 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + attr_accessor :min_length + + attr_accessor :requires_uppercase + + attr_accessor :requires_lowercase + + attr_accessor :requires_number + + 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' => :'Object', + :'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([ + :'min_length', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..a729fd02 --- /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' => :'Object', + :'expire_warn_days' => :'Object', + :'resource_owner_type' => :'SettingsServiceResourceOwnerType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'max_age_days', + :'expire_warn_days', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_request_context.rb b/lib/zitadel/client/models/settings_service_request_context.rb new file mode 100644 index 00000000..42429694 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_request_context.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module SettingsServiceRequestContext + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Instance', + :'OrgId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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_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..dbd67507 --- /dev/null +++ b/lib/zitadel/client/models/settings_service_security_settings.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 SettingsServiceSecuritySettings + attr_accessor :embedded_iframe + + 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..ea21f75f --- /dev/null +++ b/lib/zitadel/client/models/settings_service_set_security_settings_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 SettingsServiceSetSecuritySettingsRequest + attr_accessor :embedded_iframe + + 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..478b2121 --- /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 warning color + attr_accessor :warn_color + + # hex value for font color + attr_accessor :font_color + + # url where the logo is served + attr_accessor :logo_url + + # url where the icon is served + 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/state_query.rb b/lib/zitadel/client/models/state_query.rb new file mode 100644 index 00000000..c5422ce4 --- /dev/null +++ b/lib/zitadel/client/models/state_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class StateQuery + attr_accessor :state_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state_query' => :'stateQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceStateQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::StateQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::StateQuery`. Please check the 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_query') + self.state_query = attributes[:'state_query'] + else + self.state_query = 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 @state_query.nil? + invalid_properties.push('invalid value for "state_query", state_query 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_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceStateQuery] state_query Value to be assigned + def state_query=(state_query) + if state_query.nil? + fail ArgumentError, 'state_query cannot be nil' + end + + @state_query = state_query + end + + # 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_query == o.state_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 + [state_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/state_query1.rb b/lib/zitadel/client/models/state_query1.rb new file mode 100644 index 00000000..f56dced2 --- /dev/null +++ b/lib/zitadel/client/models/state_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class StateQuery1 + attr_accessor :state_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state_query' => :'stateQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'OrganizationServiceOrganizationStateQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::StateQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::StateQuery1`. Please check the 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_query') + self.state_query = attributes[:'state_query'] + else + self.state_query = 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 @state_query.nil? + invalid_properties.push('invalid value for "state_query", state_query 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_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [OrganizationServiceOrganizationStateQuery] state_query Value to be assigned + def state_query=(state_query) + if state_query.nil? + fail ArgumentError, 'state_query cannot be nil' + end + + @state_query = state_query + end + + # 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_query == o.state_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 + [state_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/state_query2.rb b/lib/zitadel/client/models/state_query2.rb new file mode 100644 index 00000000..5bb1a661 --- /dev/null +++ b/lib/zitadel/client/models/state_query2.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class StateQuery2 + attr_accessor :state_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state_query' => :'stateQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceStateQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::StateQuery2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::StateQuery2`. Please check the 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_query') + self.state_query = attributes[:'state_query'] + else + self.state_query = 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 @state_query.nil? + invalid_properties.push('invalid value for "state_query", state_query 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_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceStateQuery] state_query Value to be assigned + def state_query=(state_query) + if state_query.nil? + fail ArgumentError, 'state_query cannot be nil' + end + + @state_query = state_query + end + + # 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_query == o.state_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 + [state_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/target_filter.rb b/lib/zitadel/client/models/target_filter.rb new file mode 100644 index 00000000..407f0f1e --- /dev/null +++ b/lib/zitadel/client/models/target_filter.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class TargetFilter + attr_accessor :target_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target_filter' => :'targetFilter' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_filter' => :'BetaActionServiceTargetFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::TargetFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::TargetFilter`. Please check the 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_filter') + self.target_filter = attributes[:'target_filter'] + else + self.target_filter = 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 @target_filter.nil? + invalid_properties.push('invalid value for "target_filter", target_filter 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 @target_filter.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceTargetFilter] target_filter Value to be assigned + def target_filter=(target_filter) + if target_filter.nil? + fail ArgumentError, 'target_filter cannot be nil' + end + + @target_filter = target_filter + end + + # 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_filter == o.target_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_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/target_name_filter.rb b/lib/zitadel/client/models/target_name_filter.rb new file mode 100644 index 00000000..fd5c0b57 --- /dev/null +++ b/lib/zitadel/client/models/target_name_filter.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class TargetNameFilter + attr_accessor :target_name_filter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target_name_filter' => :'targetNameFilter' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaActionServiceTargetNameFilter' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::TargetNameFilter` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::TargetNameFilter`. Please check the 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'] + else + self.target_name_filter = 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 @target_name_filter.nil? + invalid_properties.push('invalid value for "target_name_filter", target_name_filter 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 @target_name_filter.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaActionServiceTargetNameFilter] target_name_filter Value to be assigned + def target_name_filter=(target_name_filter) + if target_name_filter.nil? + fail ArgumentError, 'target_name_filter cannot be nil' + end + + @target_name_filter = target_name_filter + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/type_query.rb b/lib/zitadel/client/models/type_query.rb new file mode 100644 index 00000000..7794118d --- /dev/null +++ b/lib/zitadel/client/models/type_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class TypeQuery + attr_accessor :type_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type_query' => :'typeQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'UserServiceTypeQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::TypeQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::TypeQuery`. Please check the 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_query') + self.type_query = attributes[:'type_query'] + else + self.type_query = 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 @type_query.nil? + invalid_properties.push('invalid value for "type_query", type_query 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_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceTypeQuery] type_query Value to be assigned + def type_query=(type_query) + if type_query.nil? + fail ArgumentError, 'type_query cannot be nil' + end + + @type_query = type_query + end + + # 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_query == o.type_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 + [type_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/type_query1.rb b/lib/zitadel/client/models/type_query1.rb new file mode 100644 index 00000000..ff578b46 --- /dev/null +++ b/lib/zitadel/client/models/type_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class TypeQuery1 + attr_accessor :type_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type_query' => :'typeQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaUserServiceTypeQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::TypeQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::TypeQuery1`. Please check the 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_query') + self.type_query = attributes[:'type_query'] + else + self.type_query = 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 @type_query.nil? + invalid_properties.push('invalid value for "type_query", type_query 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_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceTypeQuery] type_query Value to be assigned + def type_query=(type_query) + if type_query.nil? + fail ArgumentError, 'type_query cannot be nil' + end + + @type_query = type_query + end + + # 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_query == o.type_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 + [type_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/u2f.rb b/lib/zitadel/client/models/u2f.rb new file mode 100644 index 00000000..34627279 --- /dev/null +++ b/lib/zitadel/client/models/u2f.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class U2f + attr_accessor :u2f + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'u2f' => :'u2f' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'u2f' => :'UserServiceAuthFactorU2F' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::U2f` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::U2f`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'u2f') + self.u2f = attributes[:'u2f'] + else + self.u2f = 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 @u2f.nil? + invalid_properties.push('invalid value for "u2f", u2f 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 @u2f.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceAuthFactorU2F] u2f Value to be assigned + def u2f=(u2f) + if u2f.nil? + fail ArgumentError, 'u2f cannot be nil' + end + + @u2f = u2f + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + u2f == o.u2f + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [u2f].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/urls.rb b/lib/zitadel/client/models/urls.rb new file mode 100644 index 00000000..283bebec --- /dev/null +++ b/lib/zitadel/client/models/urls.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Urls + attr_accessor :urls + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'urls' => :'urls' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'urls' => :'UserServiceRedirectURLs' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Urls` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Urls`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'urls') + self.urls = attributes[:'urls'] + else + self.urls = 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 @urls.nil? + invalid_properties.push('invalid value for "urls", urls 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 @urls.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceRedirectURLs] urls Value to be assigned + def urls=(urls) + if urls.nil? + fail ArgumentError, 'urls cannot be nil' + end + + @urls = urls + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + urls == o.urls + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [urls].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end +end + + end + +end diff --git a/lib/zitadel/client/models/urls1.rb b/lib/zitadel/client/models/urls1.rb new file mode 100644 index 00000000..fc69d728 --- /dev/null +++ b/lib/zitadel/client/models/urls1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class Urls1 + attr_accessor :urls + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'urls' => :'urls' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'urls' => :'BetaUserServiceRedirectURLs' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::Urls1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::Urls1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'urls') + self.urls = attributes[:'urls'] + else + self.urls = 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 @urls.nil? + invalid_properties.push('invalid value for "urls", urls 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 @urls.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceRedirectURLs] urls Value to be assigned + def urls=(urls) + if urls.nil? + fail ArgumentError, 'urls cannot be nil' + end + + @urls = urls + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + urls == o.urls + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [urls].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_agent_query.rb b/lib/zitadel/client/models/user_agent_query.rb new file mode 100644 index 00000000..4940319f --- /dev/null +++ b/lib/zitadel/client/models/user_agent_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserAgentQuery + attr_accessor :user_agent_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserAgentQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserAgentQuery`. Please check the 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_agent_query') + self.user_agent_query = attributes[:'user_agent_query'] + else + self.user_agent_query = 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 @user_agent_query.nil? + invalid_properties.push('invalid value for "user_agent_query", user_agent_query 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 @user_agent_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [SessionServiceUserAgentQuery] user_agent_query Value to be assigned + def user_agent_query=(user_agent_query) + if user_agent_query.nil? + fail ArgumentError, 'user_agent_query cannot be nil' + end + + @user_agent_query = user_agent_query + end + + # 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_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 + [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/user_id.rb b/lib/zitadel/client/models/user_id.rb new file mode 100644 index 00000000..dabb17d0 --- /dev/null +++ b/lib/zitadel/client/models/user_id.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserId + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserId` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserId`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_id_query.rb b/lib/zitadel/client/models/user_id_query.rb new file mode 100644 index 00000000..0b407235 --- /dev/null +++ b/lib/zitadel/client/models/user_id_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserIdQuery + attr_accessor :user_id_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id_query' => :'userIdQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'BetaSessionServiceUserIDQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserIdQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserIdQuery`. Please check the 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_query') + self.user_id_query = attributes[:'user_id_query'] + else + self.user_id_query = 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 @user_id_query.nil? + invalid_properties.push('invalid value for "user_id_query", user_id_query 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 @user_id_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaSessionServiceUserIDQuery] user_id_query Value to be assigned + def user_id_query=(user_id_query) + if user_id_query.nil? + fail ArgumentError, 'user_id_query cannot be nil' + end + + @user_id_query = user_id_query + end + + # 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_query == o.user_id_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_id_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_id_query1.rb b/lib/zitadel/client/models/user_id_query1.rb new file mode 100644 index 00000000..a0de3c83 --- /dev/null +++ b/lib/zitadel/client/models/user_id_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserIdQuery1 + attr_accessor :user_id_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id_query' => :'userIdQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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_query' => :'SessionServiceUserIDQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserIdQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserIdQuery1`. Please check the 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_query') + self.user_id_query = attributes[:'user_id_query'] + else + self.user_id_query = 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 @user_id_query.nil? + invalid_properties.push('invalid value for "user_id_query", user_id_query 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 @user_id_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [SessionServiceUserIDQuery] user_id_query Value to be assigned + def user_id_query=(user_id_query) + if user_id_query.nil? + fail ArgumentError, 'user_id_query cannot be nil' + end + + @user_id_query = user_id_query + end + + # 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_query == o.user_id_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_id_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_name_query.rb b/lib/zitadel/client/models/user_name_query.rb new file mode 100644 index 00000000..193a6db2 --- /dev/null +++ b/lib/zitadel/client/models/user_name_query.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserNameQuery + attr_accessor :user_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_name_query' => :'userNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserNameQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserNameQuery`. Please check the 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'] + else + self.user_name_query = 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 @user_name_query.nil? + invalid_properties.push('invalid value for "user_name_query", user_name_query 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 @user_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceUserNameQuery] user_name_query Value to be assigned + def user_name_query=(user_name_query) + if user_name_query.nil? + fail ArgumentError, 'user_name_query cannot be nil' + end + + @user_name_query = user_name_query + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_name_query1.rb b/lib/zitadel/client/models/user_name_query1.rb new file mode 100644 index 00000000..81671712 --- /dev/null +++ b/lib/zitadel/client/models/user_name_query1.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserNameQuery1 + attr_accessor :user_name_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_name_query' => :'userNameQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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' => :'BetaUserServiceUserNameQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserNameQuery1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserNameQuery1`. Please check the 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'] + else + self.user_name_query = 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 @user_name_query.nil? + invalid_properties.push('invalid value for "user_name_query", user_name_query 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 @user_name_query.nil? + true + end + + # Custom attribute writer method with validation + # @param [BetaUserServiceUserNameQuery] user_name_query Value to be assigned + def user_name_query=(user_name_query) + if user_name_query.nil? + fail ArgumentError, 'user_name_query cannot be nil' + end + + @user_name_query = user_name_query + end + + # 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 + end + + # @see the `==` method + # @param [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].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_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..edcd2857 --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_human_user_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceAddHumanUserRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'HashedPassword', + :'Password' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..37e66be5 --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_human_user_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 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([ + :'email_code', + :'phone_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..e0e3d2bf --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_i_d_p_link_request.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 :user_id + + attr_accessor :idp_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = nil + end + + 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 + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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_request.rb b/lib/zitadel/client/models/user_service_add_o_t_p_email_request.rb new file mode 100644 index 00000000..173ed44d --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_o_t_p_email_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddOTPEmailRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceAddOTPEmailRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddOTPEmailRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_request.rb b/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_request.rb new file mode 100644 index 00000000..a9d33e1f --- /dev/null +++ b/lib/zitadel/client/models/user_service_add_o_t_p_s_m_s_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceAddOTPSMSRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceAddOTPSMSRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAddOTPSMSRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_any.rb b/lib/zitadel/client/models/user_service_any.rb new file mode 100644 index 00000000..5bb48810 --- /dev/null +++ b/lib/zitadel/client/models/user_service_any.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 + # Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + class UserServiceAny + attr_accessor :type + + attr_accessor :value + + attr_accessor :debug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value', + :'debug' => :'debug' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'value' => :'File', + :'debug' => :'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::UserServiceAny` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceAny`. Please check the 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 + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'debug') + if (value = attributes[:'debug']).is_a?(Hash) + self.debug = 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 && + type == o.type && + value == o.value && + debug == o.debug + end + + # @see the `==` method + # @param [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, value, debug].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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..08a9c7b1 --- /dev/null +++ b/lib/zitadel/client/models/user_service_auth_factor.rb @@ -0,0 +1,112 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceAuthFactor + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Otp', + :'OtpEmail', + :'OtpSms', + :'U2f' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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_factors.rb b/lib/zitadel/client/models/user_service_auth_factors.rb new file mode 100644 index 00000000..de89236f --- /dev/null +++ b/lib/zitadel/client/models/user_service_auth_factors.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 UserServiceAuthFactors + OTP = "OTP".freeze + OTP_SMS = "OTP_SMS".freeze + OTP_EMAIL = "OTP_EMAIL".freeze + U2_F = "U2F".freeze + + def self.all_vars + @all_vars ||= [OTP, OTP_SMS, OTP_EMAIL, U2_F].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 UserServiceAuthFactors.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::UserServiceAuthFactors" + 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_connect_error.rb b/lib/zitadel/client/models/user_service_connect_error.rb new file mode 100644 index 00000000..7db1ec76 --- /dev/null +++ b/lib/zitadel/client/models/user_service_connect_error.rb @@ -0,0 +1,285 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + # Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + class UserServiceConnectError + # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + attr_accessor :message + + attr_accessor :detail + + 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', + :'message' => :'message', + :'detail' => :'detail' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'message' => :'String', + :'detail' => :'UserServiceAny' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceConnectError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceConnectError`. Please check the 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?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + return false unless code_validator.valid?(@code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + 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 && + message == o.message && + detail == o.detail + end + + # @see the `==` method + # @param [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, detail].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_request.rb b/lib/zitadel/client/models/user_service_create_invite_code_request.rb new file mode 100644 index 00000000..647ce875 --- /dev/null +++ b/lib/zitadel/client/models/user_service_create_invite_code_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceCreateInviteCodeRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode6', + :'SendCode4' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..e6b6d0a2 --- /dev/null +++ b/lib/zitadel/client/models/user_service_create_invite_code_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 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([ + :'invite_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..f7635c9d --- /dev/null +++ b/lib/zitadel/client/models/user_service_create_passkey_registration_link_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceCreatePasskeyRegistrationLinkRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode4', + :'SendLink' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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_request.rb b/lib/zitadel/client/models/user_service_deactivate_user_request.rb new file mode 100644 index 00000000..4920b7a4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_deactivate_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceDeactivateUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceDeactivateUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDeactivateUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_request.rb b/lib/zitadel/client/models/user_service_delete_user_request.rb new file mode 100644 index 00000000..ce7daaa7 --- /dev/null +++ b/lib/zitadel/client/models/user_service_delete_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceDeleteUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceDeleteUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDeleteUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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..6d22d584 --- /dev/null +++ b/lib/zitadel/client/models/user_service_details.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 UserServiceDetails + # sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation + attr_accessor :sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :change_date + + # resource_owner is the organization or instance_id an object belongs to + attr_accessor :resource_owner + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'change_date' => :'Time', + :'resource_owner' => :'String', + :'creation_date' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_domain_query.rb b/lib/zitadel/client/models/user_service_domain_query.rb new file mode 100644 index 00000000..0707114c --- /dev/null +++ b/lib/zitadel/client/models/user_service_domain_query.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 UserServiceDomainQuery + # List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. + attr_accessor :include_without_domain + + # List only auth methods with specific domain. + attr_accessor :domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'include_without_domain' => :'includeWithoutDomain', + :'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 + { + :'include_without_domain' => :'Boolean', + :'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::UserServiceDomainQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceDomainQuery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'include_without_domain') + self.include_without_domain = attributes[:'include_without_domain'] + 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 && + include_without_domain == o.include_without_domain && + 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 + [include_without_domain, 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_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_request.rb b/lib/zitadel/client/models/user_service_get_user_by_i_d_request.rb new file mode 100644 index 00000000..f945c729 --- /dev/null +++ b/lib/zitadel/client/models/user_service_get_user_by_i_d_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceGetUserByIDRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceGetUserByIDRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceGetUserByIDRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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..c6dc3c69 --- /dev/null +++ b/lib/zitadel/client/models/user_service_hashed_password.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] hash Value to be assigned + def hash=(hash) + if hash.nil? + fail ArgumentError, 'hash cannot be nil' + 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..fb24fb28 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_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 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_request.rb b/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_request.rb new file mode 100644 index 00000000..ac3d1b4f --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_m_f_a_init_skipped_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceHumanMFAInitSkippedRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceHumanMFAInitSkippedRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceHumanMFAInitSkippedRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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..07338585 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_phone.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 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..e7d8eca4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_profile.rb @@ -0,0 +1,309 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + + 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([ + :'nick_name', + :'display_name', + :'preferred_language', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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'] + 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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..583face4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_human_user.rb @@ -0,0 +1,351 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + attr_accessor :password_changed + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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'] + 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_link.rb b/lib/zitadel/client/models/user_service_i_d_p_link.rb new file mode 100644 index 00000000..862ba7b0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_i_d_p_link.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 UserServiceIDPLink + attr_accessor :idp_id + + attr_accessor :user_id + + 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_idp_information.rb b/lib/zitadel/client/models/user_service_idp_information.rb new file mode 100644 index 00000000..8eaec826 --- /dev/null +++ b/lib/zitadel/client/models/user_service_idp_information.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceIDPInformation + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Ldap2', + :'Oauth1', + :'Saml1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/user_service_list_authentication_factors_request.rb b/lib/zitadel/client/models/user_service_list_authentication_factors_request.rb new file mode 100644 index 00000000..0335b047 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_authentication_factors_request.rb @@ -0,0 +1,269 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListAuthenticationFactorsRequest + attr_accessor :user_id + + attr_accessor :auth_factors + + attr_accessor :states + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'auth_factors' => :'authFactors', + :'states' => :'states' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'auth_factors' => :'Array', + :'states' => :'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::UserServiceListAuthenticationFactorsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListAuthenticationFactorsRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'auth_factors') + if (value = attributes[:'auth_factors']).is_a?(Array) + self.auth_factors = value + end + end + + if attributes.key?(:'states') + if (value = attributes[:'states']).is_a?(Array) + self.states = 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + auth_factors == o.auth_factors && + states == o.states + end + + # @see the `==` method + # @param [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, auth_factors, states].hash + end + +# Builds the object from hash +# @param [Hash] attributes Models attributes in the form of hash +# @return [Object] Returns the model itself +def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) # `new` will call the initialize method of the specific model class. +end + +# Deserializes the data based on type +# @param string type Data type +# @param string value Value to be deserialized +# @return [Object] Deserialized data +def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf/anyOf constructs that resolve to a model name + # MODIFIED: Ensure model is looked up in the Models namespace + # 'type' here is expected to be the simple class name (e.g., "User", "OrderDetails") + klass = Zitadel::Client::Models.const_get(type) + # The `klass.build` method is for oneOf/anyOf types (defined in partial_oneof_module.mustache / partial_anyof_module.mustache) + # The `klass.build_from_hash` is for regular model types (defined in this base_object.mustache itself) + if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_allOf) + klass.build(value) # For oneOf/anyOf/allOf, delegate to their specific build method + else + klass.build_from_hash(value) # For regular models + end + end +end + +# Returns the string representation of the object +# @return [String] String presentation of the object +def to_s + to_hash.to_s +end + +# to_body is an alias to to_hash (backward compatibility) +# @return [Hash] Returns the object in the form of hash +def to_body + to_hash +end + +# Returns the object in the form of hash +# @return [Hash] Returns the object in the form of hash +def to_hash + hash = {} # Calls super.to_hash if parent exists + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash +end + +# Outputs non-array value in the form of hash +# For object, use to_hash. Otherwise, just return the value +# @param [Object] value Any valid value +# @return [Hash] Returns the value in the form of hash +def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(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_request.rb b/lib/zitadel/client/models/user_service_list_authentication_method_types_request.rb new file mode 100644 index 00000000..db5c994a --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_authentication_method_types_request.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListAuthenticationMethodTypesRequest + attr_accessor :user_id + + attr_accessor :domain_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'domain_query' => :'domainQuery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'domain_query' => :'UserServiceDomainQuery' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "The input argument (attributes) must be a hash in `Zitadel::Client::Models::UserServiceListAuthenticationMethodTypesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListAuthenticationMethodTypesRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'domain_query') + self.domain_query = attributes[:'domain_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 + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + domain_query == o.domain_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_id, domain_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_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..613b6003 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_details.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 UserServiceListDetails + attr_accessor :total_result + + attr_accessor :processed_sequence + + # A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format. + 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' => :'Object', + :'processed_sequence' => :'Object', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_result', + :'processed_sequence', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..9e72cc65 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_i_d_p_links_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 UserServiceListIDPLinksRequest + attr_accessor :user_id + + attr_accessor :query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'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?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + 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 && + user_id == o.user_id && + 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 + [user_id, 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_request.rb b/lib/zitadel/client/models/user_service_list_passkeys_request.rb new file mode 100644 index 00000000..29e2e6e7 --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_passkeys_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceListPasskeysRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceListPasskeysRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceListPasskeysRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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..82bd15df --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_query.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 UserServiceListQuery + attr_accessor :offset + + attr_accessor :limit + + 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' => :'Object', + :'limit' => :'Integer', + :'asc' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'offset', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..038589cd --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_users_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 UserServiceListUsersRequest + attr_accessor :query + + attr_accessor :sorting_column + + # criteria the client is looking for + 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'] + 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..583920bd --- /dev/null +++ b/lib/zitadel/client/models/user_service_list_users_response.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 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'] + 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_request.rb b/lib/zitadel/client/models/user_service_lock_user_request.rb new file mode 100644 index 00000000..a3b11ddf --- /dev/null +++ b/lib/zitadel/client/models/user_service_lock_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceLockUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceLockUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceLockUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_machine_user.rb b/lib/zitadel/client/models/user_service_machine_user.rb new file mode 100644 index 00000000..d5a9e2f6 --- /dev/null +++ b/lib/zitadel/client/models/user_service_machine_user.rb @@ -0,0 +1,279 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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_organization.rb b/lib/zitadel/client/models/user_service_organization.rb new file mode 100644 index 00000000..2b11f482 --- /dev/null +++ b/lib/zitadel/client/models/user_service_organization.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceOrganization + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'OrgDomain', + :'OrgId' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..0648eb1e --- /dev/null +++ b/lib/zitadel/client/models/user_service_passkey.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 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'] + 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 && + 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..a1a2a20d --- /dev/null +++ b/lib/zitadel/client/models/user_service_passkey_registration_code.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 UserServicePasskeyRegistrationCode + attr_accessor :id + + 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 @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 @id.nil? + return false if @code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [String] 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 && + 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..c5d8527d --- /dev/null +++ b/lib/zitadel/client/models/user_service_password.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + 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..23c5ad8e --- /dev/null +++ b/lib/zitadel/client/models/user_service_password_reset_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServicePasswordResetRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode5', + :'SendLink1' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..6501271d --- /dev/null +++ b/lib/zitadel/client/models/user_service_password_reset_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 UserServicePasswordResetResponse + attr_accessor :details + + # in case the medium was set to return_code, the code will be returned + 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([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_reactivate_user_request.rb b/lib/zitadel/client/models/user_service_reactivate_user_request.rb new file mode 100644 index 00000000..1e20c4d2 --- /dev/null +++ b/lib/zitadel/client/models/user_service_reactivate_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceReactivateUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceReactivateUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceReactivateUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_register_passkey_request.rb b/lib/zitadel/client/models/user_service_register_passkey_request.rb new file mode 100644 index 00000000..716891d3 --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_passkey_request.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 UserServiceRegisterPasskeyRequest + attr_accessor :user_id + + attr_accessor :code + + attr_accessor :authenticator + + 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 + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'authenticator') + self.authenticator = attributes[:'authenticator'] + 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 + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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..fc525b4c --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_passkey_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 UserServiceRegisterPasskeyResponse + attr_accessor :details + + attr_accessor :passkey_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + 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' => :'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::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') + if (value = attributes[:'public_key_credential_creation_options']).is_a?(Hash) + self.public_key_credential_creation_options = 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 && + 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_request.rb b/lib/zitadel/client/models/user_service_register_t_o_t_p_request.rb new file mode 100644 index 00000000..81e45b8c --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_t_o_t_p_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRegisterTOTPRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceRegisterTOTPRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRegisterTOTPRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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..306dbe32 --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_u2_f_request.rb @@ -0,0 +1,256 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + attr_accessor :user_id + + attr_accessor :domain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = nil + 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 + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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..44c5d7d0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_register_u2_f_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 UserServiceRegisterU2FResponse + attr_accessor :details + + attr_accessor :u2f_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + 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' => :'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::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') + if (value = attributes[:'public_key_credential_creation_options']).is_a?(Hash) + self.public_key_credential_creation_options = 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 && + 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_request.rb b/lib/zitadel/client/models/user_service_remove_i_d_p_link_request.rb new file mode 100644 index 00000000..9a3e1d69 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_i_d_p_link_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 UserServiceRemoveIDPLinkRequest + attr_accessor :user_id + + attr_accessor :idp_id + + attr_accessor :linked_user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'idp_id' => :'idpId', + :'linked_user_id' => :'linkedUserId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'idp_id' => :'String', + :'linked_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::UserServiceRemoveIDPLinkRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveIDPLinkRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'idp_id') + self.idp_id = attributes[:'idp_id'] + else + self.idp_id = nil + end + + if attributes.key?(:'linked_user_id') + self.linked_user_id = attributes[:'linked_user_id'] + else + self.linked_user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @idp_id.nil? + invalid_properties.push('invalid value for "idp_id", idp_id cannot be nil.') + end + + if @linked_user_id.nil? + invalid_properties.push('invalid value for "linked_user_id", linked_user_id 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 @user_id.nil? + return false if @idp_id.nil? + return false if @linked_user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] idp_id Value to be assigned + def idp_id=(idp_id) + if idp_id.nil? + fail ArgumentError, 'idp_id cannot be nil' + end + + @idp_id = idp_id + end + + # Custom attribute writer method with validation + # @param [String] linked_user_id Value to be assigned + def linked_user_id=(linked_user_id) + if linked_user_id.nil? + fail ArgumentError, 'linked_user_id cannot be nil' + end + + @linked_user_id = linked_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 && + user_id == o.user_id && + idp_id == o.idp_id && + linked_user_id == o.linked_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 + [user_id, idp_id, linked_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_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_request.rb b/lib/zitadel/client/models/user_service_remove_o_t_p_email_request.rb new file mode 100644 index 00000000..6a30deb4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_o_t_p_email_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveOTPEmailRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceRemoveOTPEmailRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveOTPEmailRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_request.rb b/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_request.rb new file mode 100644 index 00000000..b057f8ce --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_o_t_p_s_m_s_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveOTPSMSRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceRemoveOTPSMSRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveOTPSMSRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_request.rb b/lib/zitadel/client/models/user_service_remove_passkey_request.rb new file mode 100644 index 00000000..b1664236 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_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 UserServiceRemovePasskeyRequest + attr_accessor :user_id + + attr_accessor :passkey_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'passkey_id' => :'passkeyId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'passkey_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::UserServiceRemovePasskeyRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemovePasskeyRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'passkey_id') + self.passkey_id = attributes[:'passkey_id'] + else + self.passkey_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @passkey_id.nil? + invalid_properties.push('invalid value for "passkey_id", passkey_id 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 @user_id.nil? + return false if @passkey_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] passkey_id Value to be assigned + def passkey_id=(passkey_id) + if passkey_id.nil? + fail ArgumentError, 'passkey_id cannot be nil' + end + + @passkey_id = passkey_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 && + user_id == o.user_id && + passkey_id == o.passkey_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 + [user_id, passkey_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_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_request.rb b/lib/zitadel/client/models/user_service_remove_phone_request.rb new file mode 100644 index 00000000..14970f56 --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_phone_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemovePhoneRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceRemovePhoneRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemovePhoneRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_request.rb b/lib/zitadel/client/models/user_service_remove_t_o_t_p_request.rb new file mode 100644 index 00000000..41b9bfba --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_t_o_t_p_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceRemoveTOTPRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceRemoveTOTPRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveTOTPRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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_request.rb b/lib/zitadel/client/models/user_service_remove_u2_f_request.rb new file mode 100644 index 00000000..e1e39b2a --- /dev/null +++ b/lib/zitadel/client/models/user_service_remove_u2_f_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 UserServiceRemoveU2FRequest + attr_accessor :user_id + + attr_accessor :u2f_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'u2f_id' => :'u2fId' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns 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', + :'u2f_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::UserServiceRemoveU2FRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceRemoveU2FRequest`. Please check the 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'] + else + self.user_id = nil + end + + if attributes.key?(:'u2f_id') + self.u2f_id = attributes[:'u2f_id'] + else + self.u2f_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @u2f_id.nil? + invalid_properties.push('invalid value for "u2f_id", u2f_id 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 @user_id.nil? + return false if @u2f_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] u2f_id Value to be assigned + def u2f_id=(u2f_id) + if u2f_id.nil? + fail ArgumentError, 'u2f_id cannot be nil' + end + + @u2f_id = u2f_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 && + user_id == o.user_id && + u2f_id == o.u2f_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 + [user_id, u2f_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_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..5477b056 --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_email_code_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceResendEmailCodeRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode2', + :'SendCode2' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..b5b4ddc3 --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_email_code_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 UserServiceResendEmailCodeResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_request.rb b/lib/zitadel/client/models/user_service_resend_invite_code_request.rb new file mode 100644 index 00000000..77609c2d --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_invite_code_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceResendInviteCodeRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceResendInviteCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceResendInviteCodeRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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..29a7e7ec --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_phone_code_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceResendPhoneCodeRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode3', + :'SendCode3' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..0883e205 --- /dev/null +++ b/lib/zitadel/client/models/user_service_resend_phone_code_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 UserServiceResendPhoneCodeResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..303b61e5 --- /dev/null +++ b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_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 UserServiceRetrieveIdentityProviderIntentRequest + attr_accessor :idp_intent_id + + 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::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_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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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/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..e6af1217 --- /dev/null +++ b/lib/zitadel/client/models/user_service_retrieve_identity_provider_intent_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 UserServiceRetrieveIdentityProviderIntentResponse + attr_accessor :details + + attr_accessor :idp_information + + 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_search_query.rb b/lib/zitadel/client/models/user_service_search_query.rb new file mode 100644 index 00000000..e6674edd --- /dev/null +++ b/lib/zitadel/client/models/user_service_search_query.rb @@ -0,0 +1,124 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceSearchQuery + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AndQuery', + :'DisplayNameQuery', + :'EmailQuery', + :'FirstNameQuery', + :'InUserEmailsQuery', + :'InUserIdsQuery', + :'LastNameQuery', + :'LoginNameQuery', + :'NickNameQuery', + :'NotQuery', + :'OrQuery', + :'OrganizationIdQuery', + :'PhoneQuery', + :'StateQuery', + :'TypeQuery', + :'UserNameQuery' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..b932f8dc --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_email_code_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceSendEmailCodeRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ReturnCode2', + :'SendCode2' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..adfd1e61 --- /dev/null +++ b/lib/zitadel/client/models/user_service_send_email_code_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 UserServiceSendEmailCodeResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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_set_email_request.rb b/lib/zitadel/client/models/user_service_set_email_request.rb new file mode 100644 index 00000000..56516409 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_email_request.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceSetEmailRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode2', + :'SendCode2' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..d6ff64ad --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_email_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 UserServiceSetEmailResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..c6795dad --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_human_email.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceSetHumanEmail + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode2', + :'SendCode2' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..8e6a060c --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_human_phone.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceSetHumanPhone + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode3', + :'SendCode3' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..f3559311 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_human_profile.rb @@ -0,0 +1,334 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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([ + :'nick_name', + :'display_name', + :'preferred_language', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return 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 @family_name.nil? + invalid_properties.push('invalid value for "family_name", family_name 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 @given_name.nil? + return false if @family_name.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] given_name Value to be assigned + def given_name=(given_name) + if given_name.nil? + fail ArgumentError, 'given_name cannot be nil' + end + + @given_name = given_name + end + + # Custom attribute writer method with validation + # @param [String] family_name Value to be assigned + def family_name=(family_name) + if family_name.nil? + fail ArgumentError, 'family_name cannot be nil' + end + + @family_name = family_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 && + 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..f644ebc6 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_metadata_entry.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 UserServiceSetMetadataEntry + attr_accessor :key + + 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 @value.nil? + invalid_properties.push('invalid value for "value", value 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 @key.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] key Value to be assigned + def key=(key) + if key.nil? + fail ArgumentError, 'key cannot be nil' + end + + @key = key + end + + # Custom attribute writer method with validation + # @param [String] value Value to be assigned + def value=(value) + if value.nil? + fail ArgumentError, 'value cannot be nil' + 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..f4a17674 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_password.rb @@ -0,0 +1,325 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 :hashed_password + + attr_accessor :password + + attr_accessor :current_password + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'hashed_password' => :'hashedPassword', + :'password' => :'password', + :'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 + { + :'hashed_password' => :'UserServiceHashedPassword', + :'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::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?(:'hashed_password') + self.hashed_password = attributes[:'hashed_password'] + else + self.hashed_password = nil + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + else + self.password = nil + 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 @hashed_password.nil? + invalid_properties.push('invalid value for "hashed_password", hashed_password cannot be nil.') + end + + if @password.nil? + invalid_properties.push('invalid value for "password", password cannot be nil.') + end + + if @current_password.nil? + invalid_properties.push('invalid value for "current_password", current_password cannot be nil.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_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 @hashed_password.nil? + return false if @password.nil? + return false if @current_password.nil? + return false if @verification_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [UserServiceHashedPassword] hashed_password Value to be assigned + def hashed_password=(hashed_password) + if hashed_password.nil? + fail ArgumentError, 'hashed_password cannot be nil' + end + + @hashed_password = hashed_password + end + + # Custom attribute writer method with validation + # @param [UserServicePassword] password Value to be assigned + def password=(password) + if password.nil? + fail ArgumentError, 'password cannot be nil' + end + + @password = password + end + + # Custom attribute writer method with validation + # @param [String] current_password Value to be assigned + def current_password=(current_password) + if current_password.nil? + fail ArgumentError, 'current_password cannot be nil' + end + + @current_password = current_password + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 && + hashed_password == o.hashed_password && + password == o.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 + [hashed_password, 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..5bd9ebcc --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_password_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceSetPasswordRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CurrentPassword', + :'VerificationCode' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..8368503a --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_phone_request.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceSetPhoneRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IsVerified', + :'ReturnCode3', + :'SendCode3' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..c2be56d0 --- /dev/null +++ b/lib/zitadel/client/models/user_service_set_phone_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 UserServiceSetPhoneResponse + attr_accessor :details + + # in case the verification was set to return_code, the code will be returned + 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([ + :'verification_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..09170ab4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_start_identity_provider_intent_request.rb @@ -0,0 +1,110 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceStartIdentityProviderIntentRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Ldap1', + :'Urls' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + 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..1472c1b6 --- /dev/null +++ b/lib/zitadel/client/models/user_service_start_identity_provider_intent_response.rb @@ -0,0 +1,111 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +module UserServiceStartIdentityProviderIntentResponse + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AuthUrl', + :'IdpIntent', + :'PostForm' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + end +end + +end diff --git a/lib/zitadel/client/models/user_service_unlock_user_request.rb b/lib/zitadel/client/models/user_service_unlock_user_request.rb new file mode 100644 index 00000000..20397543 --- /dev/null +++ b/lib/zitadel/client/models/user_service_unlock_user_request.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class UserServiceUnlockUserRequest + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::UserServiceUnlockUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::UserServiceUnlockUserRequest`. Please check the 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'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id 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 @user_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + 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 && + 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 + [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_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..99036bf4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_update_human_user_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 UserServiceUpdateHumanUserRequest + attr_accessor :user_id + + 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 + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'String', + :'username' => :'String', + :'profile' => :'UserServiceSetHumanProfile', + :'email' => :'UserServiceSetHumanEmail', + :'phone' => :'UserServiceSetHumanPhone', + :'password' => :'UserServiceSetPassword' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'username', + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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?(:'user_id') + self.user_id = attributes[:'user_id'] + end + + 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 + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # 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 && + 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 + [user_id, 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..408ff787 --- /dev/null +++ b/lib/zitadel/client/models/user_service_update_human_user_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 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([ + :'email_code', + :'phone_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Models attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.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..0d9e5d52 --- /dev/null +++ b/lib/zitadel/client/models/user_service_user.rb @@ -0,0 +1,351 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 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 + + 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', + :'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' => :'Null', + :'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'] + 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'] + else + self.human = nil + end + + if attributes.key?(:'machine') + self.machine = attributes[:'machine'] + else + self.machine = 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 @human.nil? + invalid_properties.push('invalid value for "human", human cannot be nil.') + end + + if @machine.nil? + invalid_properties.push('invalid value for "machine", machine 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 @human.nil? + return false if @machine.nil? + true + end + + # Custom attribute writer method with validation + # @param [Null] human Value to be assigned + def human=(human) + if human.nil? + fail ArgumentError, 'human cannot be nil' + end + + @human = human + end + + # Custom attribute writer method with validation + # @param [UserServiceMachineUser] machine Value to be assigned + def machine=(machine) + if machine.nil? + fail ArgumentError, 'machine cannot be nil' + end + + @machine = machine + end + + # 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_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_value.rb b/lib/zitadel/client/models/user_service_value.rb new file mode 100644 index 00000000..8bf5c0cc --- /dev/null +++ b/lib/zitadel/client/models/user_service_value.rb @@ -0,0 +1,114 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models +# `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. +module UserServiceValue + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Array', + :'Boolean', + :'Float', + :'Hash', + :'String' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass_name| + begin + next if klass_name == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass_name, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass_name, data) + return if data.nil? + + case klass_name.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type.to_sym, item) } # MODIFIED: ensure sub_type is symbol for recursive call + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type.to_sym, v) } # MODIFIED: ensure sub_type is symbol for recursive call + end + else # model + # MODIFIED: Ensure model is looked up in the Models namespace + const = Zitadel::Client::Models.const_get(klass_name) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + # TODO: Consider re-enabling this check if strictly needed, but it might be too restrictive for oneOf. + # raise if const.respond_to?(:acceptable_attributes) && data.is_a?(Hash) && !(data.keys.map(&:to_sym) - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue SchemaMismatchError => e # Specific rescue for re-raising + raise e + rescue # General rescue for other errors during casting/lookup + # MODIFIED: Updated class name in error message to include full namespace context + raise SchemaMismatchError, "#{data.inspect} doesn't match the Zitadel::Client::Models::#{klass_name} type" + end + 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..ec3e4835 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_email_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 UserServiceVerifyEmailRequest + attr_accessor :user_id + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'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::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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_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 @user_id.nil? + return false if @verification_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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..638110e4 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_invite_code_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 UserServiceVerifyInviteCodeRequest + attr_accessor :user_id + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'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::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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_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 @user_id.nil? + return false if @verification_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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..3e382737 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_passkey_registration_request.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 UserServiceVerifyPasskeyRegistrationRequest + attr_accessor :user_id + + attr_accessor :passkey_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + attr_accessor :public_key_credential + + attr_accessor :passkey_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'passkey_id' => :'passkeyId', + :'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 + { + :'user_id' => :'String', + :'passkey_id' => :'String', + :'public_key_credential' => :'Hash', + :'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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = nil + end + + if attributes.key?(:'passkey_id') + self.passkey_id = attributes[:'passkey_id'] + else + self.passkey_id = nil + end + + if attributes.key?(:'public_key_credential') + if (value = attributes[:'public_key_credential']).is_a?(Hash) + self.public_key_credential = value + end + 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @passkey_id.nil? + invalid_properties.push('invalid value for "passkey_id", passkey_id cannot be nil.') + end + + 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 + + invalid_properties + end + + # Check to see if the 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? + return false if @passkey_id.nil? + return false if @public_key_credential.nil? + return false if @passkey_name.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] passkey_id Value to be assigned + def passkey_id=(passkey_id) + if passkey_id.nil? + fail ArgumentError, 'passkey_id cannot be nil' + end + + @passkey_id = passkey_id + end + + # Custom attribute writer method with validation + # @param [Hash] 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 [String] passkey_name Value to be assigned + def passkey_name=(passkey_name) + if passkey_name.nil? + fail ArgumentError, 'passkey_name cannot be nil' + 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 && + user_id == o.user_id && + passkey_id == o.passkey_id && + 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 + [user_id, passkey_id, 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..d07e6c0d --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_phone_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 UserServiceVerifyPhoneRequest + attr_accessor :user_id + + attr_accessor :verification_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_id' => :'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::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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @verification_code.nil? + invalid_properties.push('invalid value for "verification_code", verification_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 @user_id.nil? + return false if @verification_code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 && + user_id == o.user_id && + 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 + [user_id, 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..1b515bc2 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_t_o_t_p_registration_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 UserServiceVerifyTOTPRegistrationRequest + attr_accessor :user_id + + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'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 + { + :'user_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::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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + 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 @user_id.nil? + return false if @code.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] 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 && + user_id == o.user_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 + [user_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_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..417d6a06 --- /dev/null +++ b/lib/zitadel/client/models/user_service_verify_u2_f_registration_request.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 UserServiceVerifyU2FRegistrationRequest + attr_accessor :user_id + + attr_accessor :u2f_id + + # `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object. + attr_accessor :public_key_credential + + attr_accessor :token_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'user_id' => :'userId', + :'u2f_id' => :'u2fId', + :'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 + { + :'user_id' => :'String', + :'u2f_id' => :'String', + :'public_key_credential' => :'Hash', + :'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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = nil + end + + if attributes.key?(:'u2f_id') + self.u2f_id = attributes[:'u2f_id'] + else + self.u2f_id = nil + end + + if attributes.key?(:'public_key_credential') + if (value = attributes[:'public_key_credential']).is_a?(Hash) + self.public_key_credential = value + end + 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 @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @u2f_id.nil? + invalid_properties.push('invalid value for "u2f_id", u2f_id cannot be nil.') + end + + 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 + + invalid_properties + end + + # Check to see if the 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? + return false if @u2f_id.nil? + return false if @public_key_credential.nil? + return false if @token_name.nil? + true + end + + # Custom attribute writer method with validation + # @param [String] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [String] u2f_id Value to be assigned + def u2f_id=(u2f_id) + if u2f_id.nil? + fail ArgumentError, 'u2f_id cannot be nil' + end + + @u2f_id = u2f_id + end + + # Custom attribute writer method with validation + # @param [Hash] 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 [String] token_name Value to be assigned + def token_name=(token_name) + if token_name.nil? + fail ArgumentError, 'token_name cannot be nil' + 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 && + user_id == o.user_id && + u2f_id == o.u2f_id && + 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 + [user_id, u2f_id, 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/verification_code.rb b/lib/zitadel/client/models/verification_code.rb new file mode 100644 index 00000000..a1c261fc --- /dev/null +++ b/lib/zitadel/client/models/verification_code.rb @@ -0,0 +1,247 @@ +=begin +#Zitadel SDK + +#The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Zitadel::Client::Models + class VerificationCode + 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::VerificationCode` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + # MODIFIED: Updated class name in error message + fail ArgumentError, "`#{k}` is not a valid attribute in `Zitadel::Client::Models::VerificationCode`. Please check the 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 + + invalid_properties + end + + # Check to see if the 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? + true + end + + # Custom attribute writer method with validation + # @param [String] verification_code Value to be assigned + def verification_code=(verification_code) + if verification_code.nil? + fail ArgumentError, 'verification_code cannot be nil' + 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 From 16e7dd1a6cade0c3d10a5d04caed32f3b8eae3a9 Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Wed, 4 Jun 2025 11:37:22 +0300 Subject: [PATCH 3/3] Fixed the project to ensure that it works with the ConnectRPC changes --- lib/zitadel/client/zitadel.rb | 5 ++-- spec/auth/use_access_token_spec.rb | 4 +-- spec/auth/use_client_credentials_spec.rb | 4 +-- spec/auth/use_private_key_spec.rb | 4 +-- spec/check_session_service_spec.rb | 34 +++++++++--------------- spec/check_user_service_spec.rb | 15 ++++++----- 6 files changed, 30 insertions(+), 36 deletions(-) diff --git a/lib/zitadel/client/zitadel.rb b/lib/zitadel/client/zitadel.rb index 1c7cced0..2053248f 100644 --- a/lib/zitadel/client/zitadel.rb +++ b/lib/zitadel/client/zitadel.rb @@ -6,6 +6,7 @@ module Client # # Initializes and configures the SDK with the provided authentication strategy. # Sets up service APIs for interacting with various Zitadel features. + # noinspection RubyTooManyInstanceVariablesInspection class Zitadel attr_reader :actions, :features, @@ -29,7 +30,7 @@ def initialize(authenticator) client = ApiClient.new(@configuration) - @actions = Api::ActionServiceApi.new(client) + @actions = Api::BetaActionServiceApi.new(client) @features = Api::FeatureServiceApi.new(client) @idps = Api::IdentityProviderServiceApi.new(client) @oidc = Api::OIDCServiceApi.new(client) @@ -38,7 +39,7 @@ def initialize(authenticator) @sessions = Api::SessionServiceApi.new(client) @settings = Api::SettingsServiceApi.new(client) @users = Api::UserServiceApi.new(client) - @webkeys = Api::WebKeyServiceApi.new(client) + @webkeys = Api::BetaWebKeyServiceApi.new(client) end # rubocop:enable Metrics/MethodLength, Metrics/AbcSize diff --git a/spec/auth/use_access_token_spec.rb b/spec/auth/use_access_token_spec.rb index e8e621ba..282d0d78 100644 --- a/spec/auth/use_access_token_spec.rb +++ b/spec/auth/use_access_token_spec.rb @@ -25,7 +25,7 @@ it 'retrieves general settings with valid token' do client = zitadel_client - client.settings.settings_service_get_general_settings + client.settings.get_general_settings({}) end it 'raises an ApiError with invalid token' do @@ -34,7 +34,7 @@ 'invalid' ) assert_raises(Zitadel::Client::ZitadelError) do - client.settings.settings_service_get_general_settings + client.settings.get_general_settings({}) end end end diff --git a/spec/auth/use_client_credentials_spec.rb b/spec/auth/use_client_credentials_spec.rb index 22d3e8b3..402edbd6 100644 --- a/spec/auth/use_client_credentials_spec.rb +++ b/spec/auth/use_client_credentials_spec.rb @@ -27,7 +27,7 @@ it 'retrieves general settings with valid credentials' do client = zitadel_client - client.settings.settings_service_get_general_settings + client.settings.get_general_settings({}) end it 'raises an ApiError with invalid credentials' do @@ -37,7 +37,7 @@ 'invalid' ) assert_raises(Zitadel::Client::ZitadelError) do - client.settings.settings_service_get_general_settings + client.settings.get_general_settings({}) end end end diff --git a/spec/auth/use_private_key_spec.rb b/spec/auth/use_private_key_spec.rb index 490ae015..0003546d 100644 --- a/spec/auth/use_private_key_spec.rb +++ b/spec/auth/use_private_key_spec.rb @@ -32,7 +32,7 @@ it 'retrieves general settings with valid private key' do client = zitadel_client - client.settings.settings_service_get_general_settings + client.settings.get_general_settings({}) end it 'raises an ApiError with invalid private key' do @@ -41,7 +41,7 @@ jwt_file.path ) assert_raises(Zitadel::Client::ZitadelError) do - client.settings.settings_service_get_general_settings + client.settings.get_general_settings({}) end end end diff --git a/spec/check_session_service_spec.rb b/spec/check_session_service_spec.rb index 10effab6..44b1565a 100644 --- a/spec/check_session_service_spec.rb +++ b/spec/check_session_service_spec.rb @@ -35,49 +35,41 @@ ), lifetime: '18000s' ) - resp = client.sessions.session_service_create_session(req) + resp = client.sessions.create_session(req) @session_id = resp.session_id @session_token = resp.session_token end after do - delete_req = Zitadel::Client::Models::SessionServiceDeleteSessionRequest.new - begin - client.sessions.session_service_delete_session(@session_id, delete_req) - rescue StandardError - # Ignore cleanup errors - end + request = Zitadel::Client::Models::SessionServiceDeleteSessionRequest.new(session_id: @session_id) + client.sessions.delete_session(request) + rescue StandardError + # Ignore cleanup errors end it 'retrieves the session details by the session identifier' do - response = client.sessions.session_service_get_session( - @session_id, - session_token: @session_token - ) + request = Zitadel::Client::Models::SessionServiceGetSessionRequest.new(session_id: @session_id, session_token: @session_token) + response = client.sessions.get_session(request) _(response.session.id).must_equal @session_id end it 'raises an error when retrieving a non-existent session' do + request = Zitadel::Client::Models::SessionServiceGetSessionRequest.new(session_id: SecureRandom.uuid, + session_token: @session_token) assert_raises(Zitadel::Client::ApiError) do - client.sessions.session_service_get_session( - SecureRandom.uuid, - session_token: @session_token - ) + client.sessions.get_session(request) end end it 'includes the created session when listing all sessions' do request = Zitadel::Client::Models::SessionServiceListSessionsRequest.new(queries: []) - response = client.sessions.session_service_list_sessions(request) + response = client.sessions.list_sessions(request) _(response.sessions.map(&:id)).must_include @session_id end it 'updates the session lifetime and returns a new token' do - request = Zitadel::Client::Models::SessionServiceSetSessionRequest.new(lifetime: '36000s') - response = client.sessions.session_service_set_session( - @session_id, - request - ) + request = Zitadel::Client::Models::SessionServiceSetSessionRequest.new(session_id: @session_id, lifetime: '36000s') + response = client.sessions.set_session(request) _(response.session_token).must_be_instance_of String end end diff --git a/spec/check_user_service_spec.rb b/spec/check_user_service_spec.rb index 6ad4f4dd..c6d8951f 100644 --- a/spec/check_user_service_spec.rb +++ b/spec/check_user_service_spec.rb @@ -40,40 +40,41 @@ ) ) - @user = client.users.user_service_add_human_user(request) + @user = client.users.add_human_user(request) end after do - client.users.user_service_delete_user(@user.user_id) + client.users.delete_user(UserServiceDeleteUserRequest.new(user_id: @user.user_id)) rescue StandardError # Ignore cleanup errors end it 'retrieves the user details by ID' do - response = client.users.user_service_get_user_by_id(@user.user_id) + response = client.users.get_user_by_id(UserServiceGetUserByIDRequest.new(user_id: @user.user_id)) _(response.user.user_id).must_equal @user.user_id end it 'raises an error when retrieving a non-existent user' do assert_raises(Zitadel::Client::ApiError) do - client.users.user_service_get_user_by_id(SecureRandom.uuid) + client.users.get_user_by_id(UserServiceGetUserByIDRequest.new(user_id: SecureRandom.uuid)) end end it 'includes the created user when listing all users' do request = Zitadel::Client::Models::UserServiceListUsersRequest.new(queries: []) - response = client.users.user_service_list_users(request) + response = client.users.list_users(request) _(response.result.map(&:user_id)).must_include @user.user_id end it "updates the user's email and reflects the change" do new_email = "updated#{SecureRandom.hex}@example.com" update_req = Zitadel::Client::Models::UserServiceUpdateHumanUserRequest.new( + user_id: @user.user_id, email: Zitadel::Client::Models::UserServiceSetHumanEmail.new(email: new_email) ) - client.users.user_service_update_human_user(@user.user_id, update_req) + client.users.update_human_user(update_req) - response = client.users.user_service_get_user_by_id(@user.user_id) + response = client.users.get_user_by_id(UserServiceGetUserByIDRequest.new(user_id: @user.user_id)) _(response.user.human.email.email).must_equal new_email end end