[TASK] Initial version, with some help from Junie. Copies all files in albums to the local filesystem.

This commit is contained in:
2025-04-19 18:05:53 +02:00
parent f5fed71def
commit 1e2e7dfb5a
865 changed files with 119341 additions and 2 deletions

View File

@@ -0,0 +1,264 @@
# coding: utf-8
# flake8: noqa
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
# import models into model package
from generated.immich.openapi_client.models.api_key_create_dto import APIKeyCreateDto
from generated.immich.openapi_client.models.api_key_create_response_dto import APIKeyCreateResponseDto
from generated.immich.openapi_client.models.api_key_response_dto import APIKeyResponseDto
from generated.immich.openapi_client.models.api_key_update_dto import APIKeyUpdateDto
from generated.immich.openapi_client.models.activity_create_dto import ActivityCreateDto
from generated.immich.openapi_client.models.activity_response_dto import ActivityResponseDto
from generated.immich.openapi_client.models.activity_statistics_response_dto import ActivityStatisticsResponseDto
from generated.immich.openapi_client.models.add_users_dto import AddUsersDto
from generated.immich.openapi_client.models.admin_onboarding_update_dto import AdminOnboardingUpdateDto
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.models.album_statistics_response_dto import AlbumStatisticsResponseDto
from generated.immich.openapi_client.models.album_user_add_dto import AlbumUserAddDto
from generated.immich.openapi_client.models.album_user_create_dto import AlbumUserCreateDto
from generated.immich.openapi_client.models.album_user_response_dto import AlbumUserResponseDto
from generated.immich.openapi_client.models.album_user_role import AlbumUserRole
from generated.immich.openapi_client.models.all_job_status_response_dto import AllJobStatusResponseDto
from generated.immich.openapi_client.models.asset_bulk_delete_dto import AssetBulkDeleteDto
from generated.immich.openapi_client.models.asset_bulk_update_dto import AssetBulkUpdateDto
from generated.immich.openapi_client.models.asset_bulk_upload_check_dto import AssetBulkUploadCheckDto
from generated.immich.openapi_client.models.asset_bulk_upload_check_item import AssetBulkUploadCheckItem
from generated.immich.openapi_client.models.asset_bulk_upload_check_response_dto import AssetBulkUploadCheckResponseDto
from generated.immich.openapi_client.models.asset_bulk_upload_check_result import AssetBulkUploadCheckResult
from generated.immich.openapi_client.models.asset_delta_sync_dto import AssetDeltaSyncDto
from generated.immich.openapi_client.models.asset_delta_sync_response_dto import AssetDeltaSyncResponseDto
from generated.immich.openapi_client.models.asset_face_create_dto import AssetFaceCreateDto
from generated.immich.openapi_client.models.asset_face_delete_dto import AssetFaceDeleteDto
from generated.immich.openapi_client.models.asset_face_response_dto import AssetFaceResponseDto
from generated.immich.openapi_client.models.asset_face_update_dto import AssetFaceUpdateDto
from generated.immich.openapi_client.models.asset_face_update_item import AssetFaceUpdateItem
from generated.immich.openapi_client.models.asset_face_without_person_response_dto import AssetFaceWithoutPersonResponseDto
from generated.immich.openapi_client.models.asset_full_sync_dto import AssetFullSyncDto
from generated.immich.openapi_client.models.asset_ids_dto import AssetIdsDto
from generated.immich.openapi_client.models.asset_ids_response_dto import AssetIdsResponseDto
from generated.immich.openapi_client.models.asset_job_name import AssetJobName
from generated.immich.openapi_client.models.asset_jobs_dto import AssetJobsDto
from generated.immich.openapi_client.models.asset_media_response_dto import AssetMediaResponseDto
from generated.immich.openapi_client.models.asset_media_size import AssetMediaSize
from generated.immich.openapi_client.models.asset_media_status import AssetMediaStatus
from generated.immich.openapi_client.models.asset_order import AssetOrder
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from generated.immich.openapi_client.models.asset_stack_response_dto import AssetStackResponseDto
from generated.immich.openapi_client.models.asset_stats_response_dto import AssetStatsResponseDto
from generated.immich.openapi_client.models.asset_type_enum import AssetTypeEnum
from generated.immich.openapi_client.models.audio_codec import AudioCodec
from generated.immich.openapi_client.models.avatar_response import AvatarResponse
from generated.immich.openapi_client.models.avatar_update import AvatarUpdate
from generated.immich.openapi_client.models.bulk_id_response_dto import BulkIdResponseDto
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
from generated.immich.openapi_client.models.clip_config import CLIPConfig
from generated.immich.openapi_client.models.cq_mode import CQMode
from generated.immich.openapi_client.models.change_password_dto import ChangePasswordDto
from generated.immich.openapi_client.models.check_existing_assets_dto import CheckExistingAssetsDto
from generated.immich.openapi_client.models.check_existing_assets_response_dto import CheckExistingAssetsResponseDto
from generated.immich.openapi_client.models.colorspace import Colorspace
from generated.immich.openapi_client.models.create_album_dto import CreateAlbumDto
from generated.immich.openapi_client.models.create_library_dto import CreateLibraryDto
from generated.immich.openapi_client.models.create_profile_image_response_dto import CreateProfileImageResponseDto
from generated.immich.openapi_client.models.database_backup_config import DatabaseBackupConfig
from generated.immich.openapi_client.models.download_archive_info import DownloadArchiveInfo
from generated.immich.openapi_client.models.download_info_dto import DownloadInfoDto
from generated.immich.openapi_client.models.download_response import DownloadResponse
from generated.immich.openapi_client.models.download_response_dto import DownloadResponseDto
from generated.immich.openapi_client.models.download_update import DownloadUpdate
from generated.immich.openapi_client.models.duplicate_detection_config import DuplicateDetectionConfig
from generated.immich.openapi_client.models.duplicate_response_dto import DuplicateResponseDto
from generated.immich.openapi_client.models.email_notifications_response import EmailNotificationsResponse
from generated.immich.openapi_client.models.email_notifications_update import EmailNotificationsUpdate
from generated.immich.openapi_client.models.exif_response_dto import ExifResponseDto
from generated.immich.openapi_client.models.face_dto import FaceDto
from generated.immich.openapi_client.models.facial_recognition_config import FacialRecognitionConfig
from generated.immich.openapi_client.models.file_checksum_dto import FileChecksumDto
from generated.immich.openapi_client.models.file_checksum_response_dto import FileChecksumResponseDto
from generated.immich.openapi_client.models.file_report_dto import FileReportDto
from generated.immich.openapi_client.models.file_report_fix_dto import FileReportFixDto
from generated.immich.openapi_client.models.file_report_item_dto import FileReportItemDto
from generated.immich.openapi_client.models.folders_response import FoldersResponse
from generated.immich.openapi_client.models.folders_update import FoldersUpdate
from generated.immich.openapi_client.models.image_format import ImageFormat
from generated.immich.openapi_client.models.job_command import JobCommand
from generated.immich.openapi_client.models.job_command_dto import JobCommandDto
from generated.immich.openapi_client.models.job_counts_dto import JobCountsDto
from generated.immich.openapi_client.models.job_create_dto import JobCreateDto
from generated.immich.openapi_client.models.job_name import JobName
from generated.immich.openapi_client.models.job_settings_dto import JobSettingsDto
from generated.immich.openapi_client.models.job_status_dto import JobStatusDto
from generated.immich.openapi_client.models.library_response_dto import LibraryResponseDto
from generated.immich.openapi_client.models.library_stats_response_dto import LibraryStatsResponseDto
from generated.immich.openapi_client.models.license_key_dto import LicenseKeyDto
from generated.immich.openapi_client.models.license_response_dto import LicenseResponseDto
from generated.immich.openapi_client.models.log_level import LogLevel
from generated.immich.openapi_client.models.login_credential_dto import LoginCredentialDto
from generated.immich.openapi_client.models.login_response_dto import LoginResponseDto
from generated.immich.openapi_client.models.logout_response_dto import LogoutResponseDto
from generated.immich.openapi_client.models.manual_job_name import ManualJobName
from generated.immich.openapi_client.models.map_marker_response_dto import MapMarkerResponseDto
from generated.immich.openapi_client.models.map_reverse_geocode_response_dto import MapReverseGeocodeResponseDto
from generated.immich.openapi_client.models.memories_response import MemoriesResponse
from generated.immich.openapi_client.models.memories_update import MemoriesUpdate
from generated.immich.openapi_client.models.memory_create_dto import MemoryCreateDto
from generated.immich.openapi_client.models.memory_lane_response_dto import MemoryLaneResponseDto
from generated.immich.openapi_client.models.memory_response_dto import MemoryResponseDto
from generated.immich.openapi_client.models.memory_type import MemoryType
from generated.immich.openapi_client.models.memory_update_dto import MemoryUpdateDto
from generated.immich.openapi_client.models.merge_person_dto import MergePersonDto
from generated.immich.openapi_client.models.metadata_search_dto import MetadataSearchDto
from generated.immich.openapi_client.models.o_auth_authorize_response_dto import OAuthAuthorizeResponseDto
from generated.immich.openapi_client.models.o_auth_callback_dto import OAuthCallbackDto
from generated.immich.openapi_client.models.o_auth_config_dto import OAuthConfigDto
from generated.immich.openapi_client.models.on_this_day_dto import OnThisDayDto
from generated.immich.openapi_client.models.partner_direction import PartnerDirection
from generated.immich.openapi_client.models.partner_response_dto import PartnerResponseDto
from generated.immich.openapi_client.models.path_entity_type import PathEntityType
from generated.immich.openapi_client.models.path_type import PathType
from generated.immich.openapi_client.models.people_response import PeopleResponse
from generated.immich.openapi_client.models.people_response_dto import PeopleResponseDto
from generated.immich.openapi_client.models.people_update import PeopleUpdate
from generated.immich.openapi_client.models.people_update_dto import PeopleUpdateDto
from generated.immich.openapi_client.models.people_update_item import PeopleUpdateItem
from generated.immich.openapi_client.models.permission import Permission
from generated.immich.openapi_client.models.person_create_dto import PersonCreateDto
from generated.immich.openapi_client.models.person_response_dto import PersonResponseDto
from generated.immich.openapi_client.models.person_statistics_response_dto import PersonStatisticsResponseDto
from generated.immich.openapi_client.models.person_update_dto import PersonUpdateDto
from generated.immich.openapi_client.models.person_with_faces_response_dto import PersonWithFacesResponseDto
from generated.immich.openapi_client.models.places_response_dto import PlacesResponseDto
from generated.immich.openapi_client.models.purchase_response import PurchaseResponse
from generated.immich.openapi_client.models.purchase_update import PurchaseUpdate
from generated.immich.openapi_client.models.queue_status_dto import QueueStatusDto
from generated.immich.openapi_client.models.random_search_dto import RandomSearchDto
from generated.immich.openapi_client.models.ratings_response import RatingsResponse
from generated.immich.openapi_client.models.ratings_update import RatingsUpdate
from generated.immich.openapi_client.models.reaction_level import ReactionLevel
from generated.immich.openapi_client.models.reaction_type import ReactionType
from generated.immich.openapi_client.models.reverse_geocoding_state_response_dto import ReverseGeocodingStateResponseDto
from generated.immich.openapi_client.models.search_album_response_dto import SearchAlbumResponseDto
from generated.immich.openapi_client.models.search_asset_response_dto import SearchAssetResponseDto
from generated.immich.openapi_client.models.search_explore_item import SearchExploreItem
from generated.immich.openapi_client.models.search_explore_response_dto import SearchExploreResponseDto
from generated.immich.openapi_client.models.search_facet_count_response_dto import SearchFacetCountResponseDto
from generated.immich.openapi_client.models.search_facet_response_dto import SearchFacetResponseDto
from generated.immich.openapi_client.models.search_response_dto import SearchResponseDto
from generated.immich.openapi_client.models.search_suggestion_type import SearchSuggestionType
from generated.immich.openapi_client.models.server_about_response_dto import ServerAboutResponseDto
from generated.immich.openapi_client.models.server_config_dto import ServerConfigDto
from generated.immich.openapi_client.models.server_features_dto import ServerFeaturesDto
from generated.immich.openapi_client.models.server_media_types_response_dto import ServerMediaTypesResponseDto
from generated.immich.openapi_client.models.server_ping_response import ServerPingResponse
from generated.immich.openapi_client.models.server_stats_response_dto import ServerStatsResponseDto
from generated.immich.openapi_client.models.server_storage_response_dto import ServerStorageResponseDto
from generated.immich.openapi_client.models.server_theme_dto import ServerThemeDto
from generated.immich.openapi_client.models.server_version_history_response_dto import ServerVersionHistoryResponseDto
from generated.immich.openapi_client.models.server_version_response_dto import ServerVersionResponseDto
from generated.immich.openapi_client.models.session_response_dto import SessionResponseDto
from generated.immich.openapi_client.models.shared_link_create_dto import SharedLinkCreateDto
from generated.immich.openapi_client.models.shared_link_edit_dto import SharedLinkEditDto
from generated.immich.openapi_client.models.shared_link_response_dto import SharedLinkResponseDto
from generated.immich.openapi_client.models.shared_link_type import SharedLinkType
from generated.immich.openapi_client.models.shared_links_response import SharedLinksResponse
from generated.immich.openapi_client.models.shared_links_update import SharedLinksUpdate
from generated.immich.openapi_client.models.sign_up_dto import SignUpDto
from generated.immich.openapi_client.models.smart_search_dto import SmartSearchDto
from generated.immich.openapi_client.models.source_type import SourceType
from generated.immich.openapi_client.models.stack_create_dto import StackCreateDto
from generated.immich.openapi_client.models.stack_response_dto import StackResponseDto
from generated.immich.openapi_client.models.stack_update_dto import StackUpdateDto
from generated.immich.openapi_client.models.sync_ack_delete_dto import SyncAckDeleteDto
from generated.immich.openapi_client.models.sync_ack_dto import SyncAckDto
from generated.immich.openapi_client.models.sync_ack_set_dto import SyncAckSetDto
from generated.immich.openapi_client.models.sync_asset_delete_v1 import SyncAssetDeleteV1
from generated.immich.openapi_client.models.sync_asset_exif_v1 import SyncAssetExifV1
from generated.immich.openapi_client.models.sync_asset_v1 import SyncAssetV1
from generated.immich.openapi_client.models.sync_entity_type import SyncEntityType
from generated.immich.openapi_client.models.sync_partner_delete_v1 import SyncPartnerDeleteV1
from generated.immich.openapi_client.models.sync_partner_v1 import SyncPartnerV1
from generated.immich.openapi_client.models.sync_request_type import SyncRequestType
from generated.immich.openapi_client.models.sync_stream_dto import SyncStreamDto
from generated.immich.openapi_client.models.sync_user_delete_v1 import SyncUserDeleteV1
from generated.immich.openapi_client.models.sync_user_v1 import SyncUserV1
from generated.immich.openapi_client.models.system_config_backups_dto import SystemConfigBackupsDto
from generated.immich.openapi_client.models.system_config_dto import SystemConfigDto
from generated.immich.openapi_client.models.system_config_f_fmpeg_dto import SystemConfigFFmpegDto
from generated.immich.openapi_client.models.system_config_faces_dto import SystemConfigFacesDto
from generated.immich.openapi_client.models.system_config_generated_fullsize_image_dto import SystemConfigGeneratedFullsizeImageDto
from generated.immich.openapi_client.models.system_config_generated_image_dto import SystemConfigGeneratedImageDto
from generated.immich.openapi_client.models.system_config_image_dto import SystemConfigImageDto
from generated.immich.openapi_client.models.system_config_job_dto import SystemConfigJobDto
from generated.immich.openapi_client.models.system_config_library_dto import SystemConfigLibraryDto
from generated.immich.openapi_client.models.system_config_library_scan_dto import SystemConfigLibraryScanDto
from generated.immich.openapi_client.models.system_config_library_watch_dto import SystemConfigLibraryWatchDto
from generated.immich.openapi_client.models.system_config_logging_dto import SystemConfigLoggingDto
from generated.immich.openapi_client.models.system_config_machine_learning_dto import SystemConfigMachineLearningDto
from generated.immich.openapi_client.models.system_config_map_dto import SystemConfigMapDto
from generated.immich.openapi_client.models.system_config_metadata_dto import SystemConfigMetadataDto
from generated.immich.openapi_client.models.system_config_new_version_check_dto import SystemConfigNewVersionCheckDto
from generated.immich.openapi_client.models.system_config_notifications_dto import SystemConfigNotificationsDto
from generated.immich.openapi_client.models.system_config_o_auth_dto import SystemConfigOAuthDto
from generated.immich.openapi_client.models.system_config_password_login_dto import SystemConfigPasswordLoginDto
from generated.immich.openapi_client.models.system_config_reverse_geocoding_dto import SystemConfigReverseGeocodingDto
from generated.immich.openapi_client.models.system_config_server_dto import SystemConfigServerDto
from generated.immich.openapi_client.models.system_config_smtp_dto import SystemConfigSmtpDto
from generated.immich.openapi_client.models.system_config_smtp_transport_dto import SystemConfigSmtpTransportDto
from generated.immich.openapi_client.models.system_config_storage_template_dto import SystemConfigStorageTemplateDto
from generated.immich.openapi_client.models.system_config_template_emails_dto import SystemConfigTemplateEmailsDto
from generated.immich.openapi_client.models.system_config_template_storage_option_dto import SystemConfigTemplateStorageOptionDto
from generated.immich.openapi_client.models.system_config_templates_dto import SystemConfigTemplatesDto
from generated.immich.openapi_client.models.system_config_theme_dto import SystemConfigThemeDto
from generated.immich.openapi_client.models.system_config_trash_dto import SystemConfigTrashDto
from generated.immich.openapi_client.models.system_config_user_dto import SystemConfigUserDto
from generated.immich.openapi_client.models.tag_bulk_assets_dto import TagBulkAssetsDto
from generated.immich.openapi_client.models.tag_bulk_assets_response_dto import TagBulkAssetsResponseDto
from generated.immich.openapi_client.models.tag_create_dto import TagCreateDto
from generated.immich.openapi_client.models.tag_response_dto import TagResponseDto
from generated.immich.openapi_client.models.tag_update_dto import TagUpdateDto
from generated.immich.openapi_client.models.tag_upsert_dto import TagUpsertDto
from generated.immich.openapi_client.models.tags_response import TagsResponse
from generated.immich.openapi_client.models.tags_update import TagsUpdate
from generated.immich.openapi_client.models.template_dto import TemplateDto
from generated.immich.openapi_client.models.template_response_dto import TemplateResponseDto
from generated.immich.openapi_client.models.test_email_response_dto import TestEmailResponseDto
from generated.immich.openapi_client.models.time_bucket_response_dto import TimeBucketResponseDto
from generated.immich.openapi_client.models.time_bucket_size import TimeBucketSize
from generated.immich.openapi_client.models.tone_mapping import ToneMapping
from generated.immich.openapi_client.models.transcode_hw_accel import TranscodeHWAccel
from generated.immich.openapi_client.models.transcode_policy import TranscodePolicy
from generated.immich.openapi_client.models.trash_response_dto import TrashResponseDto
from generated.immich.openapi_client.models.update_album_dto import UpdateAlbumDto
from generated.immich.openapi_client.models.update_album_user_dto import UpdateAlbumUserDto
from generated.immich.openapi_client.models.update_asset_dto import UpdateAssetDto
from generated.immich.openapi_client.models.update_library_dto import UpdateLibraryDto
from generated.immich.openapi_client.models.update_partner_dto import UpdatePartnerDto
from generated.immich.openapi_client.models.usage_by_user_dto import UsageByUserDto
from generated.immich.openapi_client.models.user_admin_create_dto import UserAdminCreateDto
from generated.immich.openapi_client.models.user_admin_delete_dto import UserAdminDeleteDto
from generated.immich.openapi_client.models.user_admin_response_dto import UserAdminResponseDto
from generated.immich.openapi_client.models.user_admin_update_dto import UserAdminUpdateDto
from generated.immich.openapi_client.models.user_avatar_color import UserAvatarColor
from generated.immich.openapi_client.models.user_license import UserLicense
from generated.immich.openapi_client.models.user_preferences_response_dto import UserPreferencesResponseDto
from generated.immich.openapi_client.models.user_preferences_update_dto import UserPreferencesUpdateDto
from generated.immich.openapi_client.models.user_response_dto import UserResponseDto
from generated.immich.openapi_client.models.user_status import UserStatus
from generated.immich.openapi_client.models.user_update_me_dto import UserUpdateMeDto
from generated.immich.openapi_client.models.validate_access_token_response_dto import ValidateAccessTokenResponseDto
from generated.immich.openapi_client.models.validate_library_dto import ValidateLibraryDto
from generated.immich.openapi_client.models.validate_library_import_path_response_dto import ValidateLibraryImportPathResponseDto
from generated.immich.openapi_client.models.validate_library_response_dto import ValidateLibraryResponseDto
from generated.immich.openapi_client.models.video_codec import VideoCodec
from generated.immich.openapi_client.models.video_container import VideoContainer

