Skip to content

Time Bucket Asset Response Dto

immichpy.client.generated.models.time_bucket_asset_response_dto.TimeBucketAssetResponseDto pydantic-model

Bases: BaseModel

TimeBucketAssetResponseDto

Show JSON schema:
{
  "$defs": {
    "AssetVisibility": {
      "description": "Asset visibility",
      "enum": [
        "archive",
        "timeline",
        "hidden",
        "locked"
      ],
      "title": "AssetVisibility",
      "type": "string"
    }
  },
  "description": "TimeBucketAssetResponseDto",
  "properties": {
    "city": {
      "description": "Array of city names extracted from EXIF GPS data",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "City",
      "type": "array"
    },
    "country": {
      "description": "Array of country names extracted from EXIF GPS data",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Country",
      "type": "array"
    },
    "duration": {
      "description": "Array of video durations in HH:MM:SS format (null for images)",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Duration",
      "type": "array"
    },
    "fileCreatedAt": {
      "description": "Array of file creation timestamps in UTC",
      "items": {
        "type": "string"
      },
      "title": "Filecreatedat",
      "type": "array"
    },
    "id": {
      "description": "Array of asset IDs in the time bucket",
      "items": {
        "type": "string"
      },
      "title": "Id",
      "type": "array"
    },
    "isFavorite": {
      "description": "Array indicating whether each asset is favorited",
      "items": {
        "type": "boolean"
      },
      "title": "Isfavorite",
      "type": "array"
    },
    "isImage": {
      "description": "Array indicating whether each asset is an image (false for videos)",
      "items": {
        "type": "boolean"
      },
      "title": "Isimage",
      "type": "array"
    },
    "isTrashed": {
      "description": "Array indicating whether each asset is in the trash",
      "items": {
        "type": "boolean"
      },
      "title": "Istrashed",
      "type": "array"
    },
    "latitude": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Array of latitude coordinates extracted from EXIF GPS data",
      "title": "Latitude"
    },
    "livePhotoVideoId": {
      "description": "Array of live photo video asset IDs (null for non-live photos)",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Livephotovideoid",
      "type": "array"
    },
    "localOffsetHours": {
      "description": "Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective.",
      "items": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "integer"
          }
        ]
      },
      "title": "Localoffsethours",
      "type": "array"
    },
    "longitude": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Array of longitude coordinates extracted from EXIF GPS data",
      "title": "Longitude"
    },
    "ownerId": {
      "description": "Array of owner IDs for each asset",
      "items": {
        "type": "string"
      },
      "title": "Ownerid",
      "type": "array"
    },
    "projectionType": {
      "description": "Array of projection types for 360\u00b0 content (e.g., \"EQUIRECTANGULAR\", \"CUBEFACE\", \"CYLINDRICAL\")",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Projectiontype",
      "type": "array"
    },
    "ratio": {
      "description": "Array of aspect ratios (width/height) for each asset",
      "items": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "integer"
          }
        ]
      },
      "title": "Ratio",
      "type": "array"
    },
    "stack": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 2,
                "minItems": 2,
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets)",
      "title": "Stack"
    },
    "thumbhash": {
      "description": "Array of BlurHash strings for generating asset previews (base64 encoded)",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Thumbhash",
      "type": "array"
    },
    "visibility": {
      "description": "Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED)",
      "items": {
        "$ref": "#/$defs/AssetVisibility"
      },
      "title": "Visibility",
      "type": "array"
    }
  },
  "required": [
    "city",
    "country",
    "duration",
    "fileCreatedAt",
    "id",
    "isFavorite",
    "isImage",
    "isTrashed",
    "livePhotoVideoId",
    "localOffsetHours",
    "ownerId",
    "projectionType",
    "ratio",
    "thumbhash",
    "visibility"
  ],
  "title": "TimeBucketAssetResponseDto",
  "type": "object"
}

Config:

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

Fields:

city pydantic-field

city: List[Optional[StrictStr]]

Array of city names extracted from EXIF GPS data

country pydantic-field

country: List[Optional[StrictStr]]

Array of country names extracted from EXIF GPS data

duration pydantic-field

duration: List[Optional[StrictStr]]

Array of video durations in HH:MM:SS format (null for images)

file_created_at pydantic-field

file_created_at: List[StrictStr]

Array of file creation timestamps in UTC

id pydantic-field

id: List[StrictStr]

Array of asset IDs in the time bucket

is_favorite pydantic-field

is_favorite: List[StrictBool]

Array indicating whether each asset is favorited

is_image pydantic-field

is_image: List[StrictBool]

Array indicating whether each asset is an image (false for videos)

is_trashed pydantic-field

is_trashed: List[StrictBool]

Array indicating whether each asset is in the trash

latitude pydantic-field

latitude: Optional[List[Optional[Union[StrictFloat, StrictInt]]]] = None

Array of latitude coordinates extracted from EXIF GPS data

live_photo_video_id pydantic-field

live_photo_video_id: List[Optional[StrictStr]]

Array of live photo video asset IDs (null for non-live photos)

local_offset_hours pydantic-field

local_offset_hours: List[Union[StrictFloat, StrictInt]]

Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective.

longitude pydantic-field

longitude: Optional[List[Optional[Union[StrictFloat, StrictInt]]]] = None

Array of longitude coordinates extracted from EXIF GPS data

owner_id pydantic-field

owner_id: List[StrictStr]

Array of owner IDs for each asset

projection_type pydantic-field

projection_type: List[Optional[StrictStr]]

Array of projection types for 360° content (e.g., "EQUIRECTANGULAR", "CUBEFACE", "CYLINDRICAL")

ratio pydantic-field

ratio: List[Union[StrictFloat, StrictInt]]

Array of aspect ratios (width/height) for each asset

stack pydantic-field

stack: Optional[List[Optional[Annotated[List[StrictStr], Field(min_length=2, max_length=2)]]]] = None

Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets)

thumbhash pydantic-field

thumbhash: List[Optional[StrictStr]]

Array of BlurHash strings for generating asset previews (base64 encoded)

visibility pydantic-field

visibility: List[AssetVisibility]

Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED)

from_dict classmethod

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

Create an instance of TimeBucketAssetResponseDto from a dict

Source code in immichpy/client/generated/models/time_bucket_asset_response_dto.py
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
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of TimeBucketAssetResponseDto from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "city": obj.get("city"),
            "country": obj.get("country"),
            "duration": obj.get("duration"),
            "fileCreatedAt": obj.get("fileCreatedAt"),
            "id": obj.get("id"),
            "isFavorite": obj.get("isFavorite"),
            "isImage": obj.get("isImage"),
            "isTrashed": obj.get("isTrashed"),
            "latitude": obj.get("latitude"),
            "livePhotoVideoId": obj.get("livePhotoVideoId"),
            "localOffsetHours": obj.get("localOffsetHours"),
            "longitude": obj.get("longitude"),
            "ownerId": obj.get("ownerId"),
            "projectionType": obj.get("projectionType"),
            "ratio": obj.get("ratio"),
            "stack": obj.get("stack"),
            "thumbhash": obj.get("thumbhash"),
            "visibility": obj.get("visibility"),
        }
    )
    return _obj

from_json classmethod

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

Create an instance of TimeBucketAssetResponseDto from a JSON string

Source code in immichpy/client/generated/models/time_bucket_asset_response_dto.py
139
140
141
142
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of TimeBucketAssetResponseDto 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/time_bucket_asset_response_dto.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
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,
    )
    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

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