Skip to content

Shared Link Response Dto

Bases: BaseModel

Shared link response

Show JSON schema:
{
  "$defs": {
    "AlbumResponseDto": {
      "description": "AlbumResponseDto",
      "properties": {
        "albumName": {
          "description": "Album name",
          "title": "Albumname",
          "type": "string"
        },
        "albumThumbnailAssetId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Thumbnail asset ID",
          "title": "Albumthumbnailassetid"
        },
        "albumUsers": {
          "description": "First entry is always the album owner. Second entry is the auth user, if it differs from the owner. The rest are ordered alphabetically.",
          "items": {
            "$ref": "#/$defs/AlbumUserResponseDto"
          },
          "minItems": 1,
          "title": "Albumusers",
          "type": "array"
        },
        "assetCount": {
          "description": "Number of assets",
          "maximum": 9007199254740991,
          "minimum": 0,
          "title": "Assetcount",
          "type": "integer"
        },
        "contributorCounts": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ContributorCountResponseDto"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Contributorcounts"
        },
        "createdAt": {
          "description": "Creation date",
          "format": "date-time",
          "title": "Createdat",
          "type": "string"
        },
        "description": {
          "description": "Album description",
          "title": "Description",
          "type": "string"
        },
        "endDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "UTC representation of (local) end date (latest asset)",
          "title": "Enddate"
        },
        "hasSharedLink": {
          "description": "Has shared link",
          "title": "Hassharedlink",
          "type": "boolean"
        },
        "id": {
          "description": "Album ID",
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "isActivityEnabled": {
          "description": "Activity feed enabled",
          "title": "Isactivityenabled",
          "type": "boolean"
        },
        "lastModifiedAssetTimestamp": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Last modified asset timestamp",
          "title": "Lastmodifiedassettimestamp"
        },
        "order": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetOrder"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "shared": {
          "description": "Is shared album",
          "title": "Shared",
          "type": "boolean"
        },
        "startDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "UTC representation of (local) start date (earliest asset)",
          "title": "Startdate"
        },
        "updatedAt": {
          "description": "Last update date",
          "format": "date-time",
          "title": "Updatedat",
          "type": "string"
        }
      },
      "required": [
        "albumName",
        "albumThumbnailAssetId",
        "albumUsers",
        "assetCount",
        "createdAt",
        "description",
        "hasSharedLink",
        "id",
        "isActivityEnabled",
        "shared",
        "updatedAt"
      ],
      "title": "AlbumResponseDto",
      "type": "object"
    },
    "AlbumUserResponseDto": {
      "description": "AlbumUserResponseDto",
      "properties": {
        "role": {
          "$ref": "#/$defs/AlbumUserRole"
        },
        "user": {
          "$ref": "#/$defs/UserResponseDto"
        }
      },
      "required": [
        "role",
        "user"
      ],
      "title": "AlbumUserResponseDto",
      "type": "object"
    },
    "AlbumUserRole": {
      "description": "Album user role",
      "enum": [
        "editor",
        "owner",
        "viewer"
      ],
      "title": "AlbumUserRole",
      "type": "string"
    },
    "AssetOrder": {
      "description": "Asset sort order",
      "enum": [
        "asc",
        "desc"
      ],
      "title": "AssetOrder",
      "type": "string"
    },
    "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"
    },
    "ContributorCountResponseDto": {
      "description": "ContributorCountResponseDto",
      "properties": {
        "assetCount": {
          "description": "Number of assets contributed",
          "maximum": 9007199254740991,
          "minimum": 0,
          "title": "Assetcount",
          "type": "integer"
        },
        "userId": {
          "description": "User ID",
          "format": "uuid",
          "title": "Userid",
          "type": "string"
        }
      },
      "required": [
        "assetCount",
        "userId"
      ],
      "title": "ContributorCountResponseDto",
      "type": "object"
    },
    "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"
    },
    "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"
    },
    "SharedLinkType": {
      "description": "Shared link type",
      "enum": [
        "ALBUM",
        "INDIVIDUAL"
      ],
      "title": "SharedLinkType",
      "type": "string"
    },
    "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": "Shared link response",
  "properties": {
    "album": {
      "anyOf": [
        {
          "$ref": "#/$defs/AlbumResponseDto"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "allowDownload": {
      "description": "Allow downloads",
      "title": "Allowdownload",
      "type": "boolean"
    },
    "allowUpload": {
      "description": "Allow uploads",
      "title": "Allowupload",
      "type": "boolean"
    },
    "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"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Link description",
      "title": "Description"
    },
    "expiresAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Expiration date",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Expiresat"
    },
    "id": {
      "description": "Shared link ID",
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "key": {
      "description": "Encryption key (base64url)",
      "title": "Key",
      "type": "string"
    },
    "password": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Has password",
      "title": "Password"
    },
    "showMetadata": {
      "description": "Show metadata",
      "title": "Showmetadata",
      "type": "boolean"
    },
    "slug": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Custom URL slug",
      "title": "Slug"
    },
    "type": {
      "$ref": "#/$defs/SharedLinkType"
    },
    "userId": {
      "description": "Owner user ID",
      "format": "uuid",
      "title": "Userid",
      "type": "string"
    }
  },
  "required": [
    "allowDownload",
    "allowUpload",
    "assets",
    "createdAt",
    "description",
    "expiresAt",
    "id",
    "key",
    "password",
    "showMetadata",
    "slug",
    "type",
    "userId"
  ],
  "title": "SharedLinkResponseDto",
  "type": "object"
}

