1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* Immich
*
* Immich API
*
* The version of the OpenAPI document: 1.137.3
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TimeBucketAssetResponseDto {
/// Array of city names extracted from EXIF GPS data
#[serde(rename = "city")]
pub city: Vec<String>,
/// Array of country names extracted from EXIF GPS data
#[serde(rename = "country")]
pub country: Vec<String>,
/// Array of video durations in HH:MM:SS format (null for images)
#[serde(rename = "duration")]
pub duration: Vec<String>,
/// Array of file creation timestamps in UTC (ISO 8601 format, without timezone)
#[serde(rename = "fileCreatedAt")]
pub file_created_at: Vec<String>,
/// Array of asset IDs in the time bucket
#[serde(rename = "id")]
pub id: Vec<String>,
/// Array indicating whether each asset is favorited
#[serde(rename = "isFavorite")]
pub is_favorite: Vec<bool>,
/// Array indicating whether each asset is an image (false for videos)
#[serde(rename = "isImage")]
pub is_image: Vec<bool>,
/// Array indicating whether each asset is in the trash
#[serde(rename = "isTrashed")]
pub is_trashed: Vec<bool>,
/// Array of live photo video asset IDs (null for non-live photos)
#[serde(rename = "livePhotoVideoId")]
pub live_photo_video_id: Vec<String>,
/// 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.
#[serde(rename = "localOffsetHours")]
pub local_offset_hours: Vec<f64>,
/// Array of owner IDs for each asset
#[serde(rename = "ownerId")]
pub owner_id: Vec<String>,
/// Array of projection types for 360° content (e.g., \"EQUIRECTANGULAR\", \"CUBEFACE\", \"CYLINDRICAL\")
#[serde(rename = "projectionType")]
pub projection_type: Vec<String>,
/// Array of aspect ratios (width/height) for each asset
#[serde(rename = "ratio")]
pub ratio: Vec<f64>,
/// Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets)
#[serde(rename = "stack", skip_serializing_if = "Option::is_none")]
pub stack: Option<Vec<Vec<String>>>,
/// Array of BlurHash strings for generating asset previews (base64 encoded)
#[serde(rename = "thumbhash")]
pub thumbhash: Vec<String>,
/// Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED)
#[serde(rename = "visibility")]
pub visibility: Vec<models::AssetVisibility>,
}
impl TimeBucketAssetResponseDto {
pub fn new(city: Vec<String>, country: Vec<String>, duration: Vec<String>, file_created_at: Vec<String>, id: Vec<String>, is_favorite: Vec<bool>, is_image: Vec<bool>, is_trashed: Vec<bool>, live_photo_video_id: Vec<String>, local_offset_hours: Vec<f64>, owner_id: Vec<String>, projection_type: Vec<String>, ratio: Vec<f64>, thumbhash: Vec<String>, visibility: Vec<models::AssetVisibility>) -> TimeBucketAssetResponseDto {
TimeBucketAssetResponseDto {
city,
country,
duration,
file_created_at,
id,
is_favorite,
is_image,
is_trashed,
live_photo_video_id,
local_offset_hours,
owner_id,
projection_type,
ratio,
stack: None,
thumbhash,
visibility,
}
}
}