immich 1.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- immich/.openapi-generator/FILES +372 -0
- immich/.openapi-generator/VERSION +1 -0
- immich/.openapi-generator-ignore +48 -0
- immich/__init__.py +3 -0
- immich/client/__init__.py +1162 -0
- immich/client/api/__init__.py +39 -0
- immich/client/api/activities_api.py +1092 -0
- immich/client/api/albums_api.py +3228 -0
- immich/client/api/api_keys_api.py +1484 -0
- immich/client/api/assets_api.py +5834 -0
- immich/client/api/authentication_admin_api.py +254 -0
- immich/client/api/authentication_api.py +3881 -0
- immich/client/api/deprecated_api.py +2199 -0
- immich/client/api/download_api.py +603 -0
- immich/client/api/duplicates_api.py +743 -0
- immich/client/api/faces_api.py +1053 -0
- immich/client/api/jobs_api.py +783 -0
- immich/client/api/libraries_api.py +2004 -0
- immich/client/api/maintenance_admin_api.py +533 -0
- immich/client/api/map_api.py +640 -0
- immich/client/api/memories_api.py +2250 -0
- immich/client/api/notifications_admin_api.py +808 -0
- immich/client/api/notifications_api.py +1564 -0
- immich/client/api/partners_api.py +1278 -0
- immich/client/api/people_api.py +2905 -0
- immich/client/api/plugins_api.py +730 -0
- immich/client/api/queues_api.py +1292 -0
- immich/client/api/search_api.py +3198 -0
- immich/client/api/server_api.py +3466 -0
- immich/client/api/sessions_api.py +1472 -0
- immich/client/api/shared_links_api.py +2177 -0
- immich/client/api/stacks_api.py +1769 -0
- immich/client/api/sync_api.py +1512 -0
- immich/client/api/system_config_api.py +967 -0
- immich/client/api/system_metadata_api.py +964 -0
- immich/client/api/tags_api.py +2296 -0
- immich/client/api/timeline_api.py +1193 -0
- immich/client/api/trash_api.py +739 -0
- immich/client/api/users_admin_api.py +2607 -0
- immich/client/api/users_api.py +3577 -0
- immich/client/api/views_api.py +503 -0
- immich/client/api/workflows_api.py +1257 -0
- immich/client/api_client.py +756 -0
- immich/client/api_response.py +20 -0
- immich/client/configuration.py +638 -0
- immich/client/exceptions.py +222 -0
- immich/client/models/__init__.py +424 -0
- immich/client/models/activity_create_dto.py +94 -0
- immich/client/models/activity_response_dto.py +121 -0
- immich/client/models/activity_statistics_response_dto.py +85 -0
- immich/client/models/add_users_dto.py +101 -0
- immich/client/models/admin_onboarding_update_dto.py +82 -0
- immich/client/models/album_response_dto.py +199 -0
- immich/client/models/album_statistics_response_dto.py +90 -0
- immich/client/models/album_user_add_dto.py +87 -0
- immich/client/models/album_user_create_dto.py +87 -0
- immich/client/models/album_user_response_dto.py +95 -0
- immich/client/models/album_user_role.py +34 -0
- immich/client/models/albums_add_assets_dto.py +86 -0
- immich/client/models/albums_add_assets_response_dto.py +86 -0
- immich/client/models/albums_response.py +83 -0
- immich/client/models/albums_update.py +85 -0
- immich/client/models/api_key_create_dto.py +87 -0
- immich/client/models/api_key_create_response_dto.py +94 -0
- immich/client/models/api_key_response_dto.py +102 -0
- immich/client/models/api_key_update_dto.py +87 -0
- immich/client/models/asset_bulk_delete_dto.py +84 -0
- immich/client/models/asset_bulk_update_dto.py +143 -0
- immich/client/models/asset_bulk_upload_check_dto.py +98 -0
- immich/client/models/asset_bulk_upload_check_item.py +85 -0
- immich/client/models/asset_bulk_upload_check_response_dto.py +101 -0
- immich/client/models/asset_bulk_upload_check_result.py +126 -0
- immich/client/models/asset_copy_dto.py +113 -0
- immich/client/models/asset_delta_sync_dto.py +87 -0
- immich/client/models/asset_delta_sync_response_dto.py +102 -0
- immich/client/models/asset_face_create_dto.py +110 -0
- immich/client/models/asset_face_delete_dto.py +82 -0
- immich/client/models/asset_face_response_dto.py +125 -0
- immich/client/models/asset_face_update_dto.py +96 -0
- immich/client/models/asset_face_update_item.py +86 -0
- immich/client/models/asset_face_without_person_response_dto.py +111 -0
- immich/client/models/asset_full_sync_dto.py +95 -0
- immich/client/models/asset_ids_dto.py +83 -0
- immich/client/models/asset_ids_response_dto.py +109 -0
- immich/client/models/asset_job_name.py +36 -0
- immich/client/models/asset_jobs_dto.py +87 -0
- immich/client/models/asset_media_response_dto.py +84 -0
- immich/client/models/asset_media_size.py +35 -0
- immich/client/models/asset_media_status.py +35 -0
- immich/client/models/asset_metadata_key.py +33 -0
- immich/client/models/asset_metadata_response_dto.py +92 -0
- immich/client/models/asset_metadata_upsert_dto.py +101 -0
- immich/client/models/asset_metadata_upsert_item_dto.py +84 -0
- immich/client/models/asset_ocr_response_dto.py +145 -0
- immich/client/models/asset_order.py +34 -0
- immich/client/models/asset_response_dto.py +291 -0
- immich/client/models/asset_stack_response_dto.py +90 -0
- immich/client/models/asset_stats_response_dto.py +90 -0
- immich/client/models/asset_type_enum.py +36 -0
- immich/client/models/asset_visibility.py +36 -0
- immich/client/models/audio_codec.py +36 -0
- immich/client/models/auth_status_response_dto.py +100 -0
- immich/client/models/avatar_update.py +83 -0
- immich/client/models/bulk_id_error_reason.py +36 -0
- immich/client/models/bulk_id_response_dto.py +102 -0
- immich/client/models/bulk_ids_dto.py +83 -0
- immich/client/models/cast_response.py +88 -0
- immich/client/models/cast_update.py +82 -0
- immich/client/models/change_password_dto.py +101 -0
- immich/client/models/check_existing_assets_dto.py +91 -0
- immich/client/models/check_existing_assets_response_dto.py +82 -0
- immich/client/models/clip_config.py +85 -0
- immich/client/models/colorspace.py +34 -0
- immich/client/models/contributor_count_response_dto.py +85 -0
- immich/client/models/cq_mode.py +35 -0
- immich/client/models/create_album_dto.py +112 -0
- immich/client/models/create_library_dto.py +103 -0
- immich/client/models/create_profile_image_response_dto.py +95 -0
- immich/client/models/database_backup_config.py +94 -0
- immich/client/models/download_archive_info.py +85 -0
- immich/client/models/download_info_dto.py +96 -0
- immich/client/models/download_response.py +90 -0
- immich/client/models/download_response_dto.py +100 -0
- immich/client/models/download_update.py +93 -0
- immich/client/models/duplicate_detection_config.py +89 -0
- immich/client/models/duplicate_response_dto.py +98 -0
- immich/client/models/email_notifications_response.py +90 -0
- immich/client/models/email_notifications_update.py +90 -0
- immich/client/models/exif_response_dto.py +284 -0
- immich/client/models/face_dto.py +83 -0
- immich/client/models/facial_recognition_config.py +107 -0
- immich/client/models/folders_response.py +92 -0
- immich/client/models/folders_update.py +85 -0
- immich/client/models/image_format.py +34 -0
- immich/client/models/job_create_dto.py +83 -0
- immich/client/models/job_name.py +87 -0
- immich/client/models/job_settings_dto.py +83 -0
- immich/client/models/library_response_dto.py +118 -0
- immich/client/models/library_stats_response_dto.py +92 -0
- immich/client/models/license_key_dto.py +98 -0
- immich/client/models/license_response_dto.py +101 -0
- immich/client/models/log_level.py +38 -0
- immich/client/models/login_credential_dto.py +85 -0
- immich/client/models/login_response_dto.py +109 -0
- immich/client/models/logout_response_dto.py +85 -0
- immich/client/models/machine_learning_availability_checks_dto.py +90 -0
- immich/client/models/maintenance_action.py +34 -0
- immich/client/models/maintenance_auth_dto.py +82 -0
- immich/client/models/maintenance_login_dto.py +82 -0
- immich/client/models/manual_job_name.py +38 -0
- immich/client/models/map_marker_response_dto.py +111 -0
- immich/client/models/map_reverse_geocode_response_dto.py +105 -0
- immich/client/models/memories_response.py +92 -0
- immich/client/models/memories_update.py +86 -0
- immich/client/models/memory_create_dto.py +112 -0
- immich/client/models/memory_response_dto.py +142 -0
- immich/client/models/memory_search_order.py +35 -0
- immich/client/models/memory_statistics_response_dto.py +82 -0
- immich/client/models/memory_type.py +33 -0
- immich/client/models/memory_update_dto.py +91 -0
- immich/client/models/merge_person_dto.py +83 -0
- immich/client/models/metadata_search_dto.py +277 -0
- immich/client/models/notification_create_dto.py +120 -0
- immich/client/models/notification_delete_all_dto.py +83 -0
- immich/client/models/notification_dto.py +112 -0
- immich/client/models/notification_level.py +36 -0
- immich/client/models/notification_type.py +38 -0
- immich/client/models/notification_update_all_dto.py +90 -0
- immich/client/models/notification_update_dto.py +88 -0
- immich/client/models/o_auth_authorize_response_dto.py +82 -0
- immich/client/models/o_auth_callback_dto.py +90 -0
- immich/client/models/o_auth_config_dto.py +90 -0
- immich/client/models/o_auth_token_endpoint_auth_method.py +34 -0
- immich/client/models/ocr_config.py +109 -0
- immich/client/models/on_this_day_dto.py +86 -0
- immich/client/models/onboarding_dto.py +82 -0
- immich/client/models/onboarding_response_dto.py +82 -0
- immich/client/models/partner_create_dto.py +83 -0
- immich/client/models/partner_direction.py +34 -0
- immich/client/models/partner_response_dto.py +108 -0
- immich/client/models/partner_update_dto.py +82 -0
- immich/client/models/people_response.py +92 -0
- immich/client/models/people_response_dto.py +104 -0
- immich/client/models/people_update.py +85 -0
- immich/client/models/people_update_dto.py +96 -0
- immich/client/models/people_update_item.py +128 -0
- immich/client/models/permission.py +177 -0
- immich/client/models/person_create_dto.py +117 -0
- immich/client/models/person_response_dto.py +115 -0
- immich/client/models/person_statistics_response_dto.py +82 -0
- immich/client/models/person_update_dto.py +125 -0
- immich/client/models/person_with_faces_response_dto.py +133 -0
- immich/client/models/pin_code_change_dto.py +90 -0
- immich/client/models/pin_code_reset_dto.py +85 -0
- immich/client/models/pin_code_setup_dto.py +82 -0
- immich/client/models/places_response_dto.py +100 -0
- immich/client/models/plugin_action_response_dto.py +112 -0
- immich/client/models/plugin_context_type.py +35 -0
- immich/client/models/plugin_filter_response_dto.py +112 -0
- immich/client/models/plugin_response_dto.py +139 -0
- immich/client/models/plugin_trigger_response_dto.py +87 -0
- immich/client/models/plugin_trigger_type.py +34 -0
- immich/client/models/purchase_response.py +88 -0
- immich/client/models/purchase_update.py +92 -0
- immich/client/models/queue_command.py +37 -0
- immich/client/models/queue_command_dto.py +86 -0
- immich/client/models/queue_delete_dto.py +85 -0
- immich/client/models/queue_job_response_dto.py +93 -0
- immich/client/models/queue_job_status.py +38 -0
- immich/client/models/queue_name.py +49 -0
- immich/client/models/queue_response_dto.py +97 -0
- immich/client/models/queue_response_legacy_dto.py +100 -0
- immich/client/models/queue_statistics_dto.py +103 -0
- immich/client/models/queue_status_legacy_dto.py +85 -0
- immich/client/models/queue_update_dto.py +82 -0
- immich/client/models/queues_response_legacy_dto.py +242 -0
- immich/client/models/random_search_dto.py +234 -0
- immich/client/models/ratings_response.py +84 -0
- immich/client/models/ratings_update.py +82 -0
- immich/client/models/reaction_level.py +34 -0
- immich/client/models/reaction_type.py +34 -0
- immich/client/models/reverse_geocoding_state_response_dto.py +101 -0
- immich/client/models/search_album_response_dto.py +114 -0
- immich/client/models/search_asset_response_dto.py +127 -0
- immich/client/models/search_explore_item.py +94 -0
- immich/client/models/search_explore_response_dto.py +98 -0
- immich/client/models/search_facet_count_response_dto.py +85 -0
- immich/client/models/search_facet_response_dto.py +103 -0
- immich/client/models/search_response_dto.py +100 -0
- immich/client/models/search_statistics_response_dto.py +82 -0
- immich/client/models/search_suggestion_type.py +38 -0
- immich/client/models/server_about_response_dto.py +156 -0
- immich/client/models/server_apk_links_dto.py +97 -0
- immich/client/models/server_config_dto.py +118 -0
- immich/client/models/server_features_dto.py +130 -0
- immich/client/models/server_media_types_response_dto.py +90 -0
- immich/client/models/server_ping_response.py +87 -0
- immich/client/models/server_stats_response_dto.py +119 -0
- immich/client/models/server_storage_response_dto.py +108 -0
- immich/client/models/server_theme_dto.py +82 -0
- immich/client/models/server_version_history_response_dto.py +91 -0
- immich/client/models/server_version_response_dto.py +90 -0
- immich/client/models/session_create_dto.py +96 -0
- immich/client/models/session_create_response_dto.py +120 -0
- immich/client/models/session_response_dto.py +117 -0
- immich/client/models/session_unlock_dto.py +85 -0
- immich/client/models/session_update_dto.py +84 -0
- immich/client/models/set_maintenance_mode_dto.py +83 -0
- immich/client/models/shared_link_create_dto.py +142 -0
- immich/client/models/shared_link_edit_dto.py +134 -0
- immich/client/models/shared_link_response_dto.py +173 -0
- immich/client/models/shared_link_type.py +34 -0
- immich/client/models/shared_links_response.py +92 -0
- immich/client/models/shared_links_update.py +85 -0
- immich/client/models/sign_up_dto.py +90 -0
- immich/client/models/smart_search_dto.py +245 -0
- immich/client/models/source_type.py +35 -0
- immich/client/models/stack_create_dto.py +86 -0
- immich/client/models/stack_response_dto.py +100 -0
- immich/client/models/stack_update_dto.py +83 -0
- immich/client/models/statistics_search_dto.py +217 -0
- immich/client/models/sync_ack_delete_dto.py +83 -0
- immich/client/models/sync_ack_dto.py +84 -0
- immich/client/models/sync_ack_set_dto.py +83 -0
- immich/client/models/sync_album_delete_v1.py +82 -0
- immich/client/models/sync_album_to_asset_delete_v1.py +85 -0
- immich/client/models/sync_album_to_asset_v1.py +85 -0
- immich/client/models/sync_album_user_delete_v1.py +85 -0
- immich/client/models/sync_album_user_v1.py +91 -0
- immich/client/models/sync_album_v1.py +122 -0
- immich/client/models/sync_asset_delete_v1.py +82 -0
- immich/client/models/sync_asset_exif_v1.py +296 -0
- immich/client/models/sync_asset_face_delete_v1.py +82 -0
- immich/client/models/sync_asset_face_v1.py +120 -0
- immich/client/models/sync_asset_metadata_delete_v1.py +86 -0
- immich/client/models/sync_asset_metadata_v1.py +91 -0
- immich/client/models/sync_asset_v1.py +187 -0
- immich/client/models/sync_auth_user_v1.py +154 -0
- immich/client/models/sync_entity_type.py +79 -0
- immich/client/models/sync_memory_asset_delete_v1.py +85 -0
- immich/client/models/sync_memory_asset_v1.py +85 -0
- immich/client/models/sync_memory_delete_v1.py +82 -0
- immich/client/models/sync_memory_v1.py +143 -0
- immich/client/models/sync_partner_delete_v1.py +88 -0
- immich/client/models/sync_partner_v1.py +90 -0
- immich/client/models/sync_person_delete_v1.py +82 -0
- immich/client/models/sync_person_v1.py +131 -0
- immich/client/models/sync_request_type.py +52 -0
- immich/client/models/sync_stack_delete_v1.py +82 -0
- immich/client/models/sync_stack_v1.py +101 -0
- immich/client/models/sync_stream_dto.py +86 -0
- immich/client/models/sync_user_delete_v1.py +82 -0
- immich/client/models/sync_user_metadata_delete_v1.py +84 -0
- immich/client/models/sync_user_metadata_v1.py +91 -0
- immich/client/models/sync_user_v1.py +118 -0
- immich/client/models/system_config_backups_dto.py +92 -0
- immich/client/models/system_config_dto.py +302 -0
- immich/client/models/system_config_f_fmpeg_dto.py +156 -0
- immich/client/models/system_config_faces_dto.py +82 -0
- immich/client/models/system_config_generated_fullsize_image_dto.py +92 -0
- immich/client/models/system_config_generated_image_dto.py +92 -0
- immich/client/models/system_config_image_dto.py +124 -0
- immich/client/models/system_config_job_dto.py +194 -0
- immich/client/models/system_config_library_dto.py +104 -0
- immich/client/models/system_config_library_scan_dto.py +85 -0
- immich/client/models/system_config_library_watch_dto.py +82 -0
- immich/client/models/system_config_logging_dto.py +86 -0
- immich/client/models/system_config_machine_learning_dto.py +147 -0
- immich/client/models/system_config_map_dto.py +90 -0
- immich/client/models/system_config_metadata_dto.py +92 -0
- immich/client/models/system_config_new_version_check_dto.py +82 -0
- immich/client/models/system_config_nightly_tasks_dto.py +103 -0
- immich/client/models/system_config_notifications_dto.py +92 -0
- immich/client/models/system_config_o_auth_dto.py +155 -0
- immich/client/models/system_config_password_login_dto.py +82 -0
- immich/client/models/system_config_reverse_geocoding_dto.py +82 -0
- immich/client/models/system_config_server_dto.py +94 -0
- immich/client/models/system_config_smtp_dto.py +100 -0
- immich/client/models/system_config_smtp_transport_dto.py +107 -0
- immich/client/models/system_config_storage_template_dto.py +94 -0
- immich/client/models/system_config_template_emails_dto.py +94 -0
- immich/client/models/system_config_template_storage_option_dto.py +109 -0
- immich/client/models/system_config_templates_dto.py +94 -0
- immich/client/models/system_config_theme_dto.py +82 -0
- immich/client/models/system_config_trash_dto.py +86 -0
- immich/client/models/system_config_user_dto.py +83 -0
- immich/client/models/tag_bulk_assets_dto.py +86 -0
- immich/client/models/tag_bulk_assets_response_dto.py +82 -0
- immich/client/models/tag_create_dto.py +111 -0
- immich/client/models/tag_response_dto.py +107 -0
- immich/client/models/tag_update_dto.py +87 -0
- immich/client/models/tag_upsert_dto.py +82 -0
- immich/client/models/tags_response.py +92 -0
- immich/client/models/tags_update.py +85 -0
- immich/client/models/template_dto.py +82 -0
- immich/client/models/template_response_dto.py +83 -0
- immich/client/models/test_email_response_dto.py +82 -0
- immich/client/models/time_bucket_asset_response_dto.py +195 -0
- immich/client/models/time_buckets_response_dto.py +88 -0
- immich/client/models/tone_mapping.py +36 -0
- immich/client/models/transcode_hw_accel.py +37 -0
- immich/client/models/transcode_policy.py +37 -0
- immich/client/models/trash_response_dto.py +82 -0
- immich/client/models/update_album_dto.py +106 -0
- immich/client/models/update_album_user_dto.py +83 -0
- immich/client/models/update_asset_dto.py +135 -0
- immich/client/models/update_library_dto.py +95 -0
- immich/client/models/usage_by_user_dto.py +117 -0
- immich/client/models/user_admin_create_dto.py +136 -0
- immich/client/models/user_admin_delete_dto.py +82 -0
- immich/client/models/user_admin_response_dto.py +176 -0
- immich/client/models/user_admin_update_dto.py +141 -0
- immich/client/models/user_avatar_color.py +42 -0
- immich/client/models/user_license.py +91 -0
- immich/client/models/user_metadata_key.py +35 -0
- immich/client/models/user_preferences_response_dto.py +186 -0
- immich/client/models/user_preferences_update_dto.py +197 -0
- immich/client/models/user_response_dto.py +105 -0
- immich/client/models/user_status.py +35 -0
- immich/client/models/user_update_me_dto.py +98 -0
- immich/client/models/validate_access_token_response_dto.py +82 -0
- immich/client/models/validate_library_dto.py +93 -0
- immich/client/models/validate_library_import_path_response_dto.py +92 -0
- immich/client/models/validate_library_response_dto.py +103 -0
- immich/client/models/version_check_state_response_dto.py +98 -0
- immich/client/models/video_codec.py +36 -0
- immich/client/models/video_container.py +36 -0
- immich/client/models/workflow_action_item_dto.py +89 -0
- immich/client/models/workflow_action_response_dto.py +105 -0
- immich/client/models/workflow_create_dto.py +128 -0
- immich/client/models/workflow_filter_item_dto.py +89 -0
- immich/client/models/workflow_filter_response_dto.py +105 -0
- immich/client/models/workflow_response_dto.py +144 -0
- immich/client/models/workflow_update_dto.py +128 -0
- immich/client/py.typed +0 -0
- immich/client/rest.py +199 -0
- immich/client_wrapper/__init__.py +15 -0
- immich/client_wrapper/assets_api_wrapped.py +87 -0
- immich/client_wrapper/download_api_wrapped.py +111 -0
- immich/client_wrapper/users_api_wrapped.py +41 -0
- immich/py.typed +0 -0
- immich/sdk.py +365 -0
- immich/utils.py +100 -0
- immich-1.2.1.dist-info/METADATA +166 -0
- immich-1.2.1.dist-info/RECORD +387 -0
- immich-1.2.1.dist-info/WHEEL +4 -0
- immich-1.2.1.dist-info/licenses/LICENSE +9 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import json
|
|
16
|
+
from enum import Enum
|
|
17
|
+
from typing_extensions import Self
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UserMetadataKey(str, Enum):
|
|
21
|
+
"""
|
|
22
|
+
UserMetadataKey
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
allowed enum values
|
|
27
|
+
"""
|
|
28
|
+
PREFERENCES = "preferences"
|
|
29
|
+
LICENSE = "license"
|
|
30
|
+
ONBOARDING = "onboarding"
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of UserMetadataKey from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
20
|
+
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from immich.client.models.albums_response import AlbumsResponse
|
|
22
|
+
from immich.client.models.cast_response import CastResponse
|
|
23
|
+
from immich.client.models.download_response import DownloadResponse
|
|
24
|
+
from immich.client.models.email_notifications_response import EmailNotificationsResponse
|
|
25
|
+
from immich.client.models.folders_response import FoldersResponse
|
|
26
|
+
from immich.client.models.memories_response import MemoriesResponse
|
|
27
|
+
from immich.client.models.people_response import PeopleResponse
|
|
28
|
+
from immich.client.models.purchase_response import PurchaseResponse
|
|
29
|
+
from immich.client.models.ratings_response import RatingsResponse
|
|
30
|
+
from immich.client.models.shared_links_response import SharedLinksResponse
|
|
31
|
+
from immich.client.models.tags_response import TagsResponse
|
|
32
|
+
from typing import Optional, Set
|
|
33
|
+
from typing_extensions import Self
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class UserPreferencesResponseDto(BaseModel):
|
|
37
|
+
"""
|
|
38
|
+
UserPreferencesResponseDto
|
|
39
|
+
""" # noqa: E501
|
|
40
|
+
|
|
41
|
+
albums: AlbumsResponse
|
|
42
|
+
cast: CastResponse
|
|
43
|
+
download: DownloadResponse
|
|
44
|
+
email_notifications: EmailNotificationsResponse = Field(alias="emailNotifications")
|
|
45
|
+
folders: FoldersResponse
|
|
46
|
+
memories: MemoriesResponse
|
|
47
|
+
people: PeopleResponse
|
|
48
|
+
purchase: PurchaseResponse
|
|
49
|
+
ratings: RatingsResponse
|
|
50
|
+
shared_links: SharedLinksResponse = Field(alias="sharedLinks")
|
|
51
|
+
tags: TagsResponse
|
|
52
|
+
__properties: ClassVar[List[str]] = [
|
|
53
|
+
"albums",
|
|
54
|
+
"cast",
|
|
55
|
+
"download",
|
|
56
|
+
"emailNotifications",
|
|
57
|
+
"folders",
|
|
58
|
+
"memories",
|
|
59
|
+
"people",
|
|
60
|
+
"purchase",
|
|
61
|
+
"ratings",
|
|
62
|
+
"sharedLinks",
|
|
63
|
+
"tags",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
model_config = ConfigDict(
|
|
67
|
+
populate_by_name=True,
|
|
68
|
+
validate_assignment=True,
|
|
69
|
+
protected_namespaces=(),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
def to_str(self) -> str:
|
|
73
|
+
"""Returns the string representation of the model using alias"""
|
|
74
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
75
|
+
|
|
76
|
+
def to_json(self) -> str:
|
|
77
|
+
"""Returns the JSON representation of the model using alias"""
|
|
78
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
79
|
+
return json.dumps(self.to_dict())
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of UserPreferencesResponseDto from a JSON string"""
|
|
84
|
+
return cls.from_dict(json.loads(json_str))
|
|
85
|
+
|
|
86
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
87
|
+
"""Return the dictionary representation of the model using alias.
|
|
88
|
+
|
|
89
|
+
This has the following differences from calling pydantic's
|
|
90
|
+
`self.model_dump(by_alias=True)`:
|
|
91
|
+
|
|
92
|
+
* `None` is only added to the output dict for nullable fields that
|
|
93
|
+
were set at model initialization. Other fields with value `None`
|
|
94
|
+
are ignored.
|
|
95
|
+
"""
|
|
96
|
+
excluded_fields: Set[str] = set([])
|
|
97
|
+
|
|
98
|
+
_dict = self.model_dump(
|
|
99
|
+
by_alias=True,
|
|
100
|
+
exclude=excluded_fields,
|
|
101
|
+
exclude_none=True,
|
|
102
|
+
)
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of albums
|
|
104
|
+
if self.albums:
|
|
105
|
+
_dict["albums"] = self.albums.to_dict()
|
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of cast
|
|
107
|
+
if self.cast:
|
|
108
|
+
_dict["cast"] = self.cast.to_dict()
|
|
109
|
+
# override the default output from pydantic by calling `to_dict()` of download
|
|
110
|
+
if self.download:
|
|
111
|
+
_dict["download"] = self.download.to_dict()
|
|
112
|
+
# override the default output from pydantic by calling `to_dict()` of email_notifications
|
|
113
|
+
if self.email_notifications:
|
|
114
|
+
_dict["emailNotifications"] = self.email_notifications.to_dict()
|
|
115
|
+
# override the default output from pydantic by calling `to_dict()` of folders
|
|
116
|
+
if self.folders:
|
|
117
|
+
_dict["folders"] = self.folders.to_dict()
|
|
118
|
+
# override the default output from pydantic by calling `to_dict()` of memories
|
|
119
|
+
if self.memories:
|
|
120
|
+
_dict["memories"] = self.memories.to_dict()
|
|
121
|
+
# override the default output from pydantic by calling `to_dict()` of people
|
|
122
|
+
if self.people:
|
|
123
|
+
_dict["people"] = self.people.to_dict()
|
|
124
|
+
# override the default output from pydantic by calling `to_dict()` of purchase
|
|
125
|
+
if self.purchase:
|
|
126
|
+
_dict["purchase"] = self.purchase.to_dict()
|
|
127
|
+
# override the default output from pydantic by calling `to_dict()` of ratings
|
|
128
|
+
if self.ratings:
|
|
129
|
+
_dict["ratings"] = self.ratings.to_dict()
|
|
130
|
+
# override the default output from pydantic by calling `to_dict()` of shared_links
|
|
131
|
+
if self.shared_links:
|
|
132
|
+
_dict["sharedLinks"] = self.shared_links.to_dict()
|
|
133
|
+
# override the default output from pydantic by calling `to_dict()` of tags
|
|
134
|
+
if self.tags:
|
|
135
|
+
_dict["tags"] = self.tags.to_dict()
|
|
136
|
+
return _dict
|
|
137
|
+
|
|
138
|
+
@classmethod
|
|
139
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
140
|
+
"""Create an instance of UserPreferencesResponseDto from a dict"""
|
|
141
|
+
if obj is None:
|
|
142
|
+
return None
|
|
143
|
+
|
|
144
|
+
if not isinstance(obj, dict):
|
|
145
|
+
return cls.model_validate(obj)
|
|
146
|
+
|
|
147
|
+
_obj = cls.model_validate(
|
|
148
|
+
{
|
|
149
|
+
"albums": AlbumsResponse.from_dict(obj["albums"])
|
|
150
|
+
if obj.get("albums") is not None
|
|
151
|
+
else None,
|
|
152
|
+
"cast": CastResponse.from_dict(obj["cast"])
|
|
153
|
+
if obj.get("cast") is not None
|
|
154
|
+
else None,
|
|
155
|
+
"download": DownloadResponse.from_dict(obj["download"])
|
|
156
|
+
if obj.get("download") is not None
|
|
157
|
+
else None,
|
|
158
|
+
"emailNotifications": EmailNotificationsResponse.from_dict(
|
|
159
|
+
obj["emailNotifications"]
|
|
160
|
+
)
|
|
161
|
+
if obj.get("emailNotifications") is not None
|
|
162
|
+
else None,
|
|
163
|
+
"folders": FoldersResponse.from_dict(obj["folders"])
|
|
164
|
+
if obj.get("folders") is not None
|
|
165
|
+
else None,
|
|
166
|
+
"memories": MemoriesResponse.from_dict(obj["memories"])
|
|
167
|
+
if obj.get("memories") is not None
|
|
168
|
+
else None,
|
|
169
|
+
"people": PeopleResponse.from_dict(obj["people"])
|
|
170
|
+
if obj.get("people") is not None
|
|
171
|
+
else None,
|
|
172
|
+
"purchase": PurchaseResponse.from_dict(obj["purchase"])
|
|
173
|
+
if obj.get("purchase") is not None
|
|
174
|
+
else None,
|
|
175
|
+
"ratings": RatingsResponse.from_dict(obj["ratings"])
|
|
176
|
+
if obj.get("ratings") is not None
|
|
177
|
+
else None,
|
|
178
|
+
"sharedLinks": SharedLinksResponse.from_dict(obj["sharedLinks"])
|
|
179
|
+
if obj.get("sharedLinks") is not None
|
|
180
|
+
else None,
|
|
181
|
+
"tags": TagsResponse.from_dict(obj["tags"])
|
|
182
|
+
if obj.get("tags") is not None
|
|
183
|
+
else None,
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
return _obj
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from immich.client.models.albums_update import AlbumsUpdate
|
|
22
|
+
from immich.client.models.avatar_update import AvatarUpdate
|
|
23
|
+
from immich.client.models.cast_update import CastUpdate
|
|
24
|
+
from immich.client.models.download_update import DownloadUpdate
|
|
25
|
+
from immich.client.models.email_notifications_update import EmailNotificationsUpdate
|
|
26
|
+
from immich.client.models.folders_update import FoldersUpdate
|
|
27
|
+
from immich.client.models.memories_update import MemoriesUpdate
|
|
28
|
+
from immich.client.models.people_update import PeopleUpdate
|
|
29
|
+
from immich.client.models.purchase_update import PurchaseUpdate
|
|
30
|
+
from immich.client.models.ratings_update import RatingsUpdate
|
|
31
|
+
from immich.client.models.shared_links_update import SharedLinksUpdate
|
|
32
|
+
from immich.client.models.tags_update import TagsUpdate
|
|
33
|
+
from typing import Set
|
|
34
|
+
from typing_extensions import Self
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class UserPreferencesUpdateDto(BaseModel):
|
|
38
|
+
"""
|
|
39
|
+
UserPreferencesUpdateDto
|
|
40
|
+
""" # noqa: E501
|
|
41
|
+
|
|
42
|
+
albums: Optional[AlbumsUpdate] = None
|
|
43
|
+
avatar: Optional[AvatarUpdate] = None
|
|
44
|
+
cast: Optional[CastUpdate] = None
|
|
45
|
+
download: Optional[DownloadUpdate] = None
|
|
46
|
+
email_notifications: Optional[EmailNotificationsUpdate] = Field(
|
|
47
|
+
default=None, alias="emailNotifications"
|
|
48
|
+
)
|
|
49
|
+
folders: Optional[FoldersUpdate] = None
|
|
50
|
+
memories: Optional[MemoriesUpdate] = None
|
|
51
|
+
people: Optional[PeopleUpdate] = None
|
|
52
|
+
purchase: Optional[PurchaseUpdate] = None
|
|
53
|
+
ratings: Optional[RatingsUpdate] = None
|
|
54
|
+
shared_links: Optional[SharedLinksUpdate] = Field(default=None, alias="sharedLinks")
|
|
55
|
+
tags: Optional[TagsUpdate] = None
|
|
56
|
+
__properties: ClassVar[List[str]] = [
|
|
57
|
+
"albums",
|
|
58
|
+
"avatar",
|
|
59
|
+
"cast",
|
|
60
|
+
"download",
|
|
61
|
+
"emailNotifications",
|
|
62
|
+
"folders",
|
|
63
|
+
"memories",
|
|
64
|
+
"people",
|
|
65
|
+
"purchase",
|
|
66
|
+
"ratings",
|
|
67
|
+
"sharedLinks",
|
|
68
|
+
"tags",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
model_config = ConfigDict(
|
|
72
|
+
populate_by_name=True,
|
|
73
|
+
validate_assignment=True,
|
|
74
|
+
protected_namespaces=(),
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def to_str(self) -> str:
|
|
78
|
+
"""Returns the string representation of the model using alias"""
|
|
79
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
80
|
+
|
|
81
|
+
def to_json(self) -> str:
|
|
82
|
+
"""Returns the JSON representation of the model using alias"""
|
|
83
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
84
|
+
return json.dumps(self.to_dict())
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of UserPreferencesUpdateDto from a JSON string"""
|
|
89
|
+
return cls.from_dict(json.loads(json_str))
|
|
90
|
+
|
|
91
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
92
|
+
"""Return the dictionary representation of the model using alias.
|
|
93
|
+
|
|
94
|
+
This has the following differences from calling pydantic's
|
|
95
|
+
`self.model_dump(by_alias=True)`:
|
|
96
|
+
|
|
97
|
+
* `None` is only added to the output dict for nullable fields that
|
|
98
|
+
were set at model initialization. Other fields with value `None`
|
|
99
|
+
are ignored.
|
|
100
|
+
"""
|
|
101
|
+
excluded_fields: Set[str] = set([])
|
|
102
|
+
|
|
103
|
+
_dict = self.model_dump(
|
|
104
|
+
by_alias=True,
|
|
105
|
+
exclude=excluded_fields,
|
|
106
|
+
exclude_none=True,
|
|
107
|
+
)
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of albums
|
|
109
|
+
if self.albums:
|
|
110
|
+
_dict["albums"] = self.albums.to_dict()
|
|
111
|
+
# override the default output from pydantic by calling `to_dict()` of avatar
|
|
112
|
+
if self.avatar:
|
|
113
|
+
_dict["avatar"] = self.avatar.to_dict()
|
|
114
|
+
# override the default output from pydantic by calling `to_dict()` of cast
|
|
115
|
+
if self.cast:
|
|
116
|
+
_dict["cast"] = self.cast.to_dict()
|
|
117
|
+
# override the default output from pydantic by calling `to_dict()` of download
|
|
118
|
+
if self.download:
|
|
119
|
+
_dict["download"] = self.download.to_dict()
|
|
120
|
+
# override the default output from pydantic by calling `to_dict()` of email_notifications
|
|
121
|
+
if self.email_notifications:
|
|
122
|
+
_dict["emailNotifications"] = self.email_notifications.to_dict()
|
|
123
|
+
# override the default output from pydantic by calling `to_dict()` of folders
|
|
124
|
+
if self.folders:
|
|
125
|
+
_dict["folders"] = self.folders.to_dict()
|
|
126
|
+
# override the default output from pydantic by calling `to_dict()` of memories
|
|
127
|
+
if self.memories:
|
|
128
|
+
_dict["memories"] = self.memories.to_dict()
|
|
129
|
+
# override the default output from pydantic by calling `to_dict()` of people
|
|
130
|
+
if self.people:
|
|
131
|
+
_dict["people"] = self.people.to_dict()
|
|
132
|
+
# override the default output from pydantic by calling `to_dict()` of purchase
|
|
133
|
+
if self.purchase:
|
|
134
|
+
_dict["purchase"] = self.purchase.to_dict()
|
|
135
|
+
# override the default output from pydantic by calling `to_dict()` of ratings
|
|
136
|
+
if self.ratings:
|
|
137
|
+
_dict["ratings"] = self.ratings.to_dict()
|
|
138
|
+
# override the default output from pydantic by calling `to_dict()` of shared_links
|
|
139
|
+
if self.shared_links:
|
|
140
|
+
_dict["sharedLinks"] = self.shared_links.to_dict()
|
|
141
|
+
# override the default output from pydantic by calling `to_dict()` of tags
|
|
142
|
+
if self.tags:
|
|
143
|
+
_dict["tags"] = self.tags.to_dict()
|
|
144
|
+
return _dict
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
148
|
+
"""Create an instance of UserPreferencesUpdateDto from a dict"""
|
|
149
|
+
if obj is None:
|
|
150
|
+
return None
|
|
151
|
+
|
|
152
|
+
if not isinstance(obj, dict):
|
|
153
|
+
return cls.model_validate(obj)
|
|
154
|
+
|
|
155
|
+
_obj = cls.model_validate(
|
|
156
|
+
{
|
|
157
|
+
"albums": AlbumsUpdate.from_dict(obj["albums"])
|
|
158
|
+
if obj.get("albums") is not None
|
|
159
|
+
else None,
|
|
160
|
+
"avatar": AvatarUpdate.from_dict(obj["avatar"])
|
|
161
|
+
if obj.get("avatar") is not None
|
|
162
|
+
else None,
|
|
163
|
+
"cast": CastUpdate.from_dict(obj["cast"])
|
|
164
|
+
if obj.get("cast") is not None
|
|
165
|
+
else None,
|
|
166
|
+
"download": DownloadUpdate.from_dict(obj["download"])
|
|
167
|
+
if obj.get("download") is not None
|
|
168
|
+
else None,
|
|
169
|
+
"emailNotifications": EmailNotificationsUpdate.from_dict(
|
|
170
|
+
obj["emailNotifications"]
|
|
171
|
+
)
|
|
172
|
+
if obj.get("emailNotifications") is not None
|
|
173
|
+
else None,
|
|
174
|
+
"folders": FoldersUpdate.from_dict(obj["folders"])
|
|
175
|
+
if obj.get("folders") is not None
|
|
176
|
+
else None,
|
|
177
|
+
"memories": MemoriesUpdate.from_dict(obj["memories"])
|
|
178
|
+
if obj.get("memories") is not None
|
|
179
|
+
else None,
|
|
180
|
+
"people": PeopleUpdate.from_dict(obj["people"])
|
|
181
|
+
if obj.get("people") is not None
|
|
182
|
+
else None,
|
|
183
|
+
"purchase": PurchaseUpdate.from_dict(obj["purchase"])
|
|
184
|
+
if obj.get("purchase") is not None
|
|
185
|
+
else None,
|
|
186
|
+
"ratings": RatingsUpdate.from_dict(obj["ratings"])
|
|
187
|
+
if obj.get("ratings") is not None
|
|
188
|
+
else None,
|
|
189
|
+
"sharedLinks": SharedLinksUpdate.from_dict(obj["sharedLinks"])
|
|
190
|
+
if obj.get("sharedLinks") is not None
|
|
191
|
+
else None,
|
|
192
|
+
"tags": TagsUpdate.from_dict(obj["tags"])
|
|
193
|
+
if obj.get("tags") is not None
|
|
194
|
+
else None,
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
return _obj
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from datetime import datetime
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from immich.client.models.user_avatar_color import UserAvatarColor
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class UserResponseDto(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
UserResponseDto
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
avatar_color: UserAvatarColor = Field(alias="avatarColor")
|
|
33
|
+
email: StrictStr
|
|
34
|
+
id: StrictStr
|
|
35
|
+
name: StrictStr
|
|
36
|
+
profile_changed_at: datetime = Field(alias="profileChangedAt")
|
|
37
|
+
profile_image_path: StrictStr = Field(alias="profileImagePath")
|
|
38
|
+
__properties: ClassVar[List[str]] = [
|
|
39
|
+
"avatarColor",
|
|
40
|
+
"email",
|
|
41
|
+
"id",
|
|
42
|
+
"name",
|
|
43
|
+
"profileChangedAt",
|
|
44
|
+
"profileImagePath",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
+
"""Create an instance of UserResponseDto from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of UserResponseDto from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate(
|
|
96
|
+
{
|
|
97
|
+
"avatarColor": obj.get("avatarColor"),
|
|
98
|
+
"email": obj.get("email"),
|
|
99
|
+
"id": obj.get("id"),
|
|
100
|
+
"name": obj.get("name"),
|
|
101
|
+
"profileChangedAt": obj.get("profileChangedAt"),
|
|
102
|
+
"profileImagePath": obj.get("profileImagePath"),
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
return _obj
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import json
|
|
16
|
+
from enum import Enum
|
|
17
|
+
from typing_extensions import Self
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UserStatus(str, Enum):
|
|
21
|
+
"""
|
|
22
|
+
UserStatus
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
allowed enum values
|
|
27
|
+
"""
|
|
28
|
+
ACTIVE = "active"
|
|
29
|
+
REMOVING = "removing"
|
|
30
|
+
DELETED = "deleted"
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of UserStatus from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from immich.client.models.user_avatar_color import UserAvatarColor
|
|
22
|
+
from typing import Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class UserUpdateMeDto(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UserUpdateMeDto
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
avatar_color: Optional[UserAvatarColor] = Field(default=None, alias="avatarColor")
|
|
32
|
+
email: Optional[StrictStr] = None
|
|
33
|
+
name: Optional[StrictStr] = None
|
|
34
|
+
password: Optional[StrictStr] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["avatarColor", "email", "name", "password"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of UserUpdateMeDto from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# set to None if avatar_color (nullable) is None
|
|
75
|
+
# and model_fields_set contains the field
|
|
76
|
+
if self.avatar_color is None and "avatar_color" in self.model_fields_set:
|
|
77
|
+
_dict["avatarColor"] = None
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of UserUpdateMeDto from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate(
|
|
91
|
+
{
|
|
92
|
+
"avatarColor": obj.get("avatarColor"),
|
|
93
|
+
"email": obj.get("email"),
|
|
94
|
+
"name": obj.get("name"),
|
|
95
|
+
"password": obj.get("password"),
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
return _obj
|