immich_api_rs/models/
server_features_dto.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ServerFeaturesDto {
16 #[serde(rename = "configFile")]
17 pub config_file: bool,
18 #[serde(rename = "duplicateDetection")]
19 pub duplicate_detection: bool,
20 #[serde(rename = "email")]
21 pub email: bool,
22 #[serde(rename = "facialRecognition")]
23 pub facial_recognition: bool,
24 #[serde(rename = "importFaces")]
25 pub import_faces: bool,
26 #[serde(rename = "map")]
27 pub map: bool,
28 #[serde(rename = "oauth")]
29 pub oauth: bool,
30 #[serde(rename = "oauthAutoLaunch")]
31 pub oauth_auto_launch: bool,
32 #[serde(rename = "passwordLogin")]
33 pub password_login: bool,
34 #[serde(rename = "reverseGeocoding")]
35 pub reverse_geocoding: bool,
36 #[serde(rename = "search")]
37 pub search: bool,
38 #[serde(rename = "sidecar")]
39 pub sidecar: bool,
40 #[serde(rename = "smartSearch")]
41 pub smart_search: bool,
42 #[serde(rename = "trash")]
43 pub trash: bool,
44}
45
46impl ServerFeaturesDto {
47 pub fn new(config_file: bool, duplicate_detection: bool, email: bool, facial_recognition: bool, import_faces: bool, map: bool, oauth: bool, oauth_auto_launch: bool, password_login: bool, reverse_geocoding: bool, search: bool, sidecar: bool, smart_search: bool, trash: bool) -> ServerFeaturesDto {
48 ServerFeaturesDto {
49 config_file,
50 duplicate_detection,
51 email,
52 facial_recognition,
53 import_faces,
54 map,
55 oauth,
56 oauth_auto_launch,
57 password_login,
58 reverse_geocoding,
59 search,
60 sidecar,
61 smart_search,
62 trash,
63 }
64 }
65}
66