Skip to content

Metadata Search Dto

immichpy.client.generated.models.metadata_search_dto.MetadataSearchDto pydantic-model

Bases: BaseModel

MetadataSearchDto

Show JSON schema:
{
  "$defs": {
    "AssetOrder": {
      "description": "Asset sort order",
      "enum": [
        "asc",
        "desc"
      ],
      "title": "AssetOrder",
      "type": "string"
    },
    "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"
    },
    "BoolFilter": {
      "description": "BoolFilter",
      "properties": {
        "eq": {
          "title": "Eq",
          "type": "boolean"
        }
      },
      "required": [
        "eq"
      ],
      "title": "BoolFilter",
      "type": "object"
    },
    "DateFilter": {
      "description": "DateFilter",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Eq"
        },
        "gt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Gt"
        },
        "gte": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Gte"
        },
        "lt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Lt"
        },
        "lte": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Lte"
        },
        "ne": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Ne"
        }
      },
      "title": "DateFilter",
      "type": "object"
    },
    "DateFilterNullable": {
      "description": "DateFilterNullable",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Eq"
        },
        "gt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Gt"
        },
        "gte": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Gte"
        },
        "lt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Lt"
        },
        "lte": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Lte"
        },
        "ne": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "examples": [
            "2024-01-01T00:00:00Z"
          ],
          "title": "Ne"
        }
      },
      "title": "DateFilterNullable",
      "type": "object"
    },
    "EnumFilterAssetType": {
      "description": "EnumFilterAssetType",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetTypeEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "in": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/AssetTypeEnum"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "In"
        },
        "ne": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetTypeEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "notIn": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/AssetTypeEnum"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notin"
        }
      },
      "title": "EnumFilterAssetType",
      "type": "object"
    },
    "EnumFilterAssetVisibility": {
      "description": "EnumFilterAssetVisibility",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetVisibility"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "in": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/AssetVisibility"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "In"
        },
        "ne": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetVisibility"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "notIn": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/AssetVisibility"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notin"
        }
      },
      "title": "EnumFilterAssetVisibility",
      "type": "object"
    },
    "IdFilter": {
      "description": "IdFilter",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eq"
        },
        "ne": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ne"
        }
      },
      "title": "IdFilter",
      "type": "object"
    },
    "IdFilterNullable": {
      "description": "IdFilterNullable",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eq"
        },
        "ne": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ne"
        }
      },
      "title": "IdFilterNullable",
      "type": "object"
    },
    "IdsFilter": {
      "description": "IdsFilter",
      "properties": {
        "all": {
          "anyOf": [
            {
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "All"
        },
        "any": {
          "anyOf": [
            {
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Any"
        },
        "none": {
          "anyOf": [
            {
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "None"
        }
      },
      "title": "IdsFilter",
      "type": "object"
    },
    "NumberFilter": {
      "description": "NumberFilter",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eq"
        },
        "gt": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gt"
        },
        "gte": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gte"
        },
        "in": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "In"
        },
        "lt": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Lt"
        },
        "lte": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Lte"
        },
        "ne": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ne"
        },
        "notIn": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notin"
        }
      },
      "title": "NumberFilter",
      "type": "object"
    },
    "NumberFilterNullable": {
      "description": "NumberFilterNullable",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eq"
        },
        "gt": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gt"
        },
        "gte": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gte"
        },
        "in": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "In"
        },
        "lt": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Lt"
        },
        "lte": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Lte"
        },
        "ne": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ne"
        },
        "notIn": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notin"
        }
      },
      "title": "NumberFilterNullable",
      "type": "object"
    },
    "SearchFilter": {
      "description": "SearchFilter",
      "properties": {
        "albumIds": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdsFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "checksum": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "city": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "country": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "createdAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "description": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringPatternFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "encodedVideoPath": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "fileSizeInBytes": {
          "anyOf": [
            {
              "$ref": "#/$defs/NumberFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "hasAlbums": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "hasPeople": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "hasTags": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "id": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isEncoded": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isFavorite": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isMotion": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isOffline": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "lensModel": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "libraryId": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "make": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "model": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "ocr": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringSimilarityFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "or": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/SearchFilterBranch"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Or"
        },
        "originalFileName": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringPatternFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "originalPath": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringPatternFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "personIds": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdsFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "rating": {
          "anyOf": [
            {
              "$ref": "#/$defs/NumberFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "state": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "tagIds": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdsFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "takenAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "trashedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnumFilterAssetType"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "updatedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "visibility": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnumFilterAssetVisibility"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "title": "SearchFilter",
      "type": "object"
    },
    "SearchFilterBranch": {
      "description": "SearchFilterBranch",
      "properties": {
        "albumIds": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdsFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "checksum": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "city": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "country": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "createdAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "description": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringPatternFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "encodedVideoPath": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "fileSizeInBytes": {
          "anyOf": [
            {
              "$ref": "#/$defs/NumberFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "hasAlbums": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "hasPeople": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "hasTags": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "id": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isEncoded": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isFavorite": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isMotion": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "isOffline": {
          "anyOf": [
            {
              "$ref": "#/$defs/BoolFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "lensModel": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "libraryId": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "make": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "model": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "ocr": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringSimilarityFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "originalFileName": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringPatternFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "originalPath": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringPatternFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "personIds": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdsFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "rating": {
          "anyOf": [
            {
              "$ref": "#/$defs/NumberFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "state": {
          "anyOf": [
            {
              "$ref": "#/$defs/StringFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "tagIds": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdsFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "takenAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "trashedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilterNullable"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnumFilterAssetType"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "updatedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateFilter"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "visibility": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnumFilterAssetVisibility"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "title": "SearchFilterBranch",
      "type": "object"
    },
    "SearchOrder": {
      "description": "SearchOrder",
      "properties": {
        "direction": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetOrder"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "field": {
          "anyOf": [
            {
              "$ref": "#/$defs/SearchOrderField"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "title": "SearchOrder",
      "type": "object"
    },
    "SearchOrderField": {
      "description": "SearchOrderField",
      "enum": [
        "fileCreatedAt",
        "localDateTime",
        "fileSizeInBytes",
        "rating"
      ],
      "title": "SearchOrderField",
      "type": "string"
    },
    "StringFilter": {
      "description": "StringFilter",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eq"
        },
        "in": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "In"
        },
        "ne": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ne"
        },
        "notIn": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notin"
        }
      },
      "title": "StringFilter",
      "type": "object"
    },
    "StringFilterNullable": {
      "description": "StringFilterNullable",
      "properties": {
        "eq": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eq"
        },
        "in": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "In"
        },
        "ne": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ne"
        },
        "notIn": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notin"
        }
      },
      "title": "StringFilterNullable",
      "type": "object"
    },
    "StringPatternFilter": {
      "description": "StringPatternFilter",
      "properties": {
        "endsWith": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Endswith"
        },
        "eq": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eq"
        },
        "in": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "In"
        },
        "like": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Like"
        },
        "ne": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ne"
        },
        "notIn": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notin"
        },
        "notLike": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notlike"
        },
        "startsWith": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Startswith"
        }
      },
      "title": "StringPatternFilter",
      "type": "object"
    },
    "StringSimilarityFilter": {
      "description": "StringSimilarityFilter",
      "properties": {
        "matches": {
          "minLength": 1,
          "title": "Matches",
          "type": "string"
        }
      },
      "required": [
        "matches"
      ],
      "title": "StringSimilarityFilter",
      "type": "object"
    }
  },
  "description": "MetadataSearchDto",
  "properties": {
    "albumIds": {
      "anyOf": [
        {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by album IDs",
      "title": "Albumids"
    },
    "checksum": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by file checksum",
      "title": "Checksum"
    },
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by city name",
      "title": "City"
    },
    "country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by country name",
      "title": "Country"
    },
    "createdAfter": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by creation date (after)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Createdafter"
    },
    "createdBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by creation date (before)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Createdbefore"
    },
    "cursor": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Cursor for the next page of results",
      "title": "Cursor"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by description text",
      "title": "Description"
    },
    "encodedVideoPath": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by encoded video file path",
      "title": "Encodedvideopath"
    },
    "filter": {
      "anyOf": [
        {
          "$ref": "#/$defs/SearchFilter"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by asset ID",
      "title": "Id"
    },
    "isEncoded": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by encoded status",
      "title": "Isencoded"
    },
    "isFavorite": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by favorite status",
      "title": "Isfavorite"
    },
    "isMotion": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by motion photo status",
      "title": "Ismotion"
    },
    "isNotInAlbum": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter assets not in any album",
      "title": "Isnotinalbum"
    },
    "isOffline": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by offline status",
      "title": "Isoffline"
    },
    "lensModel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by lens model",
      "title": "Lensmodel"
    },
    "libraryId": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Library ID to filter by",
      "title": "Libraryid"
    },
    "make": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by camera make",
      "title": "Make"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by camera model",
      "title": "Model"
    },
    "ocr": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by OCR text content",
      "title": "Ocr"
    },
    "order": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssetOrder"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "orderBy": {
      "anyOf": [
        {
          "$ref": "#/$defs/SearchOrder"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "originalFileName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by original file name",
      "title": "Originalfilename"
    },
    "originalPath": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by original file path",
      "title": "Originalpath"
    },
    "page": {
      "anyOf": [
        {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Page number",
      "title": "Page"
    },
    "personIds": {
      "anyOf": [
        {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by person IDs",
      "title": "Personids"
    },
    "previewPath": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by preview file path",
      "title": "Previewpath"
    },
    "rating": {
      "anyOf": [
        {
          "maximum": 5,
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by rating [1-5], or null for unrated",
      "title": "Rating"
    },
    "size": {
      "anyOf": [
        {
          "maximum": 1000,
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 250,
      "description": "Number of results to return",
      "title": "Size"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by state/province name",
      "title": "State"
    },
    "tagIds": {
      "anyOf": [
        {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by tag IDs",
      "title": "Tagids"
    },
    "takenAfter": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by taken date (after)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Takenafter"
    },
    "takenBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by taken date (before)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Takenbefore"
    },
    "thumbnailPath": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by thumbnail file path",
      "title": "Thumbnailpath"
    },
    "trashedAfter": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by trash date (after)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Trashedafter"
    },
    "trashedBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by trash date (before)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Trashedbefore"
    },
    "type": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssetTypeEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "updatedAfter": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by update date (after)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Updatedafter"
    },
    "updatedBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by update date (before)",
      "examples": [
        "2024-01-01T00:00:00Z"
      ],
      "title": "Updatedbefore"
    },
    "visibility": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssetVisibility"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "withDeleted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Include deleted assets",
      "title": "Withdeleted"
    },
    "withExif": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Include EXIF data in response",
      "title": "Withexif"
    },
    "withPeople": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Include people data in response",
      "title": "Withpeople"
    },
    "withStacked": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Include stacked assets",
      "title": "Withstacked"
    }
  },
  "title": "MetadataSearchDto",
  "type": "object"
}

