Skip to content

Memory Response Dto

immichpy.client.generated.models.memory_response_dto.MemoryResponseDto pydantic-model

Bases: BaseModel

MemoryResponseDto

Show JSON schema:
{
  "$defs": {
    "AssetResponseDto": {
      "description": "AssetResponseDto",
      "properties": {
        "checksum": {
          "description": "Base64 encoded SHA1 hash",
          "title": "Checksum",
          "type": "string"
        },
        "createdAt": {
          "description": "The UTC timestamp when the asset was originally uploaded to Immich.",
          "format": "date-time",
          "title": "Createdat",
          "type": "string"
        },
        "duplicateId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Duplicate group ID",
          "title": "Duplicateid"
        },
        "duration": {
          "anyOf": [
            {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Video/gif duration in milliseconds (null for static images)",
          "title": "Duration"
        },
        "exifInfo": {
          "anyOf": [
            {
              "$ref": "#/$defs/ExifResponseDto"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "fileCreatedAt": {
          "description": "The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken.",
          "format": "date-time",
          "title": "Filecreatedat",
          "type": "string"
        },
        "fileModifiedAt": {
          "description": "The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken.",
          "format": "date-time",
          "title": "Filemodifiedat",
          "type": "string"
        },
        "hasMetadata": {
          "description": "Whether asset has metadata",
          "title": "Hasmetadata",
          "type": "boolean"
        },
        "height": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Asset height",
          "title": "Height"
        },
        "id": {
          "description": "Asset ID",
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "isArchived": {
          "description": "Is archived",
          "title": "Isarchived",
          "type": "boolean"
        },
        "isEdited": {
          "description": "Is edited",
          "title": "Isedited",
          "type": "boolean"
        },
        "isFavorite": {
          "description": "Is favorite",
          "title": "Isfavorite",
          "type": "boolean"
        },
        "isOffline": {
          "description": "Is offline",
          "title": "Isoffline",
          "type": "boolean"
        },
        "isTrashed": {
          "description": "Is trashed",
          "title": "Istrashed",
          "type": "boolean"
        },
        "libraryId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Library ID",
          "title": "Libraryid"
        },
        "livePhotoVideoId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Live photo video ID",
          "title": "Livephotovideoid"
        },
        "localDateTime": {
          "description": "The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months.",
          "format": "date-time",
          "title": "Localdatetime",
          "type": "string"
        },
        "originalFileName": {
          "description": "Original file name",
          "title": "Originalfilename",
          "type": "string"
        },
        "originalMimeType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Original MIME type",
          "title": "Originalmimetype"
        },
        "originalPath": {
          "description": "Original file path",
          "title": "Originalpath",
          "type": "string"
        },
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserResponseDto"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "ownerId": {
          "description": "Owner user ID",
          "format": "uuid",
          "title": "Ownerid",
          "type": "string"
        },
        "people": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/PersonResponseDto"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "People"
        },
        "resized": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Is resized",
          "title": "Resized"
        },
        "stack": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetStackResponseDto"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "tags": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/TagResponseDto"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tags"
        },
        "thumbhash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Thumbhash for thumbnail generation (base64) also used as the c query param for thumbnail cache busting.",
          "title": "Thumbhash"
        },
        "type": {
          "$ref": "#/$defs/AssetTypeEnum"
        },
        "updatedAt": {
          "description": "The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified.",
          "format": "date-time",
          "title": "Updatedat",
          "type": "string"
        },
        "visibility": {
          "$ref": "#/$defs/AssetVisibility"
        },
        "width": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Asset width",
          "title": "Width"
        }
      },
      "required": [
        "checksum",
        "createdAt",
        "duration",
        "fileCreatedAt",
        "fileModifiedAt",
        "hasMetadata",
        "height",
        "id",
        "isArchived",
        "isEdited",
        "isFavorite",
        "isOffline",
        "isTrashed",
        "localDateTime",
        "originalFileName",
        "originalPath",
        "ownerId",
        "thumbhash",
        "type",
        "updatedAt",
        "visibility",
        "width"
      ],
      "title": "AssetResponseDto",
      "type": "object"
    },
    "AssetStackResponseDto": {
      "description": "AssetStackResponseDto",
      "properties": {
        "assetCount": {
          "description": "Number of assets in stack",
          "maximum": 9007199254740991,
          "minimum": 0,
          "title": "Assetcount",
          "type": "integer"
        },
        "id": {
          "description": "Stack ID",
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "primaryAssetId": {
          "description": "Primary asset ID",
          "format": "uuid",
          "title": "Primaryassetid",
          "type": "string"
        }
      },
      "required": [
        "assetCount",
        "id",
        "primaryAssetId"
      ],
      "title": "AssetStackResponseDto",
      "type": "object"
    },
    "AssetTypeEnum": {
      "description": "Asset type",
      "enum": [
        "IMAGE",
        "VIDEO",
        "AUDIO",
        "OTHER"
      ],
      "title": "AssetTypeEnum",
      "type": "string"
    },
    "AssetVisibility": {
      "description": "Asset visibility",
      "enum": [
        "archive",
        "timeline",
        "hidden",
        "locked"
      ],
      "title": "AssetVisibility",
      "type": "string"
    },
    "ExifResponseDto": {
      "description": "EXIF response",
      "properties": {
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "City name",
          "title": "City"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Country name",
          "title": "Country"
        },
        "dateTimeOriginal": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Original date/time",
          "title": "Datetimeoriginal"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Image description",
          "title": "Description"
        },
        "exifImageHeight": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Image height in pixels",
          "title": "Exifimageheight"
        },
        "exifImageWidth": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Image width in pixels",
          "title": "Exifimagewidth"
        },
        "exposureTime": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Exposure time",
          "title": "Exposuretime"
        },
        "fNumber": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "F-number (aperture)",
          "title": "Fnumber"
        },
        "fileSizeInByte": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "File size in bytes",
          "title": "Filesizeinbyte"
        },
        "focalLength": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Focal length in mm",
          "title": "Focallength"
        },
        "iso": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": -9007199254740991,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ISO sensitivity",
          "title": "Iso"
        },
        "latitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "GPS latitude",
          "title": "Latitude"
        },
        "lensModel": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Lens model",
          "title": "Lensmodel"
        },
        "longitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "GPS longitude",
          "title": "Longitude"
        },
        "make": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Camera make",
          "title": "Make"
        },
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Camera model",
          "title": "Model"
        },
        "modifyDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Modification date/time",
          "title": "Modifydate"
        },
        "orientation": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Image orientation",
          "title": "Orientation"
        },
        "projectionType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Projection type",
          "title": "Projectiontype"
        },
        "rating": {
          "anyOf": [
            {
              "maximum": 5,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Rating",
          "title": "Rating"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "State/province name",
          "title": "State"
        },
        "timeZone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Time zone",
          "title": "Timezone"
        }
      },
      "title": "ExifResponseDto",
      "type": "object"
    },
    "MemoryType": {
      "description": "Memory type",
      "enum": [
        "on_this_day"
      ],
      "title": "MemoryType",
      "type": "string"
    },
    "OnThisDayDto": {
      "description": "OnThisDayDto",
      "properties": {
        "year": {
          "description": "Year for on this day memory",
          "maximum": 9999,
          "minimum": 1000,
          "title": "Year",
          "type": "integer"
        }
      },
      "required": [
        "year"
      ],
      "title": "OnThisDayDto",
      "type": "object"
    },
    "PersonResponseDto": {
      "description": "PersonResponseDto",
      "properties": {
        "birthDate": {
          "anyOf": [
            {
              "format": "date",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Person date of birth",
          "title": "Birthdate"
        },
        "color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Person color (hex)",
          "title": "Color"
        },
        "id": {
          "description": "Person ID",
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "isFavorite": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Is favorite",
          "title": "Isfavorite"
        },
        "isHidden": {
          "description": "Is hidden",
          "title": "Ishidden",
          "type": "boolean"
        },
        "name": {
          "description": "Person name",
          "title": "Name",
          "type": "string"
        },
        "thumbnailPath": {
          "description": "Thumbnail path",
          "title": "Thumbnailpath",
          "type": "string"
        },
        "updatedAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Last update date",
          "title": "Updatedat"
        }
      },
      "required": [
        "birthDate",
        "id",
        "isHidden",
        "name",
        "thumbnailPath"
      ],
      "title": "PersonResponseDto",
      "type": "object"
    },
    "TagResponseDto": {
      "description": "TagResponseDto",
      "properties": {
        "color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Tag color (hex)",
          "title": "Color"
        },
        "createdAt": {
          "description": "Creation date",
          "format": "date-time",
          "title": "Createdat",
          "type": "string"
        },
        "id": {
          "description": "Tag ID",
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "description": "Tag name",
          "title": "Name",
          "type": "string"
        },
        "parentId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Parent tag ID",
          "title": "Parentid"
        },
        "updatedAt": {
          "description": "Last update date",
          "format": "date-time",
          "title": "Updatedat",
          "type": "string"
        },
        "value": {
          "description": "Tag value (full path)",
          "title": "Value",
          "type": "string"
        }
      },
      "required": [
        "createdAt",
        "id",
        "name",
        "updatedAt",
        "value"
      ],
      "title": "TagResponseDto",
      "type": "object"
    },
    "UserAvatarColor": {
      "description": "User avatar color",
      "enum": [
        "primary",
        "pink",
        "red",
        "yellow",
        "blue",
        "green",
        "purple",
        "orange",
        "gray",
        "amber"
      ],
      "title": "UserAvatarColor",
      "type": "string"
    },
    "UserResponseDto": {
      "description": "UserResponseDto",
      "properties": {
        "avatarColor": {
          "$ref": "#/$defs/UserAvatarColor"
        },
        "email": {
          "description": "User email",
          "title": "Email",
          "type": "string"
        },
        "id": {
          "description": "User ID",
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "description": "User name",
          "title": "Name",
          "type": "string"
        },
        "profileChangedAt": {
          "description": "Profile change date",
          "format": "date-time",
          "title": "Profilechangedat",
          "type": "string"
        },
        "profileImagePath": {
          "description": "Profile image path",
          "title": "Profileimagepath",
          "type": "string"
        }
      },
      "required": [
        "avatarColor",
        "email",
        "id",
        "name",
        "profileChangedAt",
        "profileImagePath"
      ],
      "title": "UserResponseDto",
      "type": "object"
    }
  },
  "description": "MemoryResponseDto",
  "properties": {
    "assets": {
      "items": {
        "$ref": "#/$defs/AssetResponseDto"
      },
      "title": "Assets",
      "type": "array"
    },
    "createdAt": {
      "description": "Creation date",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "format": "date-time",
      "title": "Createdat",
      "type": "string"
    },
    "data": {
      "$ref": "#/$defs/OnThisDayDto"
    },
    "deletedAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Deletion date",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Deletedat"
    },
    "hideAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date when memory should be hidden",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Hideat"
    },
    "id": {
      "description": "Memory ID",
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "isSaved": {
      "description": "Is memory saved",
      "title": "Issaved",
      "type": "boolean"
    },
    "memoryAt": {
      "description": "Memory date",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "format": "date-time",
      "title": "Memoryat",
      "type": "string"
    },
    "ownerId": {
      "description": "Owner user ID",
      "format": "uuid",
      "title": "Ownerid",
      "type": "string"
    },
    "seenAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date when memory was seen",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Seenat"
    },
    "showAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date when memory should be shown",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Showat"
    },
    "type": {
      "$ref": "#/$defs/MemoryType"
    },
    "updatedAt": {
      "description": "Last update date",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "format": "date-time",
      "title": "Updatedat",
      "type": "string"
    }
  },
  "required": [
    "assets",
    "createdAt",
    "data",
    "id",
    "isSaved",
    "memoryAt",
    "ownerId",
    "type",
    "updatedAt"
  ],
  "title": "MemoryResponseDto",
  "type": "object"
}