View File

@@ -0,0 +1,94 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.reaction_type import ReactionType
from typing import Optional, Set
from typing_extensions import Self
class ActivityCreateDto(BaseModel):
"""
ActivityCreateDto
""" # noqa: E501
album_id: StrictStr = Field(alias="albumId")
asset_id: Optional[StrictStr] = Field(default=None, alias="assetId")
comment: Optional[StrictStr] = None
type: ReactionType
__properties: ClassVar[List[str]] = ["albumId", "assetId", "comment", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ActivityCreateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ActivityCreateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"albumId": obj.get("albumId"),
"assetId": obj.get("assetId"),
"comment": obj.get("comment"),
"type": obj.get("type")
})
return _obj

View File

@@ -0,0 +1,113 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.reaction_type import ReactionType
from generated.immich.openapi_client.models.user_response_dto import UserResponseDto
from typing import Optional, Set
from typing_extensions import Self
class ActivityResponseDto(BaseModel):
"""
ActivityResponseDto
""" # noqa: E501
asset_id: Optional[StrictStr] = Field(alias="assetId")
comment: Optional[StrictStr] = None
created_at: datetime = Field(alias="createdAt")
id: StrictStr
type: ReactionType
user: UserResponseDto
__properties: ClassVar[List[str]] = ["assetId", "comment", "createdAt", "id", "type", "user"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ActivityResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of user
if self.user:
_dict['user'] = self.user.to_dict()
# set to None if asset_id (nullable) is None
# and model_fields_set contains the field
if self.asset_id is None and "asset_id" in self.model_fields_set:
_dict['assetId'] = None
# set to None if comment (nullable) is None
# and model_fields_set contains the field
if self.comment is None and "comment" in self.model_fields_set:
_dict['comment'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ActivityResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetId": obj.get("assetId"),
"comment": obj.get("comment"),
"createdAt": obj.get("createdAt"),
"id": obj.get("id"),
"type": obj.get("type"),
"user": UserResponseDto.from_dict(obj["user"]) if obj.get("user") is not None else None
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class ActivityStatisticsResponseDto(BaseModel):
"""
ActivityStatisticsResponseDto
""" # noqa: E501
comments: StrictInt
__properties: ClassVar[List[str]] = ["comments"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ActivityStatisticsResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ActivityStatisticsResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"comments": obj.get("comments")
})
return _obj

View File

@@ -0,0 +1,96 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated
from generated.immich.openapi_client.models.album_user_add_dto import AlbumUserAddDto
from typing import Optional, Set
from typing_extensions import Self
class AddUsersDto(BaseModel):
"""
AddUsersDto
""" # noqa: E501
album_users: Annotated[List[AlbumUserAddDto], Field(min_length=1)] = Field(alias="albumUsers")
__properties: ClassVar[List[str]] = ["albumUsers"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AddUsersDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in album_users (list)
_items = []
if self.album_users:
for _item_album_users in self.album_users:
if _item_album_users:
_items.append(_item_album_users.to_dict())
_dict['albumUsers'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AddUsersDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"albumUsers": [AlbumUserAddDto.from_dict(_item) for _item in obj["albumUsers"]] if obj.get("albumUsers") is not None else None
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AdminOnboardingUpdateDto(BaseModel):
"""
AdminOnboardingUpdateDto
""" # noqa: E501
is_onboarded: StrictBool = Field(alias="isOnboarded")
__properties: ClassVar[List[str]] = ["isOnboarded"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AdminOnboardingUpdateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AdminOnboardingUpdateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"isOnboarded": obj.get("isOnboarded")
})
return _obj

View File

@@ -0,0 +1,148 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.album_user_response_dto import AlbumUserResponseDto
from generated.immich.openapi_client.models.asset_order import AssetOrder
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from generated.immich.openapi_client.models.user_response_dto import UserResponseDto
from typing import Optional, Set
from typing_extensions import Self
class AlbumResponseDto(BaseModel):
"""
AlbumResponseDto
""" # noqa: E501
album_name: StrictStr = Field(alias="albumName")
album_thumbnail_asset_id: Optional[StrictStr] = Field(alias="albumThumbnailAssetId")
album_users: List[AlbumUserResponseDto] = Field(alias="albumUsers")
asset_count: StrictInt = Field(alias="assetCount")
assets: List[AssetResponseDto]
created_at: datetime = Field(alias="createdAt")
description: StrictStr
end_date: Optional[datetime] = Field(default=None, alias="endDate")
has_shared_link: StrictBool = Field(alias="hasSharedLink")
id: StrictStr
is_activity_enabled: StrictBool = Field(alias="isActivityEnabled")
last_modified_asset_timestamp: Optional[datetime] = Field(default=None, alias="lastModifiedAssetTimestamp")
order: Optional[AssetOrder] = None
owner: UserResponseDto
owner_id: StrictStr = Field(alias="ownerId")
shared: StrictBool
start_date: Optional[datetime] = Field(default=None, alias="startDate")
updated_at: datetime = Field(alias="updatedAt")
__properties: ClassVar[List[str]] = ["albumName", "albumThumbnailAssetId", "albumUsers", "assetCount", "assets", "createdAt", "description", "endDate", "hasSharedLink", "id", "isActivityEnabled", "lastModifiedAssetTimestamp", "order", "owner", "ownerId", "shared", "startDate", "updatedAt"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AlbumResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in album_users (list)
_items = []
if self.album_users:
for _item_album_users in self.album_users:
if _item_album_users:
_items.append(_item_album_users.to_dict())
_dict['albumUsers'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in assets (list)
_items = []
if self.assets:
for _item_assets in self.assets:
if _item_assets:
_items.append(_item_assets.to_dict())
_dict['assets'] = _items
# override the default output from pydantic by calling `to_dict()` of owner
if self.owner:
_dict['owner'] = self.owner.to_dict()
# set to None if album_thumbnail_asset_id (nullable) is None
# and model_fields_set contains the field
if self.album_thumbnail_asset_id is None and "album_thumbnail_asset_id" in self.model_fields_set:
_dict['albumThumbnailAssetId'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AlbumResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"albumName": obj.get("albumName"),
"albumThumbnailAssetId": obj.get("albumThumbnailAssetId"),
"albumUsers": [AlbumUserResponseDto.from_dict(_item) for _item in obj["albumUsers"]] if obj.get("albumUsers") is not None else None,
"assetCount": obj.get("assetCount"),
"assets": [AssetResponseDto.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None,
"createdAt": obj.get("createdAt"),
"description": obj.get("description"),
"endDate": obj.get("endDate"),
"hasSharedLink": obj.get("hasSharedLink"),
"id": obj.get("id"),
"isActivityEnabled": obj.get("isActivityEnabled"),
"lastModifiedAssetTimestamp": obj.get("lastModifiedAssetTimestamp"),
"order": obj.get("order"),
"owner": UserResponseDto.from_dict(obj["owner"]) if obj.get("owner") is not None else None,
"ownerId": obj.get("ownerId"),
"shared": obj.get("shared"),
"startDate": obj.get("startDate"),
"updatedAt": obj.get("updatedAt")
})
return _obj

View File

@@ -0,0 +1,91 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AlbumStatisticsResponseDto(BaseModel):
"""
AlbumStatisticsResponseDto
""" # noqa: E501
not_shared: StrictInt = Field(alias="notShared")
owned: StrictInt
shared: StrictInt
__properties: ClassVar[List[str]] = ["notShared", "owned", "shared"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AlbumStatisticsResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AlbumStatisticsResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"notShared": obj.get("notShared"),
"owned": obj.get("owned"),
"shared": obj.get("shared")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.album_user_role import AlbumUserRole
from typing import Optional, Set
from typing_extensions import Self
class AlbumUserAddDto(BaseModel):
"""
AlbumUserAddDto
""" # noqa: E501
role: Optional[AlbumUserRole] = None
user_id: StrictStr = Field(alias="userId")
__properties: ClassVar[List[str]] = ["role", "userId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AlbumUserAddDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AlbumUserAddDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"role": obj.get("role"),
"userId": obj.get("userId")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.album_user_role import AlbumUserRole
from typing import Optional, Set
from typing_extensions import Self
class AlbumUserCreateDto(BaseModel):
"""
AlbumUserCreateDto
""" # noqa: E501
role: AlbumUserRole
user_id: StrictStr = Field(alias="userId")
__properties: ClassVar[List[str]] = ["role", "userId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AlbumUserCreateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AlbumUserCreateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"role": obj.get("role"),
"userId": obj.get("userId")
})
return _obj

View File

@@ -0,0 +1,94 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.album_user_role import AlbumUserRole
from generated.immich.openapi_client.models.user_response_dto import UserResponseDto
from typing import Optional, Set
from typing_extensions import Self
class AlbumUserResponseDto(BaseModel):
"""
AlbumUserResponseDto
""" # noqa: E501
role: AlbumUserRole
user: UserResponseDto
__properties: ClassVar[List[str]] = ["role", "user"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AlbumUserResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of user
if self.user:
_dict['user'] = self.user.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AlbumUserResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"role": obj.get("role"),
"user": UserResponseDto.from_dict(obj["user"]) if obj.get("user") is not None else None
})
return _obj

View File

@@ -0,0 +1,37 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AlbumUserRole(str, Enum):
"""
AlbumUserRole
"""
"""
allowed enum values
"""
EDITOR = 'editor'
VIEWER = 'viewer'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AlbumUserRole from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,161 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.job_status_dto import JobStatusDto
from typing import Optional, Set
from typing_extensions import Self
class AllJobStatusResponseDto(BaseModel):
"""
AllJobStatusResponseDto
""" # noqa: E501
background_task: JobStatusDto = Field(alias="backgroundTask")
backup_database: JobStatusDto = Field(alias="backupDatabase")
duplicate_detection: JobStatusDto = Field(alias="duplicateDetection")
face_detection: JobStatusDto = Field(alias="faceDetection")
facial_recognition: JobStatusDto = Field(alias="facialRecognition")
library: JobStatusDto
metadata_extraction: JobStatusDto = Field(alias="metadataExtraction")
migration: JobStatusDto
notifications: JobStatusDto
search: JobStatusDto
sidecar: JobStatusDto
smart_search: JobStatusDto = Field(alias="smartSearch")
storage_template_migration: JobStatusDto = Field(alias="storageTemplateMigration")
thumbnail_generation: JobStatusDto = Field(alias="thumbnailGeneration")
video_conversion: JobStatusDto = Field(alias="videoConversion")
__properties: ClassVar[List[str]] = ["backgroundTask", "backupDatabase", "duplicateDetection", "faceDetection", "facialRecognition", "library", "metadataExtraction", "migration", "notifications", "search", "sidecar", "smartSearch", "storageTemplateMigration", "thumbnailGeneration", "videoConversion"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AllJobStatusResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of background_task
if self.background_task:
_dict['backgroundTask'] = self.background_task.to_dict()
# override the default output from pydantic by calling `to_dict()` of backup_database
if self.backup_database:
_dict['backupDatabase'] = self.backup_database.to_dict()
# override the default output from pydantic by calling `to_dict()` of duplicate_detection
if self.duplicate_detection:
_dict['duplicateDetection'] = self.duplicate_detection.to_dict()
# override the default output from pydantic by calling `to_dict()` of face_detection
if self.face_detection:
_dict['faceDetection'] = self.face_detection.to_dict()
# override the default output from pydantic by calling `to_dict()` of facial_recognition
if self.facial_recognition:
_dict['facialRecognition'] = self.facial_recognition.to_dict()
# override the default output from pydantic by calling `to_dict()` of library
if self.library:
_dict['library'] = self.library.to_dict()
# override the default output from pydantic by calling `to_dict()` of metadata_extraction
if self.metadata_extraction:
_dict['metadataExtraction'] = self.metadata_extraction.to_dict()
# override the default output from pydantic by calling `to_dict()` of migration
if self.migration:
_dict['migration'] = self.migration.to_dict()
# override the default output from pydantic by calling `to_dict()` of notifications
if self.notifications:
_dict['notifications'] = self.notifications.to_dict()
# override the default output from pydantic by calling `to_dict()` of search
if self.search:
_dict['search'] = self.search.to_dict()
# override the default output from pydantic by calling `to_dict()` of sidecar
if self.sidecar:
_dict['sidecar'] = self.sidecar.to_dict()
# override the default output from pydantic by calling `to_dict()` of smart_search
if self.smart_search:
_dict['smartSearch'] = self.smart_search.to_dict()
# override the default output from pydantic by calling `to_dict()` of storage_template_migration
if self.storage_template_migration:
_dict['storageTemplateMigration'] = self.storage_template_migration.to_dict()
# override the default output from pydantic by calling `to_dict()` of thumbnail_generation
if self.thumbnail_generation:
_dict['thumbnailGeneration'] = self.thumbnail_generation.to_dict()
# override the default output from pydantic by calling `to_dict()` of video_conversion
if self.video_conversion:
_dict['videoConversion'] = self.video_conversion.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AllJobStatusResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"backgroundTask": JobStatusDto.from_dict(obj["backgroundTask"]) if obj.get("backgroundTask") is not None else None,
"backupDatabase": JobStatusDto.from_dict(obj["backupDatabase"]) if obj.get("backupDatabase") is not None else None,
"duplicateDetection": JobStatusDto.from_dict(obj["duplicateDetection"]) if obj.get("duplicateDetection") is not None else None,
"faceDetection": JobStatusDto.from_dict(obj["faceDetection"]) if obj.get("faceDetection") is not None else None,
"facialRecognition": JobStatusDto.from_dict(obj["facialRecognition"]) if obj.get("facialRecognition") is not None else None,
"library": JobStatusDto.from_dict(obj["library"]) if obj.get("library") is not None else None,
"metadataExtraction": JobStatusDto.from_dict(obj["metadataExtraction"]) if obj.get("metadataExtraction") is not None else None,
"migration": JobStatusDto.from_dict(obj["migration"]) if obj.get("migration") is not None else None,
"notifications": JobStatusDto.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None,
"search": JobStatusDto.from_dict(obj["search"]) if obj.get("search") is not None else None,
"sidecar": JobStatusDto.from_dict(obj["sidecar"]) if obj.get("sidecar") is not None else None,
"smartSearch": JobStatusDto.from_dict(obj["smartSearch"]) if obj.get("smartSearch") is not None else None,
"storageTemplateMigration": JobStatusDto.from_dict(obj["storageTemplateMigration"]) if obj.get("storageTemplateMigration") is not None else None,
"thumbnailGeneration": JobStatusDto.from_dict(obj["thumbnailGeneration"]) if obj.get("thumbnailGeneration") is not None else None,
"videoConversion": JobStatusDto.from_dict(obj["videoConversion"]) if obj.get("videoConversion") is not None else None
})
return _obj

View File

@@ -0,0 +1,91 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from generated.immich.openapi_client.models.permission import Permission
from typing import Optional, Set
from typing_extensions import Self
class APIKeyCreateDto(BaseModel):
"""
APIKeyCreateDto
""" # noqa: E501
name: Optional[StrictStr] = None
permissions: Annotated[List[Permission], Field(min_length=1)]
__properties: ClassVar[List[str]] = ["name", "permissions"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of APIKeyCreateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of APIKeyCreateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"permissions": obj.get("permissions")
})
return _obj

View File

@@ -0,0 +1,93 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.api_key_response_dto import APIKeyResponseDto
from typing import Optional, Set
from typing_extensions import Self
class APIKeyCreateResponseDto(BaseModel):
"""
APIKeyCreateResponseDto
""" # noqa: E501
api_key: APIKeyResponseDto = Field(alias="apiKey")
secret: StrictStr
__properties: ClassVar[List[str]] = ["apiKey", "secret"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of APIKeyCreateResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of api_key
if self.api_key:
_dict['apiKey'] = self.api_key.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of APIKeyCreateResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"apiKey": APIKeyResponseDto.from_dict(obj["apiKey"]) if obj.get("apiKey") is not None else None,
"secret": obj.get("secret")
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.permission import Permission
from typing import Optional, Set
from typing_extensions import Self
class APIKeyResponseDto(BaseModel):
"""
APIKeyResponseDto
""" # noqa: E501
created_at: datetime = Field(alias="createdAt")
id: StrictStr
name: StrictStr
permissions: List[Permission]
updated_at: datetime = Field(alias="updatedAt")
__properties: ClassVar[List[str]] = ["createdAt", "id", "name", "permissions", "updatedAt"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of APIKeyResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of APIKeyResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"createdAt": obj.get("createdAt"),
"id": obj.get("id"),
"name": obj.get("name"),
"permissions": obj.get("permissions"),
"updatedAt": obj.get("updatedAt")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class APIKeyUpdateDto(BaseModel):
"""
APIKeyUpdateDto
""" # noqa: E501
name: StrictStr
__properties: ClassVar[List[str]] = ["name"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of APIKeyUpdateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of APIKeyUpdateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name")
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AssetBulkDeleteDto(BaseModel):
"""
AssetBulkDeleteDto
""" # noqa: E501
force: Optional[StrictBool] = None
ids: List[StrictStr]
__properties: ClassVar[List[str]] = ["force", "ids"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetBulkDeleteDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetBulkDeleteDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"force": obj.get("force"),
"ids": obj.get("ids")
})
return _obj

View File

@@ -0,0 +1,107 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class AssetBulkUpdateDto(BaseModel):
"""
AssetBulkUpdateDto
""" # noqa: E501
date_time_original: Optional[StrictStr] = Field(default=None, alias="dateTimeOriginal")
duplicate_id: Optional[StrictStr] = Field(default=None, alias="duplicateId")
ids: List[StrictStr]
is_archived: Optional[StrictBool] = Field(default=None, alias="isArchived")
is_favorite: Optional[StrictBool] = Field(default=None, alias="isFavorite")
latitude: Optional[Union[StrictFloat, StrictInt]] = None
longitude: Optional[Union[StrictFloat, StrictInt]] = None
rating: Optional[Union[Annotated[float, Field(le=5, strict=True, ge=-1)], Annotated[int, Field(le=5, strict=True, ge=-1)]]] = None
__properties: ClassVar[List[str]] = ["dateTimeOriginal", "duplicateId", "ids", "isArchived", "isFavorite", "latitude", "longitude", "rating"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetBulkUpdateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if duplicate_id (nullable) is None
# and model_fields_set contains the field
if self.duplicate_id is None and "duplicate_id" in self.model_fields_set:
_dict['duplicateId'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetBulkUpdateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"dateTimeOriginal": obj.get("dateTimeOriginal"),
"duplicateId": obj.get("duplicateId"),
"ids": obj.get("ids"),
"isArchived": obj.get("isArchived"),
"isFavorite": obj.get("isFavorite"),
"latitude": obj.get("latitude"),
"longitude": obj.get("longitude"),
"rating": obj.get("rating")
})
return _obj

View File

@@ -0,0 +1,95 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.asset_bulk_upload_check_item import AssetBulkUploadCheckItem
from typing import Optional, Set
from typing_extensions import Self
class AssetBulkUploadCheckDto(BaseModel):
"""
AssetBulkUploadCheckDto
""" # noqa: E501
assets: List[AssetBulkUploadCheckItem]
__properties: ClassVar[List[str]] = ["assets"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in assets (list)
_items = []
if self.assets:
for _item_assets in self.assets:
if _item_assets:
_items.append(_item_assets.to_dict())
_dict['assets'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assets": [AssetBulkUploadCheckItem.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetBulkUploadCheckItem(BaseModel):
"""
AssetBulkUploadCheckItem
""" # noqa: E501
checksum: StrictStr = Field(description="base64 or hex encoded sha1 hash")
id: StrictStr
__properties: ClassVar[List[str]] = ["checksum", "id"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckItem from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckItem from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"checksum": obj.get("checksum"),
"id": obj.get("id")
})
return _obj

View File

@@ -0,0 +1,95 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.asset_bulk_upload_check_result import AssetBulkUploadCheckResult
from typing import Optional, Set
from typing_extensions import Self
class AssetBulkUploadCheckResponseDto(BaseModel):
"""
AssetBulkUploadCheckResponseDto
""" # noqa: E501
results: List[AssetBulkUploadCheckResult]
__properties: ClassVar[List[str]] = ["results"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
_items = []
if self.results:
for _item_results in self.results:
if _item_results:
_items.append(_item_results.to_dict())
_dict['results'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"results": [AssetBulkUploadCheckResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
})
return _obj

View File

@@ -0,0 +1,112 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AssetBulkUploadCheckResult(BaseModel):
"""
AssetBulkUploadCheckResult
""" # noqa: E501
action: StrictStr
asset_id: Optional[StrictStr] = Field(default=None, alias="assetId")
id: StrictStr
is_trashed: Optional[StrictBool] = Field(default=None, alias="isTrashed")
reason: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["action", "assetId", "id", "isTrashed", "reason"]
@field_validator('action')
def action_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['accept', 'reject']):
raise ValueError("must be one of enum values ('accept', 'reject')")
return value
@field_validator('reason')
def reason_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['duplicate', 'unsupported-format']):
raise ValueError("must be one of enum values ('duplicate', 'unsupported-format')")
return value
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckResult from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetBulkUploadCheckResult from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"action": obj.get("action"),
"assetId": obj.get("assetId"),
"id": obj.get("id"),
"isTrashed": obj.get("isTrashed"),
"reason": obj.get("reason")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetDeltaSyncDto(BaseModel):
"""
AssetDeltaSyncDto
""" # noqa: E501
updated_after: datetime = Field(alias="updatedAfter")
user_ids: List[StrictStr] = Field(alias="userIds")
__properties: ClassVar[List[str]] = ["updatedAfter", "userIds"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetDeltaSyncDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetDeltaSyncDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"updatedAfter": obj.get("updatedAfter"),
"userIds": obj.get("userIds")
})
return _obj

View File

@@ -0,0 +1,99 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from typing import Optional, Set
from typing_extensions import Self
class AssetDeltaSyncResponseDto(BaseModel):
"""
AssetDeltaSyncResponseDto
""" # noqa: E501
deleted: List[StrictStr]
needs_full_sync: StrictBool = Field(alias="needsFullSync")
upserted: List[AssetResponseDto]
__properties: ClassVar[List[str]] = ["deleted", "needsFullSync", "upserted"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetDeltaSyncResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in upserted (list)
_items = []
if self.upserted:
for _item_upserted in self.upserted:
if _item_upserted:
_items.append(_item_upserted.to_dict())
_dict['upserted'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetDeltaSyncResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"deleted": obj.get("deleted"),
"needsFullSync": obj.get("needsFullSync"),
"upserted": [AssetResponseDto.from_dict(_item) for _item in obj["upserted"]] if obj.get("upserted") is not None else None
})
return _obj

View File

@@ -0,0 +1,101 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetFaceCreateDto(BaseModel):
"""
AssetFaceCreateDto
""" # noqa: E501
asset_id: StrictStr = Field(alias="assetId")
height: StrictInt
image_height: StrictInt = Field(alias="imageHeight")
image_width: StrictInt = Field(alias="imageWidth")
person_id: StrictStr = Field(alias="personId")
width: StrictInt
x: StrictInt
y: StrictInt
__properties: ClassVar[List[str]] = ["assetId", "height", "imageHeight", "imageWidth", "personId", "width", "x", "y"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetFaceCreateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetFaceCreateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetId": obj.get("assetId"),
"height": obj.get("height"),
"imageHeight": obj.get("imageHeight"),
"imageWidth": obj.get("imageWidth"),
"personId": obj.get("personId"),
"width": obj.get("width"),
"x": obj.get("x"),
"y": obj.get("y")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictBool
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetFaceDeleteDto(BaseModel):
"""
AssetFaceDeleteDto
""" # noqa: E501
force: StrictBool
__properties: ClassVar[List[str]] = ["force"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetFaceDeleteDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetFaceDeleteDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"force": obj.get("force")
})
return _obj

View File

@@ -0,0 +1,113 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.person_response_dto import PersonResponseDto
from generated.immich.openapi_client.models.source_type import SourceType
from typing import Optional, Set
from typing_extensions import Self
class AssetFaceResponseDto(BaseModel):
"""
AssetFaceResponseDto
""" # noqa: E501
bounding_box_x1: StrictInt = Field(alias="boundingBoxX1")
bounding_box_x2: StrictInt = Field(alias="boundingBoxX2")
bounding_box_y1: StrictInt = Field(alias="boundingBoxY1")
bounding_box_y2: StrictInt = Field(alias="boundingBoxY2")
id: StrictStr
image_height: StrictInt = Field(alias="imageHeight")
image_width: StrictInt = Field(alias="imageWidth")
person: Optional[PersonResponseDto]
source_type: Optional[SourceType] = Field(default=None, alias="sourceType")
__properties: ClassVar[List[str]] = ["boundingBoxX1", "boundingBoxX2", "boundingBoxY1", "boundingBoxY2", "id", "imageHeight", "imageWidth", "person", "sourceType"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetFaceResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of person
if self.person:
_dict['person'] = self.person.to_dict()
# set to None if person (nullable) is None
# and model_fields_set contains the field
if self.person is None and "person" in self.model_fields_set:
_dict['person'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetFaceResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"boundingBoxX1": obj.get("boundingBoxX1"),
"boundingBoxX2": obj.get("boundingBoxX2"),
"boundingBoxY1": obj.get("boundingBoxY1"),
"boundingBoxY2": obj.get("boundingBoxY2"),
"id": obj.get("id"),
"imageHeight": obj.get("imageHeight"),
"imageWidth": obj.get("imageWidth"),
"person": PersonResponseDto.from_dict(obj["person"]) if obj.get("person") is not None else None,
"sourceType": obj.get("sourceType")
})
return _obj

View File

@@ -0,0 +1,95 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.asset_face_update_item import AssetFaceUpdateItem
from typing import Optional, Set
from typing_extensions import Self
class AssetFaceUpdateDto(BaseModel):
"""
AssetFaceUpdateDto
""" # noqa: E501
data: List[AssetFaceUpdateItem]
__properties: ClassVar[List[str]] = ["data"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetFaceUpdateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
_items = []
if self.data:
for _item_data in self.data:
if _item_data:
_items.append(_item_data.to_dict())
_dict['data'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetFaceUpdateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [AssetFaceUpdateItem.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetFaceUpdateItem(BaseModel):
"""
AssetFaceUpdateItem
""" # noqa: E501
asset_id: StrictStr = Field(alias="assetId")
person_id: StrictStr = Field(alias="personId")
__properties: ClassVar[List[str]] = ["assetId", "personId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetFaceUpdateItem from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetFaceUpdateItem from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetId": obj.get("assetId"),
"personId": obj.get("personId")
})
return _obj

View File

@@ -0,0 +1,102 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.source_type import SourceType
from typing import Optional, Set
from typing_extensions import Self
class AssetFaceWithoutPersonResponseDto(BaseModel):
"""
AssetFaceWithoutPersonResponseDto
""" # noqa: E501
bounding_box_x1: StrictInt = Field(alias="boundingBoxX1")
bounding_box_x2: StrictInt = Field(alias="boundingBoxX2")
bounding_box_y1: StrictInt = Field(alias="boundingBoxY1")
bounding_box_y2: StrictInt = Field(alias="boundingBoxY2")
id: StrictStr
image_height: StrictInt = Field(alias="imageHeight")
image_width: StrictInt = Field(alias="imageWidth")
source_type: Optional[SourceType] = Field(default=None, alias="sourceType")
__properties: ClassVar[List[str]] = ["boundingBoxX1", "boundingBoxX2", "boundingBoxY1", "boundingBoxY2", "id", "imageHeight", "imageWidth", "sourceType"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetFaceWithoutPersonResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetFaceWithoutPersonResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"boundingBoxX1": obj.get("boundingBoxX1"),
"boundingBoxX2": obj.get("boundingBoxX2"),
"boundingBoxY1": obj.get("boundingBoxY1"),
"boundingBoxY2": obj.get("boundingBoxY2"),
"id": obj.get("id"),
"imageHeight": obj.get("imageHeight"),
"imageWidth": obj.get("imageWidth"),
"sourceType": obj.get("sourceType")
})
return _obj

View File

@@ -0,0 +1,95 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class AssetFullSyncDto(BaseModel):
"""
AssetFullSyncDto
""" # noqa: E501
last_id: Optional[StrictStr] = Field(default=None, alias="lastId")
limit: Annotated[int, Field(strict=True, ge=1)]
updated_until: datetime = Field(alias="updatedUntil")
user_id: Optional[StrictStr] = Field(default=None, alias="userId")
__properties: ClassVar[List[str]] = ["lastId", "limit", "updatedUntil", "userId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetFullSyncDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetFullSyncDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"lastId": obj.get("lastId"),
"limit": obj.get("limit"),
"updatedUntil": obj.get("updatedUntil"),
"userId": obj.get("userId")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetIdsDto(BaseModel):
"""
AssetIdsDto
""" # noqa: E501
asset_ids: List[StrictStr] = Field(alias="assetIds")
__properties: ClassVar[List[str]] = ["assetIds"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetIdsDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetIdsDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetIds": obj.get("assetIds")
})
return _obj

View File

@@ -0,0 +1,101 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AssetIdsResponseDto(BaseModel):
"""
AssetIdsResponseDto
""" # noqa: E501
asset_id: StrictStr = Field(alias="assetId")
error: Optional[StrictStr] = None
success: StrictBool
__properties: ClassVar[List[str]] = ["assetId", "error", "success"]
@field_validator('error')
def error_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['duplicate', 'no_permission', 'not_found']):
raise ValueError("must be one of enum values ('duplicate', 'no_permission', 'not_found')")
return value
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetIdsResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetIdsResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetId": obj.get("assetId"),
"error": obj.get("error"),
"success": obj.get("success")
})
return _obj

View File

@@ -0,0 +1,39 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AssetJobName(str, Enum):
"""
AssetJobName
"""
"""
allowed enum values
"""
REFRESH_MINUS_FACES = 'refresh-faces'
REFRESH_MINUS_METADATA = 'refresh-metadata'
REGENERATE_MINUS_THUMBNAIL = 'regenerate-thumbnail'
TRANSCODE_MINUS_VIDEO = 'transcode-video'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AssetJobName from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.asset_job_name import AssetJobName
from typing import Optional, Set
from typing_extensions import Self
class AssetJobsDto(BaseModel):
"""
AssetJobsDto
""" # noqa: E501
asset_ids: List[StrictStr] = Field(alias="assetIds")
name: AssetJobName
__properties: ClassVar[List[str]] = ["assetIds", "name"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetJobsDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetJobsDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetIds": obj.get("assetIds"),
"name": obj.get("name")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.asset_media_status import AssetMediaStatus
from typing import Optional, Set
from typing_extensions import Self
class AssetMediaResponseDto(BaseModel):
"""
AssetMediaResponseDto
""" # noqa: E501
id: StrictStr
status: AssetMediaStatus
__properties: ClassVar[List[str]] = ["id", "status"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetMediaResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetMediaResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"status": obj.get("status")
})
return _obj

View File

@@ -0,0 +1,38 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AssetMediaSize(str, Enum):
"""
AssetMediaSize
"""
"""
allowed enum values
"""
FULLSIZE = 'fullsize'
PREVIEW = 'preview'
THUMBNAIL = 'thumbnail'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AssetMediaSize from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,38 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AssetMediaStatus(str, Enum):
"""
AssetMediaStatus
"""
"""
allowed enum values
"""
CREATED = 'created'
REPLACED = 'replaced'
DUPLICATE = 'duplicate'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AssetMediaStatus from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,37 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AssetOrder(str, Enum):
"""
AssetOrder
"""
"""
allowed enum values
"""
ASC = 'asc'
DESC = 'desc'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AssetOrder from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,208 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.asset_face_without_person_response_dto import AssetFaceWithoutPersonResponseDto
from generated.immich.openapi_client.models.asset_stack_response_dto import AssetStackResponseDto
from generated.immich.openapi_client.models.asset_type_enum import AssetTypeEnum
from generated.immich.openapi_client.models.exif_response_dto import ExifResponseDto
from generated.immich.openapi_client.models.person_with_faces_response_dto import PersonWithFacesResponseDto
from generated.immich.openapi_client.models.tag_response_dto import TagResponseDto
from generated.immich.openapi_client.models.user_response_dto import UserResponseDto
from typing import Optional, Set
from typing_extensions import Self
class AssetResponseDto(BaseModel):
"""
AssetResponseDto
""" # noqa: E501
checksum: StrictStr = Field(description="base64 encoded sha1 hash")
device_asset_id: StrictStr = Field(alias="deviceAssetId")
device_id: StrictStr = Field(alias="deviceId")
duplicate_id: Optional[StrictStr] = Field(default=None, alias="duplicateId")
duration: StrictStr
exif_info: Optional[ExifResponseDto] = Field(default=None, alias="exifInfo")
file_created_at: datetime = Field(alias="fileCreatedAt")
file_modified_at: datetime = Field(alias="fileModifiedAt")
has_metadata: StrictBool = Field(alias="hasMetadata")
id: StrictStr
is_archived: StrictBool = Field(alias="isArchived")
is_favorite: StrictBool = Field(alias="isFavorite")
is_offline: StrictBool = Field(alias="isOffline")
is_trashed: StrictBool = Field(alias="isTrashed")
library_id: Optional[StrictStr] = Field(default=None, description="This property was deprecated in v1.106.0", alias="libraryId")
live_photo_video_id: Optional[StrictStr] = Field(default=None, alias="livePhotoVideoId")
local_date_time: datetime = Field(alias="localDateTime")
original_file_name: StrictStr = Field(alias="originalFileName")
original_mime_type: Optional[StrictStr] = Field(default=None, alias="originalMimeType")
original_path: StrictStr = Field(alias="originalPath")
owner: Optional[UserResponseDto] = None
owner_id: StrictStr = Field(alias="ownerId")
people: Optional[List[PersonWithFacesResponseDto]] = None
resized: Optional[StrictBool] = Field(default=None, description="This property was deprecated in v1.113.0")
stack: Optional[AssetStackResponseDto] = None
tags: Optional[List[TagResponseDto]] = None
thumbhash: Optional[StrictStr]
type: AssetTypeEnum
unassigned_faces: Optional[List[AssetFaceWithoutPersonResponseDto]] = Field(default=None, alias="unassignedFaces")
updated_at: datetime = Field(alias="updatedAt")
__properties: ClassVar[List[str]] = ["checksum", "deviceAssetId", "deviceId", "duplicateId", "duration", "exifInfo", "fileCreatedAt", "fileModifiedAt", "hasMetadata", "id", "isArchived", "isFavorite", "isOffline", "isTrashed", "libraryId", "livePhotoVideoId", "localDateTime", "originalFileName", "originalMimeType", "originalPath", "owner", "ownerId", "people", "resized", "stack", "tags", "thumbhash", "type", "unassignedFaces", "updatedAt"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of exif_info
if self.exif_info:
_dict['exifInfo'] = self.exif_info.to_dict()
# override the default output from pydantic by calling `to_dict()` of owner
if self.owner:
_dict['owner'] = self.owner.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in people (list)
_items = []
if self.people:
for _item_people in self.people:
if _item_people:
_items.append(_item_people.to_dict())
_dict['people'] = _items
# override the default output from pydantic by calling `to_dict()` of stack
if self.stack:
_dict['stack'] = self.stack.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in tags (list)
_items = []
if self.tags:
for _item_tags in self.tags:
if _item_tags:
_items.append(_item_tags.to_dict())
_dict['tags'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in unassigned_faces (list)
_items = []
if self.unassigned_faces:
for _item_unassigned_faces in self.unassigned_faces:
if _item_unassigned_faces:
_items.append(_item_unassigned_faces.to_dict())
_dict['unassignedFaces'] = _items
# set to None if duplicate_id (nullable) is None
# and model_fields_set contains the field
if self.duplicate_id is None and "duplicate_id" in self.model_fields_set:
_dict['duplicateId'] = None
# set to None if library_id (nullable) is None
# and model_fields_set contains the field
if self.library_id is None and "library_id" in self.model_fields_set:
_dict['libraryId'] = None
# set to None if live_photo_video_id (nullable) is None
# and model_fields_set contains the field
if self.live_photo_video_id is None and "live_photo_video_id" in self.model_fields_set:
_dict['livePhotoVideoId'] = None
# set to None if stack (nullable) is None
# and model_fields_set contains the field
if self.stack is None and "stack" in self.model_fields_set:
_dict['stack'] = None
# set to None if thumbhash (nullable) is None
# and model_fields_set contains the field
if self.thumbhash is None and "thumbhash" in self.model_fields_set:
_dict['thumbhash'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"checksum": obj.get("checksum"),
"deviceAssetId": obj.get("deviceAssetId"),
"deviceId": obj.get("deviceId"),
"duplicateId": obj.get("duplicateId"),
"duration": obj.get("duration"),
"exifInfo": ExifResponseDto.from_dict(obj["exifInfo"]) if obj.get("exifInfo") is not None else None,
"fileCreatedAt": obj.get("fileCreatedAt"),
"fileModifiedAt": obj.get("fileModifiedAt"),
"hasMetadata": obj.get("hasMetadata"),
"id": obj.get("id"),
"isArchived": obj.get("isArchived"),
"isFavorite": obj.get("isFavorite"),
"isOffline": obj.get("isOffline"),
"isTrashed": obj.get("isTrashed"),
"libraryId": obj.get("libraryId"),
"livePhotoVideoId": obj.get("livePhotoVideoId"),
"localDateTime": obj.get("localDateTime"),
"originalFileName": obj.get("originalFileName"),
"originalMimeType": obj.get("originalMimeType"),
"originalPath": obj.get("originalPath"),
"owner": UserResponseDto.from_dict(obj["owner"]) if obj.get("owner") is not None else None,
"ownerId": obj.get("ownerId"),
"people": [PersonWithFacesResponseDto.from_dict(_item) for _item in obj["people"]] if obj.get("people") is not None else None,
"resized": obj.get("resized"),
"stack": AssetStackResponseDto.from_dict(obj["stack"]) if obj.get("stack") is not None else None,
"tags": [TagResponseDto.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None,
"thumbhash": obj.get("thumbhash"),
"type": obj.get("type"),
"unassignedFaces": [AssetFaceWithoutPersonResponseDto.from_dict(_item) for _item in obj["unassignedFaces"]] if obj.get("unassignedFaces") is not None else None,
"updatedAt": obj.get("updatedAt")
})
return _obj

View File

@@ -0,0 +1,91 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetStackResponseDto(BaseModel):
"""
AssetStackResponseDto
""" # noqa: E501
asset_count: StrictInt = Field(alias="assetCount")
id: StrictStr
primary_asset_id: StrictStr = Field(alias="primaryAssetId")
__properties: ClassVar[List[str]] = ["assetCount", "id", "primaryAssetId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetStackResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetStackResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetCount": obj.get("assetCount"),
"id": obj.get("id"),
"primaryAssetId": obj.get("primaryAssetId")
})
return _obj

View File

@@ -0,0 +1,91 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class AssetStatsResponseDto(BaseModel):
"""
AssetStatsResponseDto
""" # noqa: E501
images: StrictInt
total: StrictInt
videos: StrictInt
__properties: ClassVar[List[str]] = ["images", "total", "videos"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AssetStatsResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AssetStatsResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"images": obj.get("images"),
"total": obj.get("total"),
"videos": obj.get("videos")
})
return _obj

View File

@@ -0,0 +1,39 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AssetTypeEnum(str, Enum):
"""
AssetTypeEnum
"""
"""
allowed enum values
"""
IMAGE = 'IMAGE'
VIDEO = 'VIDEO'
AUDIO = 'AUDIO'
OTHER = 'OTHER'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AssetTypeEnum from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,39 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AudioCodec(str, Enum):
"""
AudioCodec
"""
"""
allowed enum values
"""
MP3 = 'mp3'
AAC = 'aac'
LIBOPUS = 'libopus'
PCM_S16LE = 'pcm_s16le'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AudioCodec from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,88 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.user_avatar_color import UserAvatarColor
from typing import Optional, Set
from typing_extensions import Self
class AvatarResponse(BaseModel):
"""
AvatarResponse
""" # noqa: E501
color: UserAvatarColor
__properties: ClassVar[List[str]] = ["color"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AvatarResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AvatarResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"color": obj.get("color")
})
return _obj

