Skip to content

Search Filter Branch

immichpy.client.generated.models.search_filter_branch.SearchFilterBranch pydantic-model

Bases: BaseModel

SearchFilterBranch

Show JSON schema:
{
  "$defs": {
    "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"
    },
    "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": "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"
}

Config:

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

Fields:

from_dict classmethod

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

Create an instance of SearchFilterBranch from a dict

Source code in immichpy/client/generated/models/search_filter_branch.py
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of SearchFilterBranch from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "albumIds": IdsFilter.from_dict(obj["albumIds"])
            if obj.get("albumIds") is not None
            else None,
            "checksum": StringFilter.from_dict(obj["checksum"])
            if obj.get("checksum") is not None
            else None,
            "city": StringFilterNullable.from_dict(obj["city"])
            if obj.get("city") is not None
            else None,
            "country": StringFilterNullable.from_dict(obj["country"])
            if obj.get("country") is not None
            else None,
            "createdAt": DateFilter.from_dict(obj["createdAt"])
            if obj.get("createdAt") is not None
            else None,
            "description": StringPatternFilter.from_dict(obj["description"])
            if obj.get("description") is not None
            else None,
            "encodedVideoPath": StringFilter.from_dict(obj["encodedVideoPath"])
            if obj.get("encodedVideoPath") is not None
            else None,
            "fileSizeInBytes": NumberFilter.from_dict(obj["fileSizeInBytes"])
            if obj.get("fileSizeInBytes") is not None
            else None,
            "hasAlbums": BoolFilter.from_dict(obj["hasAlbums"])
            if obj.get("hasAlbums") is not None
            else None,
            "hasPeople": BoolFilter.from_dict(obj["hasPeople"])
            if obj.get("hasPeople") is not None
            else None,
            "hasTags": BoolFilter.from_dict(obj["hasTags"])
            if obj.get("hasTags") is not None
            else None,
            "id": IdFilter.from_dict(obj["id"])
            if obj.get("id") is not None
            else None,
            "isEncoded": BoolFilter.from_dict(obj["isEncoded"])
            if obj.get("isEncoded") is not None
            else None,
            "isFavorite": BoolFilter.from_dict(obj["isFavorite"])
            if obj.get("isFavorite") is not None
            else None,
            "isMotion": BoolFilter.from_dict(obj["isMotion"])
            if obj.get("isMotion") is not None
            else None,
            "isOffline": BoolFilter.from_dict(obj["isOffline"])
            if obj.get("isOffline") is not None
            else None,
            "lensModel": StringFilterNullable.from_dict(obj["lensModel"])
            if obj.get("lensModel") is not None
            else None,
            "libraryId": IdFilterNullable.from_dict(obj["libraryId"])
            if obj.get("libraryId") is not None
            else None,
            "make": StringFilterNullable.from_dict(obj["make"])
            if obj.get("make") is not None
            else None,
            "model": StringFilterNullable.from_dict(obj["model"])
            if obj.get("model") is not None
            else None,
            "ocr": StringSimilarityFilter.from_dict(obj["ocr"])
            if obj.get("ocr") is not None
            else None,
            "originalFileName": StringPatternFilter.from_dict(
                obj["originalFileName"]
            )
            if obj.get("originalFileName") is not None
            else None,
            "originalPath": StringPatternFilter.from_dict(obj["originalPath"])
            if obj.get("originalPath") is not None
            else None,
            "personIds": IdsFilter.from_dict(obj["personIds"])
            if obj.get("personIds") is not None
            else None,
            "rating": NumberFilterNullable.from_dict(obj["rating"])
            if obj.get("rating") is not None
            else None,
            "state": StringFilterNullable.from_dict(obj["state"])
            if obj.get("state") is not None
            else None,
            "tagIds": IdsFilter.from_dict(obj["tagIds"])
            if obj.get("tagIds") is not None
            else None,
            "takenAt": DateFilter.from_dict(obj["takenAt"])
            if obj.get("takenAt") is not None
            else None,
            "trashedAt": DateFilterNullable.from_dict(obj["trashedAt"])
            if obj.get("trashedAt") is not None
            else None,
            "type": EnumFilterAssetType.from_dict(obj["type"])
            if obj.get("type") is not None
            else None,
            "updatedAt": DateFilter.from_dict(obj["updatedAt"])
            if obj.get("updatedAt") is not None
            else None,
            "visibility": EnumFilterAssetVisibility.from_dict(obj["visibility"])
            if obj.get("visibility") is not None
            else None,
        }
    )
    return _obj

from_json classmethod

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

Create an instance of SearchFilterBranch from a JSON string