Config:

  • validate_by_name: True
  • validate_by_alias: True
  • validate_assignment: True
  • protected_namespaces: ()

Fields:

Validators:

created_at pydantic-field

created_at: datetime

Creation date

deleted_at pydantic-field

deleted_at: Optional[datetime] = None

Deletion date

hide_at pydantic-field

hide_at: Optional[datetime] = None

Date when memory should be hidden

id pydantic-field

id: UUID

Memory ID

is_saved pydantic-field

is_saved: StrictBool

Is memory saved

memory_at pydantic-field

memory_at: datetime

Memory date

owner_id pydantic-field

owner_id: UUID

Owner user ID

seen_at pydantic-field

seen_at: Optional[datetime] = None

Date when memory was seen

show_at pydantic-field

show_at: Optional[datetime] = None

Date when memory should be shown

updated_at pydantic-field

updated_at: datetime

Last update date

created_at_validate_regular_expression pydantic-validator

created_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
 97
 98
 99
100
101
102
103
104
105
106
107
@field_validator("created_at", mode="before")
def created_at_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if isinstance(value, str) and not re.match(
        r"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/"
        )
    return value

deleted_at_validate_regular_expression pydantic-validator

deleted_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@field_validator("deleted_at", mode="before")
def deleted_at_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if value is None:
        return value

    if isinstance(value, str) and not re.match(
        r"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/"
        )
    return value