Config:

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

Fields:

Validators:

allow_download: StrictBool

Allow downloads

allow_upload: StrictBool

Allow uploads

created_at: datetime

Creation date

description: Optional[StrictStr]

Link description

expires_at: Optional[datetime]

Expiration date

id: UUID

Shared link ID

key: StrictStr

Encryption key (base64url)

password: Optional[StrictStr]

Has password

show_metadata: StrictBool

Show metadata

slug: Optional[StrictStr]

Custom URL slug

user_id: UUID

Owner user ID

created_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/shared_link_response_dto.py
84
85
86
87
88
89
90
91
92
93
94
@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
expires_at_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/shared_link_response_dto.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@field_validator("expires_at", mode="before")
def expires_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(obj: Optional[Dict[str, Any]]) -> Optional[Self]

Create an instance of SharedLinkResponseDto from a dict

Source code in immichpy/client/generated/models/shared_link_response_dto.py
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of SharedLinkResponseDto from a dict"""
    if obj is None:
        return None

    if not isinstance(obj, dict):
        return cls.model_validate(obj)

    _obj = cls.model_validate(
        {
            "album": AlbumResponseDto.from_dict(obj["album"])
            if obj.get("album") is not None
            else None,
            "allowDownload": obj.get("allowDownload"),
            "allowUpload": obj.get("allowUpload"),
            "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"),
            "expiresAt": obj.get("expiresAt"),
            "id": obj.get("id"),
            "key": obj.get("key"),
            "password": obj.get("password"),
            "showMetadata": obj.get("showMetadata"),
            "slug": obj.get("slug"),
            "type": obj.get("type"),
            "userId": obj.get("userId"),
        }
    )
    return _obj
from_json(json_str: str) -> Optional[Self]

Create an instance of SharedLinkResponseDto from a JSON string

Source code in immichpy/client/generated/models/shared_link_response_dto.py
150
151
152
153
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of SharedLinkResponseDto from a JSON string"""
    return cls.from_dict(json.loads(json_str))
id_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/shared_link_response_dto.py
111
112
113
114
115
116
117
118
119
120
121
@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
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/shared_link_response_dto.py
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
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 album
    if self.album:
        _dict["album"] = self.album.to_dict()
    # 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
    # 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 expires_at (nullable) is None
    # and model_fields_set contains the field
    if self.expires_at is None and "expires_at" in self.model_fields_set:
        _dict["expiresAt"] = None

    # set to None if password (nullable) is None
    # and model_fields_set contains the field
    if self.password is None and "password" in self.model_fields_set:
        _dict["password"] = None

    # set to None if slug (nullable) is None
    # and model_fields_set contains the field
    if self.slug is None and "slug" in self.model_fields_set:
        _dict["slug"] = None

    return _dict
to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/shared_link_response_dto.py
146
147
148
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() -> str

Returns the string representation of the model using alias

Source code in immichpy/client/generated/models/shared_link_response_dto.py
142
143
144
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))
user_id_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/shared_link_response_dto.py
123
124
125
126
127
128
129
130
131
132
133
@field_validator("user_id", mode="before")
def user_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