Source code in immichpy/client/generated/models/search_filter_branch.py
139
140
141
142
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of SearchFilterBranch from a JSON string"""
    return cls.from_dict(json.loads(json_str))

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/search_filter_branch.py
144
145
146
147
148
149
150
151
152
153
154
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
204
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
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_ids
    if self.album_ids:
        _dict["albumIds"] = self.album_ids.to_dict()
    # override the default output from pydantic by calling `to_dict()` of checksum
    if self.checksum:
        _dict["checksum"] = self.checksum.to_dict()
    # override the default output from pydantic by calling `to_dict()` of city
    if self.city:
        _dict["city"] = self.city.to_dict()
    # override the default output from pydantic by calling `to_dict()` of country
    if self.country:
        _dict["country"] = self.country.to_dict()
    # override the default output from pydantic by calling `to_dict()` of created_at
    if self.created_at:
        _dict["createdAt"] = self.created_at.to_dict()
    # override the default output from pydantic by calling `to_dict()` of description
    if self.description:
        _dict["description"] = self.description.to_dict()
    # override the default output from pydantic by calling `to_dict()` of encoded_video_path
    if self.encoded_video_path:
        _dict["encodedVideoPath"] = self.encoded_video_path.to_dict()
    # override the default output from pydantic by calling `to_dict()` of file_size_in_bytes
    if self.file_size_in_bytes:
        _dict["fileSizeInBytes"] = self.file_size_in_bytes.to_dict()
    # override the default output from pydantic by calling `to_dict()` of has_albums
    if self.has_albums:
        _dict["hasAlbums"] = self.has_albums.to_dict()
    # override the default output from pydantic by calling `to_dict()` of has_people
    if self.has_people:
        _dict["hasPeople"] = self.has_people.to_dict()
    # override the default output from pydantic by calling `to_dict()` of has_tags
    if self.has_tags:
        _dict["hasTags"] = self.has_tags.to_dict()
    # override the default output from pydantic by calling `to_dict()` of id
    if self.id:
        _dict["id"] = self.id.to_dict()
    # override the default output from pydantic by calling `to_dict()` of is_encoded
    if self.is_encoded:
        _dict["isEncoded"] = self.is_encoded.to_dict()
    # override the default output from pydantic by calling `to_dict()` of is_favorite
    if self.is_favorite:
        _dict["isFavorite"] = self.is_favorite.to_dict()
    # override the default output from pydantic by calling `to_dict()` of is_motion
    if self.is_motion:
        _dict["isMotion"] = self.is_motion.to_dict()
    # override the default output from pydantic by calling `to_dict()` of is_offline
    if self.is_offline:
        _dict["isOffline"] = self.is_offline.to_dict()
    # override the default output from pydantic by calling `to_dict()` of lens_model
    if self.lens_model:
        _dict["lensModel"] = self.lens_model.to_dict()
    # override the default output from pydantic by calling `to_dict()` of library_id
    if self.library_id:
        _dict["libraryId"] = self.library_id.to_dict()
    # override the default output from pydantic by calling `to_dict()` of make
    if self.make:
        _dict["make"] = self.make.to_dict()
    # override the default output from pydantic by calling `to_dict()` of model
    if self.model:
        _dict["model"] = self.model.to_dict()
    # override the default output from pydantic by calling `to_dict()` of ocr
    if self.ocr:
        _dict["ocr"] = self.ocr.to_dict()
    # override the default output from pydantic by calling `to_dict()` of original_file_name
    if self.original_file_name:
        _dict["originalFileName"] = self.original_file_name.to_dict()
    # override the default output from pydantic by calling `to_dict()` of original_path
    if self.original_path:
        _dict["originalPath"] = self.original_path.to_dict()
    # override the default output from pydantic by calling `to_dict()` of person_ids
    if self.person_ids:
        _dict["personIds"] = self.person_ids.to_dict()
    # override the default output from pydantic by calling `to_dict()` of rating
    if self.rating:
        _dict["rating"] = self.rating.to_dict()
    # override the default output from pydantic by calling `to_dict()` of state
    if self.state:
        _dict["state"] = self.state.to_dict()
    # override the default output from pydantic by calling `to_dict()` of tag_ids
    if self.tag_ids:
        _dict["tagIds"] = self.tag_ids.to_dict()
    # override the default output from pydantic by calling `to_dict()` of taken_at
    if self.taken_at:
        _dict["takenAt"] = self.taken_at.to_dict()
    # override the default output from pydantic by calling `to_dict()` of trashed_at
    if self.trashed_at:
        _dict["trashedAt"] = self.trashed_at.to_dict()
    # override the default output from pydantic by calling `to_dict()` of type
    if self.type:
        _dict["type"] = self.type.to_dict()
    # override the default output from pydantic by calling `to_dict()` of updated_at
    if self.updated_at:
        _dict["updatedAt"] = self.updated_at.to_dict()
    # override the default output from pydantic by calling `to_dict()` of visibility
    if self.visibility:
        _dict["visibility"] = self.visibility.to_dict()
    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/search_filter_branch.py
135
136
137
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/search_filter_branch.py
131
132
133
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))