Config:

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

Fields:

Validators:

album_ids pydantic-field

album_ids: Optional[List[UUID]] = None

Filter by album IDs

checksum pydantic-field

checksum: Optional[StrictStr] = None

Filter by file checksum

city pydantic-field

city: Optional[StrictStr] = None

Filter by city name

country pydantic-field

country: Optional[StrictStr] = None

Filter by country name

created_after pydantic-field

created_after: Optional[datetime] = None

Filter by creation date (after)

created_before pydantic-field

created_before: Optional[datetime] = None

Filter by creation date (before)

cursor pydantic-field

cursor: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None

Cursor for the next page of results

description pydantic-field

description: Optional[StrictStr] = None

Filter by description text

encoded_video_path pydantic-field

encoded_video_path: Optional[StrictStr] = None

Filter by encoded video file path

id pydantic-field

id: Optional[UUID] = None

Filter by asset ID

is_encoded pydantic-field

is_encoded: Optional[StrictBool] = None

Filter by encoded status

is_favorite pydantic-field

is_favorite: Optional[StrictBool] = None

Filter by favorite status

is_motion pydantic-field

is_motion: Optional[StrictBool] = None

Filter by motion photo status

is_not_in_album pydantic-field

is_not_in_album: Optional[StrictBool] = None

Filter assets not in any album