View File

@@ -0,0 +1,88 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.user_avatar_color import UserAvatarColor
from typing import Optional, Set
from typing_extensions import Self
class AvatarUpdate(BaseModel):
"""
AvatarUpdate
""" # noqa: E501
color: Optional[UserAvatarColor] = None
__properties: ClassVar[List[str]] = ["color"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AvatarUpdate from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AvatarUpdate from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"color": obj.get("color")
})
return _obj

View File

@@ -0,0 +1,101 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class BulkIdResponseDto(BaseModel):
"""
BulkIdResponseDto
""" # noqa: E501
error: Optional[StrictStr] = None
id: StrictStr
success: StrictBool
__properties: ClassVar[List[str]] = ["error", "id", "success"]
@field_validator('error')
def error_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['duplicate', 'no_permission', 'not_found', 'unknown']):
raise ValueError("must be one of enum values ('duplicate', 'no_permission', 'not_found', 'unknown')")
return value
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BulkIdResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BulkIdResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"error": obj.get("error"),
"id": obj.get("id"),
"success": obj.get("success")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class BulkIdsDto(BaseModel):
"""
BulkIdsDto
""" # noqa: E501
ids: List[StrictStr]
__properties: ClassVar[List[str]] = ["ids"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BulkIdsDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BulkIdsDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ids": obj.get("ids")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class ChangePasswordDto(BaseModel):
"""
ChangePasswordDto
""" # noqa: E501
new_password: Annotated[str, Field(min_length=8, strict=True)] = Field(alias="newPassword")
password: StrictStr
__properties: ClassVar[List[str]] = ["newPassword", "password"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ChangePasswordDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ChangePasswordDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"newPassword": obj.get("newPassword"),
"password": obj.get("password")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class CheckExistingAssetsDto(BaseModel):
"""
CheckExistingAssetsDto
""" # noqa: E501
device_asset_ids: Annotated[List[StrictStr], Field(min_length=1)] = Field(alias="deviceAssetIds")
device_id: StrictStr = Field(alias="deviceId")
__properties: ClassVar[List[str]] = ["deviceAssetIds", "deviceId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CheckExistingAssetsDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CheckExistingAssetsDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"deviceAssetIds": obj.get("deviceAssetIds"),
"deviceId": obj.get("deviceId")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class CheckExistingAssetsResponseDto(BaseModel):
"""
CheckExistingAssetsResponseDto
""" # noqa: E501
existing_ids: List[StrictStr] = Field(alias="existingIds")
__properties: ClassVar[List[str]] = ["existingIds"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CheckExistingAssetsResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CheckExistingAssetsResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"existingIds": obj.get("existingIds")
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class CLIPConfig(BaseModel):
"""
CLIPConfig
""" # noqa: E501
enabled: StrictBool
model_name: StrictStr = Field(alias="modelName")
__properties: ClassVar[List[str]] = ["enabled", "modelName"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CLIPConfig from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CLIPConfig from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled"),
"modelName": obj.get("modelName")
})
return _obj

View File

@@ -0,0 +1,37 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class Colorspace(str, Enum):
"""
Colorspace
"""
"""
allowed enum values
"""
SRGB = 'srgb'
P3 = 'p3'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of Colorspace from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,38 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class CQMode(str, Enum):
"""
CQMode
"""
"""
allowed enum values
"""
AUTO = 'auto'
CQP = 'cqp'
ICQ = 'icq'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of CQMode from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,101 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.album_user_create_dto import AlbumUserCreateDto
from typing import Optional, Set
from typing_extensions import Self
class CreateAlbumDto(BaseModel):
"""
CreateAlbumDto
""" # noqa: E501
album_name: StrictStr = Field(alias="albumName")
album_users: Optional[List[AlbumUserCreateDto]] = Field(default=None, alias="albumUsers")
asset_ids: Optional[List[StrictStr]] = Field(default=None, alias="assetIds")
description: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["albumName", "albumUsers", "assetIds", "description"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CreateAlbumDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in album_users (list)
_items = []
if self.album_users:
for _item_album_users in self.album_users:
if _item_album_users:
_items.append(_item_album_users.to_dict())
_dict['albumUsers'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CreateAlbumDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"albumName": obj.get("albumName"),
"albumUsers": [AlbumUserCreateDto.from_dict(_item) for _item in obj["albumUsers"]] if obj.get("albumUsers") is not None else None,
"assetIds": obj.get("assetIds"),
"description": obj.get("description")
})
return _obj

View File

@@ -0,0 +1,94 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class CreateLibraryDto(BaseModel):
"""
CreateLibraryDto
""" # noqa: E501
exclusion_patterns: Optional[Annotated[List[StrictStr], Field(max_length=128)]] = Field(default=None, alias="exclusionPatterns")
import_paths: Optional[Annotated[List[StrictStr], Field(max_length=128)]] = Field(default=None, alias="importPaths")
name: Optional[StrictStr] = None
owner_id: StrictStr = Field(alias="ownerId")
__properties: ClassVar[List[str]] = ["exclusionPatterns", "importPaths", "name", "ownerId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CreateLibraryDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CreateLibraryDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"exclusionPatterns": obj.get("exclusionPatterns"),
"importPaths": obj.get("importPaths"),
"name": obj.get("name"),
"ownerId": obj.get("ownerId")
})
return _obj

View File

@@ -0,0 +1,92 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class CreateProfileImageResponseDto(BaseModel):
"""
CreateProfileImageResponseDto
""" # noqa: E501
profile_changed_at: datetime = Field(alias="profileChangedAt")
profile_image_path: StrictStr = Field(alias="profileImagePath")
user_id: StrictStr = Field(alias="userId")
__properties: ClassVar[List[str]] = ["profileChangedAt", "profileImagePath", "userId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CreateProfileImageResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CreateProfileImageResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"profileChangedAt": obj.get("profileChangedAt"),
"profileImagePath": obj.get("profileImagePath"),
"userId": obj.get("userId")
})
return _obj

View File

@@ -0,0 +1,92 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Union
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class DatabaseBackupConfig(BaseModel):
"""
DatabaseBackupConfig
""" # noqa: E501
cron_expression: StrictStr = Field(alias="cronExpression")
enabled: StrictBool
keep_last_amount: Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]] = Field(alias="keepLastAmount")
__properties: ClassVar[List[str]] = ["cronExpression", "enabled", "keepLastAmount"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DatabaseBackupConfig from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DatabaseBackupConfig from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"cronExpression": obj.get("cronExpression"),
"enabled": obj.get("enabled"),
"keepLastAmount": obj.get("keepLastAmount")
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class DownloadArchiveInfo(BaseModel):
"""
DownloadArchiveInfo
""" # noqa: E501
asset_ids: List[StrictStr] = Field(alias="assetIds")
size: StrictInt
__properties: ClassVar[List[str]] = ["assetIds", "size"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DownloadArchiveInfo from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DownloadArchiveInfo from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetIds": obj.get("assetIds"),
"size": obj.get("size")
})
return _obj