from_dict classmethod

from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]

Create an instance of MemoryResponseDto from a dict

Source code in immichpy/client/generated/models/memory_response_dto.py
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of MemoryResponseDto 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,
            "createdAt": obj.get("createdAt"),
            "data": OnThisDayDto.from_dict(obj["data"])
            if obj.get("data") is not None
            else None,
            "deletedAt": obj.get("deletedAt"),
            "hideAt": obj.get("hideAt"),
            "id": obj.get("id"),
            "isSaved": obj.get("isSaved"),
            "memoryAt": obj.get("memoryAt"),
            "ownerId": obj.get("ownerId"),
            "seenAt": obj.get("seenAt"),
            "showAt": obj.get("showAt"),
            "type": obj.get("type"),
            "updatedAt": obj.get("updatedAt"),
        }
    )
    return _obj

from_json classmethod

from_json(json_str: str) -> Optional[Self]

Create an instance of MemoryResponseDto from a JSON string

Source code in immichpy/client/generated/models/memory_response_dto.py
232
233
234
235
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of MemoryResponseDto from a JSON string"""
    return cls.from_dict(json.loads(json_str))

hide_at_validate_regular_expression pydantic-validator

hide_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
@field_validator("hide_at", mode="before")
def hide_at_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if value is None:
        return value

    if isinstance(value, str) and not re.match(
        r"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/"
        )
    return value

id_validate_regular_expression pydantic-validator

id_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
139
140
141
142
143
144
145
146
147
148
149
@field_validator("id", mode="before")
def id_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if isinstance(value, str) and not re.match(
        r"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$/"
        )
    return value

memory_at_validate_regular_expression pydantic-validator

memory_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
151
152
153
154
155
156
157
158
159
160
161
@field_validator("memory_at", mode="before")
def memory_at_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if isinstance(value, str) and not re.match(
        r"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/"
        )
    return value

owner_id_validate_regular_expression pydantic-validator

owner_id_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
163
164
165
166
167
168
169
170
171
172
173
@field_validator("owner_id", mode="before")
def owner_id_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if isinstance(value, str) and not re.match(
        r"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$/"
        )
    return value

seen_at_validate_regular_expression pydantic-validator

seen_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
175
176
177
178
179
180
181
182
183
184
185
186
187
188
@field_validator("seen_at", mode="before")
def seen_at_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if value is None:
        return value

    if isinstance(value, str) and not re.match(
        r"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/"
        )
    return value

show_at_validate_regular_expression pydantic-validator

show_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
190
191
192
193
194
195
196
197
198
199
200
201
202
203
@field_validator("show_at", mode="before")
def show_at_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if value is None:
        return value

    if isinstance(value, str) and not re.match(
        r"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/"
        )
    return value

to_dict

to_dict() -> Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
Source code in immichpy/client/generated/models/memory_response_dto.py
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
def to_dict(self) -> Dict[str, Any]:
    """Return the dictionary representation of the model using alias.

    This has the following differences from calling pydantic's
    `self.model_dump(by_alias=True)`:

    * `None` is only added to the output dict for nullable fields that
      were set at model initialization. Other 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:
            _items.append(
                _item_assets.to_dict() if _item_assets is not None else None
            )
        _dict["assets"] = _items
    # override the default output from pydantic by calling `to_dict()` of data
    if self.data:
        _dict["data"] = self.data.to_dict()
    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/memory_response_dto.py
228
229
230
def to_json(self) -> str:
    """Returns the JSON representation of the model using alias"""
    return json.dumps(to_jsonable_python(self.to_dict()))

to_str

to_str() -> str

Returns the string representation of the model using alias

Source code in immichpy/client/generated/models/memory_response_dto.py
224
225
226
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))

updated_at_validate_regular_expression pydantic-validator

updated_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/memory_response_dto.py
205
206
207
208
209
210
211
212
213
214
215
@field_validator("updated_at", mode="before")
def updated_at_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if isinstance(value, str) and not re.match(
        r"^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$",
        value,
    ):
        raise ValueError(
            r"must validate the regular expression /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/"
        )
    return value