is_offline pydantic-field

is_offline: Optional[StrictBool] = None

Filter by offline status

lens_model pydantic-field

lens_model: Optional[StrictStr] = None

Filter by lens model

library_id pydantic-field

library_id: Optional[UUID] = None

Library ID to filter by

make pydantic-field

make: Optional[StrictStr] = None

Filter by camera make

model pydantic-field

model: Optional[StrictStr] = None

Filter by camera model

ocr pydantic-field

ocr: Optional[StrictStr] = None

Filter by OCR text content

original_file_name pydantic-field

original_file_name: Optional[StrictStr] = None

Filter by original file name

original_path pydantic-field

original_path: Optional[StrictStr] = None

Filter by original file path

page pydantic-field

page: Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=1)]] = None

Page number

person_ids pydantic-field

person_ids: Optional[List[UUID]] = None

Filter by person IDs

preview_path pydantic-field

preview_path: Optional[StrictStr] = None

Filter by preview file path

rating pydantic-field

rating: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = None

Filter by rating [1-5], or null for unrated

size pydantic-field

size: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = 250

Number of results to return

state pydantic-field

state: Optional[StrictStr] = None

Filter by state/province name

tag_ids pydantic-field

tag_ids: Optional[List[UUID]] = None

Filter by tag IDs

taken_after pydantic-field