View File

@@ -0,0 +1,94 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class DownloadInfoDto(BaseModel):
"""
DownloadInfoDto
""" # noqa: E501
album_id: Optional[StrictStr] = Field(default=None, alias="albumId")
archive_size: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="archiveSize")
asset_ids: Optional[List[StrictStr]] = Field(default=None, alias="assetIds")
user_id: Optional[StrictStr] = Field(default=None, alias="userId")
__properties: ClassVar[List[str]] = ["albumId", "archiveSize", "assetIds", "userId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DownloadInfoDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DownloadInfoDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"albumId": obj.get("albumId"),
"archiveSize": obj.get("archiveSize"),
"assetIds": obj.get("assetIds"),
"userId": obj.get("userId")
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class DownloadResponse(BaseModel):
"""
DownloadResponse
""" # noqa: E501
archive_size: StrictInt = Field(alias="archiveSize")
include_embedded_videos: StrictBool = Field(alias="includeEmbeddedVideos")
__properties: ClassVar[List[str]] = ["archiveSize", "includeEmbeddedVideos"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DownloadResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DownloadResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"archiveSize": obj.get("archiveSize"),
"includeEmbeddedVideos": obj.get("includeEmbeddedVideos") if obj.get("includeEmbeddedVideos") is not None else False
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.download_archive_info import DownloadArchiveInfo
from typing import Optional, Set
from typing_extensions import Self
class DownloadResponseDto(BaseModel):
"""
DownloadResponseDto
""" # noqa: E501
archives: List[DownloadArchiveInfo]
total_size: StrictInt = Field(alias="totalSize")
__properties: ClassVar[List[str]] = ["archives", "totalSize"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DownloadResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in archives (list)
_items = []
if self.archives:
for _item_archives in self.archives:
if _item_archives:
_items.append(_item_archives.to_dict())
_dict['archives'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DownloadResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"archives": [DownloadArchiveInfo.from_dict(_item) for _item in obj["archives"]] if obj.get("archives") is not None else None,
"totalSize": obj.get("totalSize")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class DownloadUpdate(BaseModel):
"""
DownloadUpdate
""" # noqa: E501
archive_size: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, alias="archiveSize")
include_embedded_videos: Optional[StrictBool] = Field(default=None, alias="includeEmbeddedVideos")
__properties: ClassVar[List[str]] = ["archiveSize", "includeEmbeddedVideos"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DownloadUpdate from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DownloadUpdate from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"archiveSize": obj.get("archiveSize"),
"includeEmbeddedVideos": obj.get("includeEmbeddedVideos")
})
return _obj

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Union
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class DuplicateDetectionConfig(BaseModel):
"""
DuplicateDetectionConfig
""" # noqa: E501
enabled: StrictBool
max_distance: Union[Annotated[float, Field(le=0.1, strict=True, ge=0.001)], Annotated[int, Field(le=0, strict=True, ge=1)]] = Field(alias="maxDistance")
__properties: ClassVar[List[str]] = ["enabled", "maxDistance"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DuplicateDetectionConfig from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DuplicateDetectionConfig from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled"),
"maxDistance": obj.get("maxDistance")
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from typing import Optional, Set
from typing_extensions import Self
class DuplicateResponseDto(BaseModel):
"""
DuplicateResponseDto
""" # noqa: E501
assets: List[AssetResponseDto]
duplicate_id: StrictStr = Field(alias="duplicateId")
__properties: ClassVar[List[str]] = ["assets", "duplicateId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DuplicateResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in assets (list)
_items = []
if self.assets:
for _item_assets in self.assets:
if _item_assets:
_items.append(_item_assets.to_dict())
_dict['assets'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DuplicateResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assets": [AssetResponseDto.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None,
"duplicateId": obj.get("duplicateId")
})
return _obj

View File

@@ -0,0 +1,91 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class EmailNotificationsResponse(BaseModel):
"""
EmailNotificationsResponse
""" # noqa: E501
album_invite: StrictBool = Field(alias="albumInvite")
album_update: StrictBool = Field(alias="albumUpdate")
enabled: StrictBool
__properties: ClassVar[List[str]] = ["albumInvite", "albumUpdate", "enabled"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of EmailNotificationsResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of EmailNotificationsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"albumInvite": obj.get("albumInvite"),
"albumUpdate": obj.get("albumUpdate"),
"enabled": obj.get("enabled")
})
return _obj

View File

@@ -0,0 +1,91 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class EmailNotificationsUpdate(BaseModel):
"""
EmailNotificationsUpdate
""" # noqa: E501
album_invite: Optional[StrictBool] = Field(default=None, alias="albumInvite")
album_update: Optional[StrictBool] = Field(default=None, alias="albumUpdate")
enabled: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["albumInvite", "albumUpdate", "enabled"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of EmailNotificationsUpdate from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of EmailNotificationsUpdate from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"albumInvite": obj.get("albumInvite"),
"albumUpdate": obj.get("albumUpdate"),
"enabled": obj.get("enabled")
})
return _obj

View File

@@ -0,0 +1,240 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class ExifResponseDto(BaseModel):
"""
ExifResponseDto
""" # noqa: E501
city: Optional[StrictStr] = None
country: Optional[StrictStr] = None
date_time_original: Optional[datetime] = Field(default=None, alias="dateTimeOriginal")
description: Optional[StrictStr] = None
exif_image_height: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="exifImageHeight")
exif_image_width: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="exifImageWidth")
exposure_time: Optional[StrictStr] = Field(default=None, alias="exposureTime")
f_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fNumber")
file_size_in_byte: Optional[StrictInt] = Field(default=None, alias="fileSizeInByte")
focal_length: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="focalLength")
iso: Optional[Union[StrictFloat, StrictInt]] = None
latitude: Optional[Union[StrictFloat, StrictInt]] = None
lens_model: Optional[StrictStr] = Field(default=None, alias="lensModel")
longitude: Optional[Union[StrictFloat, StrictInt]] = None
make: Optional[StrictStr] = None
model: Optional[StrictStr] = None
modify_date: Optional[datetime] = Field(default=None, alias="modifyDate")
orientation: Optional[StrictStr] = None
projection_type: Optional[StrictStr] = Field(default=None, alias="projectionType")
rating: Optional[Union[StrictFloat, StrictInt]] = None
state: Optional[StrictStr] = None
time_zone: Optional[StrictStr] = Field(default=None, alias="timeZone")
__properties: ClassVar[List[str]] = ["city", "country", "dateTimeOriginal", "description", "exifImageHeight", "exifImageWidth", "exposureTime", "fNumber", "fileSizeInByte", "focalLength", "iso", "latitude", "lensModel", "longitude", "make", "model", "modifyDate", "orientation", "projectionType", "rating", "state", "timeZone"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ExifResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if city (nullable) is None
# and model_fields_set contains the field
if self.city is None and "city" in self.model_fields_set:
_dict['city'] = None
# set to None if country (nullable) is None
# and model_fields_set contains the field
if self.country is None and "country" in self.model_fields_set:
_dict['country'] = None
# set to None if date_time_original (nullable) is None
# and model_fields_set contains the field
if self.date_time_original is None and "date_time_original" in self.model_fields_set:
_dict['dateTimeOriginal'] = None
# set to None if description (nullable) is None
# and model_fields_set contains the field
if self.description is None and "description" in self.model_fields_set:
_dict['description'] = None
# set to None if exif_image_height (nullable) is None
# and model_fields_set contains the field
if self.exif_image_height is None and "exif_image_height" in self.model_fields_set:
_dict['exifImageHeight'] = None
# set to None if exif_image_width (nullable) is None
# and model_fields_set contains the field
if self.exif_image_width is None and "exif_image_width" in self.model_fields_set:
_dict['exifImageWidth'] = None
# set to None if exposure_time (nullable) is None
# and model_fields_set contains the field
if self.exposure_time is None and "exposure_time" in self.model_fields_set:
_dict['exposureTime'] = None
# set to None if f_number (nullable) is None
# and model_fields_set contains the field
if self.f_number is None and "f_number" in self.model_fields_set:
_dict['fNumber'] = None
# set to None if file_size_in_byte (nullable) is None
# and model_fields_set contains the field
if self.file_size_in_byte is None and "file_size_in_byte" in self.model_fields_set:
_dict['fileSizeInByte'] = None
# set to None if focal_length (nullable) is None
# and model_fields_set contains the field
if self.focal_length is None and "focal_length" in self.model_fields_set:
_dict['focalLength'] = None
# set to None if iso (nullable) is None
# and model_fields_set contains the field
if self.iso is None and "iso" in self.model_fields_set:
_dict['iso'] = None
# set to None if latitude (nullable) is None
# and model_fields_set contains the field
if self.latitude is None and "latitude" in self.model_fields_set:
_dict['latitude'] = None
# set to None if lens_model (nullable) is None
# and model_fields_set contains the field
if self.lens_model is None and "lens_model" in self.model_fields_set:
_dict['lensModel'] = None
# set to None if longitude (nullable) is None
# and model_fields_set contains the field
if self.longitude is None and "longitude" in self.model_fields_set:
_dict['longitude'] = None
# set to None if make (nullable) is None
# and model_fields_set contains the field
if self.make is None and "make" in self.model_fields_set:
_dict['make'] = None
# set to None if model (nullable) is None
# and model_fields_set contains the field
if self.model is None and "model" in self.model_fields_set:
_dict['model'] = None
# set to None if modify_date (nullable) is None
# and model_fields_set contains the field
if self.modify_date is None and "modify_date" in self.model_fields_set:
_dict['modifyDate'] = None
# set to None if orientation (nullable) is None
# and model_fields_set contains the field
if self.orientation is None and "orientation" in self.model_fields_set:
_dict['orientation'] = None
# set to None if projection_type (nullable) is None
# and model_fields_set contains the field
if self.projection_type is None and "projection_type" in self.model_fields_set:
_dict['projectionType'] = None
# set to None if rating (nullable) is None
# and model_fields_set contains the field
if self.rating is None and "rating" in self.model_fields_set:
_dict['rating'] = None
# set to None if state (nullable) is None
# and model_fields_set contains the field
if self.state is None and "state" in self.model_fields_set:
_dict['state'] = None
# set to None if time_zone (nullable) is None
# and model_fields_set contains the field
if self.time_zone is None and "time_zone" in self.model_fields_set:
_dict['timeZone'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ExifResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"city": obj.get("city"),
"country": obj.get("country"),
"dateTimeOriginal": obj.get("dateTimeOriginal"),
"description": obj.get("description"),
"exifImageHeight": obj.get("exifImageHeight"),
"exifImageWidth": obj.get("exifImageWidth"),
"exposureTime": obj.get("exposureTime"),
"fNumber": obj.get("fNumber"),
"fileSizeInByte": obj.get("fileSizeInByte"),
"focalLength": obj.get("focalLength"),
"iso": obj.get("iso"),
"latitude": obj.get("latitude"),
"lensModel": obj.get("lensModel"),
"longitude": obj.get("longitude"),
"make": obj.get("make"),
"model": obj.get("model"),
"modifyDate": obj.get("modifyDate"),
"orientation": obj.get("orientation"),
"projectionType": obj.get("projectionType"),
"rating": obj.get("rating"),
"state": obj.get("state"),
"timeZone": obj.get("timeZone")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class FaceDto(BaseModel):
"""
FaceDto
""" # noqa: E501
id: StrictStr
__properties: ClassVar[List[str]] = ["id"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FaceDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FaceDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id")
})
return _obj

View File

@@ -0,0 +1,96 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Union
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class FacialRecognitionConfig(BaseModel):
"""
FacialRecognitionConfig
""" # noqa: E501
enabled: StrictBool
max_distance: Union[Annotated[float, Field(le=2, strict=True, ge=0.1)], Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(alias="maxDistance")
min_faces: Annotated[int, Field(strict=True, ge=1)] = Field(alias="minFaces")
min_score: Union[Annotated[float, Field(le=1, strict=True, ge=0.1)], Annotated[int, Field(le=1, strict=True, ge=1)]] = Field(alias="minScore")
model_name: StrictStr = Field(alias="modelName")
__properties: ClassVar[List[str]] = ["enabled", "maxDistance", "minFaces", "minScore", "modelName"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FacialRecognitionConfig from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FacialRecognitionConfig from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled"),
"maxDistance": obj.get("maxDistance"),
"minFaces": obj.get("minFaces"),
"minScore": obj.get("minScore"),
"modelName": obj.get("modelName")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class FileChecksumDto(BaseModel):
"""
FileChecksumDto
""" # noqa: E501
filenames: List[StrictStr]
__properties: ClassVar[List[str]] = ["filenames"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FileChecksumDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FileChecksumDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"filenames": obj.get("filenames")
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class FileChecksumResponseDto(BaseModel):
"""
FileChecksumResponseDto
""" # noqa: E501
checksum: StrictStr
filename: StrictStr
__properties: ClassVar[List[str]] = ["checksum", "filename"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FileChecksumResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FileChecksumResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"checksum": obj.get("checksum"),
"filename": obj.get("filename")
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.file_report_item_dto import FileReportItemDto
from typing import Optional, Set
from typing_extensions import Self
class FileReportDto(BaseModel):
"""
FileReportDto
""" # noqa: E501
extras: List[StrictStr]
orphans: List[FileReportItemDto]
__properties: ClassVar[List[str]] = ["extras", "orphans"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FileReportDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in orphans (list)
_items = []
if self.orphans:
for _item_orphans in self.orphans:
if _item_orphans:
_items.append(_item_orphans.to_dict())
_dict['orphans'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FileReportDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"extras": obj.get("extras"),
"orphans": [FileReportItemDto.from_dict(_item) for _item in obj["orphans"]] if obj.get("orphans") is not None else None
})
return _obj

View File

@@ -0,0 +1,95 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.file_report_item_dto import FileReportItemDto
from typing import Optional, Set
from typing_extensions import Self
class FileReportFixDto(BaseModel):
"""
FileReportFixDto
""" # noqa: E501
items: List[FileReportItemDto]
__properties: ClassVar[List[str]] = ["items"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FileReportFixDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
_items = []
if self.items:
for _item_items in self.items:
if _item_items:
_items.append(_item_items.to_dict())
_dict['items'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FileReportFixDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"items": [FileReportItemDto.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.path_entity_type import PathEntityType
from generated.immich.openapi_client.models.path_type import PathType
from typing import Optional, Set
from typing_extensions import Self
class FileReportItemDto(BaseModel):
"""
FileReportItemDto
""" # noqa: E501
checksum: Optional[StrictStr] = None
entity_id: StrictStr = Field(alias="entityId")
entity_type: PathEntityType = Field(alias="entityType")
path_type: PathType = Field(alias="pathType")
path_value: StrictStr = Field(alias="pathValue")
__properties: ClassVar[List[str]] = ["checksum", "entityId", "entityType", "pathType", "pathValue"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FileReportItemDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FileReportItemDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"checksum": obj.get("checksum"),
"entityId": obj.get("entityId"),
"entityType": obj.get("entityType"),
"pathType": obj.get("pathType"),
"pathValue": obj.get("pathValue")
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class FoldersResponse(BaseModel):
"""
FoldersResponse
""" # noqa: E501
enabled: StrictBool
sidebar_web: StrictBool = Field(alias="sidebarWeb")
__properties: ClassVar[List[str]] = ["enabled", "sidebarWeb"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FoldersResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FoldersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled") if obj.get("enabled") is not None else False,
"sidebarWeb": obj.get("sidebarWeb") if obj.get("sidebarWeb") is not None else False
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class FoldersUpdate(BaseModel):
"""
FoldersUpdate
""" # noqa: E501
enabled: Optional[StrictBool] = None
sidebar_web: Optional[StrictBool] = Field(default=None, alias="sidebarWeb")
__properties: ClassVar[List[str]] = ["enabled", "sidebarWeb"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FoldersUpdate from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FoldersUpdate from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled"),
"sidebarWeb": obj.get("sidebarWeb")
})
return _obj

View File

@@ -0,0 +1,37 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class ImageFormat(str, Enum):
"""
ImageFormat
"""
"""
allowed enum values
"""
JPEG = 'jpeg'
WEBP = 'webp'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of ImageFormat from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,40 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class JobCommand(str, Enum):
"""
JobCommand
"""
"""
allowed enum values
"""
START = 'start'
PAUSE = 'pause'
RESUME = 'resume'
EMPTY = 'empty'
CLEAR_MINUS_FAILED = 'clear-failed'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of JobCommand from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,90 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.job_command import JobCommand
from typing import Optional, Set
from typing_extensions import Self
class JobCommandDto(BaseModel):
"""
JobCommandDto
""" # noqa: E501
command: JobCommand
force: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["command", "force"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of JobCommandDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of JobCommandDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"command": obj.get("command"),
"force": obj.get("force")
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class JobCountsDto(BaseModel):
"""
JobCountsDto
""" # noqa: E501
active: StrictInt
completed: StrictInt
delayed: StrictInt
failed: StrictInt
paused: StrictInt
waiting: StrictInt
__properties: ClassVar[List[str]] = ["active", "completed", "delayed", "failed", "paused", "waiting"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of JobCountsDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of JobCountsDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"active": obj.get("active"),
"completed": obj.get("completed"),
"delayed": obj.get("delayed"),
"failed": obj.get("failed"),
"paused": obj.get("paused"),
"waiting": obj.get("waiting")
})
return _obj

View File

@@ -0,0 +1,88 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.manual_job_name import ManualJobName
from typing import Optional, Set
from typing_extensions import Self
class JobCreateDto(BaseModel):
"""
JobCreateDto
""" # noqa: E501
name: ManualJobName
__properties: ClassVar[List[str]] = ["name"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of JobCreateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of JobCreateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name")
})
return _obj

View File

@@ -0,0 +1,50 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class JobName(str, Enum):
"""
JobName
"""
"""
allowed enum values
"""
THUMBNAILGENERATION = 'thumbnailGeneration'
METADATAEXTRACTION = 'metadataExtraction'
VIDEOCONVERSION = 'videoConversion'
FACEDETECTION = 'faceDetection'
FACIALRECOGNITION = 'facialRecognition'
SMARTSEARCH = 'smartSearch'
DUPLICATEDETECTION = 'duplicateDetection'
BACKGROUNDTASK = 'backgroundTask'
STORAGETEMPLATEMIGRATION = 'storageTemplateMigration'
MIGRATION = 'migration'
SEARCH = 'search'
SIDECAR = 'sidecar'
LIBRARY = 'library'
NOTIFICATIONS = 'notifications'
BACKUPDATABASE = 'backupDatabase'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of JobName from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,88 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class JobSettingsDto(BaseModel):
"""
JobSettingsDto
""" # noqa: E501
concurrency: Annotated[int, Field(strict=True, ge=1)]
__properties: ClassVar[List[str]] = ["concurrency"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of JobSettingsDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of JobSettingsDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"concurrency": obj.get("concurrency")
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List
from generated.immich.openapi_client.models.job_counts_dto import JobCountsDto
from generated.immich.openapi_client.models.queue_status_dto import QueueStatusDto
from typing import Optional, Set
from typing_extensions import Self
class JobStatusDto(BaseModel):
"""
JobStatusDto
""" # noqa: E501
job_counts: JobCountsDto = Field(alias="jobCounts")
queue_status: QueueStatusDto = Field(alias="queueStatus")
__properties: ClassVar[List[str]] = ["jobCounts", "queueStatus"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of JobStatusDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of job_counts
if self.job_counts:
_dict['jobCounts'] = self.job_counts.to_dict()
# override the default output from pydantic by calling `to_dict()` of queue_status
if self.queue_status:
_dict['queueStatus'] = self.queue_status.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of JobStatusDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"jobCounts": JobCountsDto.from_dict(obj["jobCounts"]) if obj.get("jobCounts") is not None else None,
"queueStatus": QueueStatusDto.from_dict(obj["queueStatus"]) if obj.get("queueStatus") is not None else None
})
return _obj

View File

@@ -0,0 +1,109 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class LibraryResponseDto(BaseModel):
"""
LibraryResponseDto
""" # noqa: E501
asset_count: StrictInt = Field(alias="assetCount")
created_at: datetime = Field(alias="createdAt")
exclusion_patterns: List[StrictStr] = Field(alias="exclusionPatterns")
id: StrictStr
import_paths: List[StrictStr] = Field(alias="importPaths")
name: StrictStr
owner_id: StrictStr = Field(alias="ownerId")
refreshed_at: Optional[datetime] = Field(alias="refreshedAt")
updated_at: datetime = Field(alias="updatedAt")
__properties: ClassVar[List[str]] = ["assetCount", "createdAt", "exclusionPatterns", "id", "importPaths", "name", "ownerId", "refreshedAt", "updatedAt"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LibraryResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if refreshed_at (nullable) is None
# and model_fields_set contains the field
if self.refreshed_at is None and "refreshed_at" in self.model_fields_set:
_dict['refreshedAt'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LibraryResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetCount": obj.get("assetCount"),
"createdAt": obj.get("createdAt"),
"exclusionPatterns": obj.get("exclusionPatterns"),
"id": obj.get("id"),
"importPaths": obj.get("importPaths"),
"name": obj.get("name"),
"ownerId": obj.get("ownerId"),
"refreshedAt": obj.get("refreshedAt"),
"updatedAt": obj.get("updatedAt")
})
return _obj

View File

@@ -0,0 +1,93 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class LibraryStatsResponseDto(BaseModel):
"""
LibraryStatsResponseDto
""" # noqa: E501
photos: StrictInt
total: StrictInt
usage: StrictInt
videos: StrictInt
__properties: ClassVar[List[str]] = ["photos", "total", "usage", "videos"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LibraryStatsResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LibraryStatsResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"photos": obj.get("photos") if obj.get("photos") is not None else 0,
"total": obj.get("total") if obj.get("total") is not None else 0,
"usage": obj.get("usage") if obj.get("usage") is not None else 0,
"videos": obj.get("videos") if obj.get("videos") is not None else 0
})
return _obj

View File

@@ -0,0 +1,97 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class LicenseKeyDto(BaseModel):
"""
LicenseKeyDto
""" # noqa: E501
activation_key: StrictStr = Field(alias="activationKey")
license_key: Annotated[str, Field(strict=True)] = Field(alias="licenseKey")
__properties: ClassVar[List[str]] = ["activationKey", "licenseKey"]
@field_validator('license_key')
def license_key_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"IM(SV|CL)(-[\dA-Za-z]{4}){8}", value):
raise ValueError(r"must validate the regular expression /IM(SV|CL)(-[\dA-Za-z]{4}){8}/")
return value
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LicenseKeyDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LicenseKeyDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"activationKey": obj.get("activationKey"),
"licenseKey": obj.get("licenseKey")
})
return _obj

View File

@@ -0,0 +1,100 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
class LicenseResponseDto(BaseModel):
"""
LicenseResponseDto
""" # noqa: E501
activated_at: datetime = Field(alias="activatedAt")
activation_key: StrictStr = Field(alias="activationKey")
license_key: Annotated[str, Field(strict=True)] = Field(alias="licenseKey")
__properties: ClassVar[List[str]] = ["activatedAt", "activationKey", "licenseKey"]
@field_validator('license_key')
def license_key_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"IM(SV|CL)(-[\dA-Za-z]{4}){8}", value):
raise ValueError(r"must validate the regular expression /IM(SV|CL)(-[\dA-Za-z]{4}){8}/")
return value
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LicenseResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LicenseResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"activatedAt": obj.get("activatedAt"),
"activationKey": obj.get("activationKey"),
"licenseKey": obj.get("licenseKey")
})
return _obj

View File

@@ -0,0 +1,41 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class LogLevel(str, Enum):
"""
LogLevel
"""
"""
allowed enum values
"""
VERBOSE = 'verbose'
DEBUG = 'debug'
LOG = 'log'
WARN = 'warn'
ERROR = 'error'
FATAL = 'fatal'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of LogLevel from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class LoginCredentialDto(BaseModel):
"""
LoginCredentialDto
""" # noqa: E501
email: StrictStr
password: StrictStr
__properties: ClassVar[List[str]] = ["email", "password"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LoginCredentialDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LoginCredentialDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"email": obj.get("email"),
"password": obj.get("password")
})
return _obj

