Skip to content

Statistics Search Dto

immichpy.client.generated.models.statistics_search_dto.StatisticsSearchDto pydantic-model

Bases: BaseModel

StatisticsSearchDto

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"
    }
  },
  "description": "StatisticsSearchDto",
  "properties": {
    "albumIds": {
      "anyOf": [
        {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by album IDs",
      "title": "Albumids"
    },
    "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)",
      "title": "Createdafter"
    },
    "createdBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by creation date (before)",
      "title": "Createdbefore"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by description text",
      "title": "Description"
    },
    "deviceId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Device ID to filter by",
      "title": "Deviceid"
    },
    "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"
    },
    "personIds": {
      "anyOf": [
        {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by person IDs",
      "title": "Personids"
    },
    "rating": {
      "anyOf": [
        {
          "maximum": 5,
          "minimum": -1,
          "type": "number"
        },
        {
          "maximum": 5,
          "minimum": -1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by rating [1-5], or null for unrated",
      "title": "Rating"
    },
    "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)",
      "title": "Takenafter"
    },
    "takenBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by taken date (before)",
      "title": "Takenbefore"
    },
    "trashedAfter": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by trash date (after)",
      "title": "Trashedafter"
    },
    "trashedBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by trash date (before)",
      "title": "Trashedbefore"
    },
    "type": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssetTypeEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Asset type filter"
    },
    "updatedAfter": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by update date (after)",
      "title": "Updatedafter"
    },
    "updatedBefore": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by update date (before)",
      "title": "Updatedbefore"
    },
    "visibility": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssetVisibility"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by visibility"
    }
  },
  "title": "StatisticsSearchDto",
  "type": "object"
}

Config:

  • populate_by_name: True
  • validate_assignment: True
  • protected_namespaces: ()

Fields:

album_ids pydantic-field

album_ids: Optional[List[UUID]] = None

Filter by album IDs

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)

description pydantic-field

description: Optional[StrictStr] = None

Filter by description text

device_id pydantic-field

device_id: Optional[StrictStr] = None

Device ID to filter by

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

person_ids pydantic-field

person_ids: Optional[List[UUID]] = None

Filter by person IDs

rating pydantic-field

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

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

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)

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)

type pydantic-field

type: Optional[AssetTypeEnum] = None

Asset type filter

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)

visibility pydantic-field

visibility: Optional[AssetVisibility] = None

Filter by visibility

from_dict classmethod

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

Create an instance of StatisticsSearchDto from a dict

Source code in immichpy/client/generated/models/statistics_search_dto.py
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of StatisticsSearchDto 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"),
            "city": obj.get("city"),
            "country": obj.get("country"),
            "createdAfter": obj.get("createdAfter"),
            "createdBefore": obj.get("createdBefore"),
            "description": obj.get("description"),
            "deviceId": obj.get("deviceId"),
            "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"),
            "personIds": obj.get("personIds"),
            "rating": obj.get("rating"),
            "state": obj.get("state"),
            "tagIds": obj.get("tagIds"),
            "takenAfter": obj.get("takenAfter"),
            "takenBefore": obj.get("takenBefore"),
            "trashedAfter": obj.get("trashedAfter"),
            "trashedBefore": obj.get("trashedBefore"),
            "type": obj.get("type"),
            "updatedAfter": obj.get("updatedAfter"),
            "updatedBefore": obj.get("updatedBefore"),
            "visibility": obj.get("visibility"),
        }
    )
    return _obj

from_json classmethod

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

Create an instance of StatisticsSearchDto from a JSON string

Source code in immichpy/client/generated/models/statistics_search_dto.py
172
173
174
175
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of StatisticsSearchDto 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/statistics_search_dto.py
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
def to_dict(self) -> Dict[str, Any]:
    """Return the dictionary representation of the model using alias.

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

    * `None` is only added to the output dict for nullable fields that
      were set at model initialization. Other fields with value `None`
      are ignored.
    """
    excluded_fields: Set[str] = set([])

    _dict = self.model_dump(
        by_alias=True,
        exclude=excluded_fields,
        exclude_none=True,
    )
    # set to None if city (nullable) is None
    # and model_fields_set contains the field
    if self.city is None and "city" in self.model_fields_set:
        _dict["city"] = None

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

    # set to None if 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 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/statistics_search_dto.py
167
168
169
170
def to_json(self) -> str:
    """Returns the JSON representation of the model using alias"""
    # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
    return json.dumps(self.to_dict())

to_str

to_str() -> str

Returns the string representation of the model using alias

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