taken_after: Optional[datetime] = None

Filter by taken date (after)

taken_before pydantic-field

taken_before: Optional[datetime] = None

Filter by taken date (before)

thumbnail_path pydantic-field

thumbnail_path: Optional[StrictStr] = None

Filter by thumbnail file path

trashed_after pydantic-field

trashed_after: Optional[datetime] = None

Filter by trash date (after)

trashed_before pydantic-field

trashed_before: Optional[datetime] = None

Filter by trash date (before)

updated_after pydantic-field

updated_after: Optional[datetime] = None

Filter by update date (after)

updated_before pydantic-field

updated_before: Optional[datetime] = None

Filter by update date (before)

with_deleted pydantic-field

with_deleted: Optional[StrictBool] = None

Include deleted assets

with_exif pydantic-field

with_exif: Optional[StrictBool] = None

Include EXIF data in response

with_people pydantic-field

with_people: Optional[StrictBool] = None

Include people data in response

with_stacked pydantic-field

with_stacked: Optional[StrictBool] = None

Include stacked assets

created_after_validate_regular_expression pydantic-validator

created_after_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
241
242
243
244
245
246
247
248
249
250
251
252
253
254
@field_validator("created_after", mode="before")
def created_after_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

created_before_validate_regular_expression pydantic-validator

created_before_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
256
257
258
259
260
261
262
263
264
265
266
267
268
269
@field_validator("created_before", mode="before")
def created_before_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 MetadataSearchDto from a dict