View File

@@ -0,0 +1,99 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class LoginResponseDto(BaseModel):
"""
LoginResponseDto
""" # noqa: E501
access_token: StrictStr = Field(alias="accessToken")
is_admin: StrictBool = Field(alias="isAdmin")
name: StrictStr
profile_image_path: StrictStr = Field(alias="profileImagePath")
should_change_password: StrictBool = Field(alias="shouldChangePassword")
user_email: StrictStr = Field(alias="userEmail")
user_id: StrictStr = Field(alias="userId")
__properties: ClassVar[List[str]] = ["accessToken", "isAdmin", "name", "profileImagePath", "shouldChangePassword", "userEmail", "userId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LoginResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LoginResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"accessToken": obj.get("accessToken"),
"isAdmin": obj.get("isAdmin"),
"name": obj.get("name"),
"profileImagePath": obj.get("profileImagePath"),
"shouldChangePassword": obj.get("shouldChangePassword"),
"userEmail": obj.get("userEmail"),
"userId": obj.get("userId")
})
return _obj

View File

@@ -0,0 +1,89 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class LogoutResponseDto(BaseModel):
"""
LogoutResponseDto
""" # noqa: E501
redirect_uri: StrictStr = Field(alias="redirectUri")
successful: StrictBool
__properties: ClassVar[List[str]] = ["redirectUri", "successful"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of LogoutResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of LogoutResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"redirectUri": obj.get("redirectUri"),
"successful": obj.get("successful")
})
return _obj

View File

@@ -0,0 +1,41 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class ManualJobName(str, Enum):
"""
ManualJobName
"""
"""
allowed enum values
"""
PERSON_MINUS_CLEANUP = 'person-cleanup'
TAG_MINUS_CLEANUP = 'tag-cleanup'
USER_MINUS_CLEANUP = 'user-cleanup'
MEMORY_MINUS_CLEANUP = 'memory-cleanup'
MEMORY_MINUS_CREATE = 'memory-create'
BACKUP_MINUS_DATABASE = 'backup-database'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of ManualJobName from a JSON string"""
return cls(json.loads(json_str))

View File

@@ -0,0 +1,112 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class MapMarkerResponseDto(BaseModel):
"""
MapMarkerResponseDto
""" # noqa: E501
city: Optional[StrictStr]
country: Optional[StrictStr]
id: StrictStr
lat: Union[StrictFloat, StrictInt]
lon: Union[StrictFloat, StrictInt]
state: Optional[StrictStr]
__properties: ClassVar[List[str]] = ["city", "country", "id", "lat", "lon", "state"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of MapMarkerResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if city (nullable) is None
# and model_fields_set contains the field
if self.city is None and "city" in self.model_fields_set:
_dict['city'] = None
# set to None if country (nullable) is None
# and model_fields_set contains the field
if self.country is None and "country" in self.model_fields_set:
_dict['country'] = None
# set to None if state (nullable) is None
# and model_fields_set contains the field
if self.state is None and "state" in self.model_fields_set:
_dict['state'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of MapMarkerResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"city": obj.get("city"),
"country": obj.get("country"),
"id": obj.get("id"),
"lat": obj.get("lat"),
"lon": obj.get("lon"),
"state": obj.get("state")
})
return _obj

View File

@@ -0,0 +1,106 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class MapReverseGeocodeResponseDto(BaseModel):
"""
MapReverseGeocodeResponseDto
""" # noqa: E501
city: Optional[StrictStr]
country: Optional[StrictStr]
state: Optional[StrictStr]
__properties: ClassVar[List[str]] = ["city", "country", "state"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of MapReverseGeocodeResponseDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if city (nullable) is None
# and model_fields_set contains the field
if self.city is None and "city" in self.model_fields_set:
_dict['city'] = None
# set to None if country (nullable) is None
# and model_fields_set contains the field
if self.country is None and "country" in self.model_fields_set:
_dict['country'] = None
# set to None if state (nullable) is None
# and model_fields_set contains the field
if self.state is None and "state" in self.model_fields_set:
_dict['state'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of MapReverseGeocodeResponseDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"city": obj.get("city"),
"country": obj.get("country"),
"state": obj.get("state")
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictBool
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class MemoriesResponse(BaseModel):
"""
MemoriesResponse
""" # noqa: E501
enabled: StrictBool
__properties: ClassVar[List[str]] = ["enabled"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of MemoriesResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of MemoriesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True
})
return _obj

View File

@@ -0,0 +1,87 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class MemoriesUpdate(BaseModel):
"""
MemoriesUpdate
""" # noqa: E501
enabled: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["enabled"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of MemoriesUpdate from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of MemoriesUpdate from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled")
})
return _obj

View File

@@ -0,0 +1,103 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from generated.immich.openapi_client.models.memory_type import MemoryType
from generated.immich.openapi_client.models.on_this_day_dto import OnThisDayDto
from typing import Optional, Set
from typing_extensions import Self
class MemoryCreateDto(BaseModel):
"""
MemoryCreateDto
""" # noqa: E501
asset_ids: Optional[List[StrictStr]] = Field(default=None, alias="assetIds")
data: OnThisDayDto
is_saved: Optional[StrictBool] = Field(default=None, alias="isSaved")
memory_at: datetime = Field(alias="memoryAt")
seen_at: Optional[datetime] = Field(default=None, alias="seenAt")
type: MemoryType
__properties: ClassVar[List[str]] = ["assetIds", "data", "isSaved", "memoryAt", "seenAt", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of MemoryCreateDto from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of data
if self.data:
_dict['data'] = self.data.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of MemoryCreateDto from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"assetIds": obj.get("assetIds"),
"data": OnThisDayDto.from_dict(obj["data"]) if obj.get("data") is not None else None,
"isSaved": obj.get("isSaved"),
"memoryAt": obj.get("memoryAt"),
"seenAt": obj.get("seenAt"),
"type": obj.get("type")
})
return _obj

Some files were not shown because too many files have changed in this diff Show More