Source code in immichpy/client/generated/models/metadata_search_dto.py
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of MetadataSearchDto from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "albumIds": obj.get("albumIds"),
            "checksum": obj.get("checksum"),
            "city": obj.get("city"),
            "country": obj.get("country"),
            "createdAfter": obj.get("createdAfter"),
            "createdBefore": obj.get("createdBefore"),
            "cursor": obj.get("cursor"),
            "description": obj.get("description"),
            "encodedVideoPath": obj.get("encodedVideoPath"),
            "filter": SearchFilter.from_dict(obj["filter"])
            if obj.get("filter") is not None
            else None,
            "id": obj.get("id"),
            "isEncoded": obj.get("isEncoded"),
            "isFavorite": obj.get("isFavorite"),
            "isMotion": obj.get("isMotion"),
            "isNotInAlbum": obj.get("isNotInAlbum"),
            "isOffline": obj.get("isOffline"),
            "lensModel": obj.get("lensModel"),
            "libraryId": obj.get("libraryId"),
            "make": obj.get("make"),
            "model": obj.get("model"),
            "ocr": obj.get("ocr"),
            "order": obj.get("order"),
            "orderBy": SearchOrder.from_dict(obj["orderBy"])
            if obj.get("orderBy") is not None
            else None,
            "originalFileName": obj.get("originalFileName"),
            "originalPath": obj.get("originalPath"),
            "page": obj.get("page"),
            "personIds": obj.get("personIds"),
            "previewPath": obj.get("previewPath"),
            "rating": obj.get("rating"),
            "size": obj.get("size") if obj.get("size") is not None else 250,
            "state": obj.get("state"),
            "tagIds": obj.get("tagIds"),
            "takenAfter": obj.get("takenAfter"),
            "takenBefore": obj.get("takenBefore"),
            "thumbnailPath": obj.get("thumbnailPath"),
            "trashedAfter": obj.get("trashedAfter"),
            "trashedBefore": obj.get("trashedBefore"),
            "type": obj.get("type"),
            "updatedAfter": obj.get("updatedAfter"),
            "updatedBefore": obj.get("updatedBefore"),
            "visibility": obj.get("visibility"),
            "withDeleted": obj.get("withDeleted"),
            "withExif": obj.get("withExif"),
            "withPeople": obj.get("withPeople"),
            "withStacked": obj.get("withStacked"),
        }
    )
    return _obj

from_json classmethod

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

Create an instance of MetadataSearchDto from a JSON string

Source code in immichpy/client/generated/models/metadata_search_dto.py
406
407
408
409
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of MetadataSearchDto from a JSON string"""
    return cls.from_dict(json.loads(json_str))

id_validate_regular_expression pydantic-validator

id_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
271
272
273
274
275
276
277
278
279
280
281
282
283
284
@field_validator("id", mode="before")
def id_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if value is None:
        return value

    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

library_id_validate_regular_expression pydantic-validator

library_id_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
286
287
288
289
290
291
292
293
294
295
296
297
298
299
@field_validator("library_id", mode="before")
def library_id_validate_regular_expression(cls, value):
    """Validates the regular expression"""
    if value is None:
        return value

    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

taken_after_validate_regular_expression pydantic-validator

taken_after_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
301
302
303
304
305
306
307
308
309
310
311
312
313
314
@field_validator("taken_after", mode="before")
def taken_after_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

taken_before_validate_regular_expression pydantic-validator

taken_before_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
316
317
318
319
320
321
322
323
324
325
326
327
328
329
@field_validator("taken_before", mode="before")
def taken_before_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/metadata_search_dto.py
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
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 filter
    if self.filter:
        _dict["filter"] = self.filter.to_dict()
    # override the default output from pydantic by calling `to_dict()` of order_by
    if self.order_by:
        _dict["orderBy"] = self.order_by.to_dict()
    # 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 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 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 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 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 tag_ids (nullable) is None
    # and model_fields_set contains the field
    if self.tag_ids is None and "tag_ids" in self.model_fields_set:
        _dict["tagIds"] = None

    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/metadata_search_dto.py
402
403
404
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/metadata_search_dto.py
398
399
400
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))

trashed_after_validate_regular_expression pydantic-validator

trashed_after_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
331
332
333
334
335
336
337
338
339
340
341
342
343
344
@field_validator("trashed_after", mode="before")
def trashed_after_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

trashed_before_validate_regular_expression pydantic-validator

trashed_before_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
346
347
348
349
350
351
352
353
354
355
356
357
358
359
@field_validator("trashed_before", mode="before")
def trashed_before_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

updated_after_validate_regular_expression pydantic-validator

updated_after_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
361
362
363
364
365
366
367
368
369
370
371
372
373
374
@field_validator("updated_after", mode="before")
def updated_after_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

updated_before_validate_regular_expression pydantic-validator

updated_before_validate_regular_expression(value)

Validates the regular expression

Source code in immichpy/client/generated/models/metadata_search_dto.py
376
377
378
379
380
381
382
383
384
385
386
387
388
389
@field_validator("updated_before", mode="before")
def updated_before_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