Skip to content

Server Features Dto

immichpy.client.generated.models.server_features_dto.ServerFeaturesDto pydantic-model

Bases: BaseModel

ServerFeaturesDto

Show JSON schema:
{
  "description": "ServerFeaturesDto",
  "properties": {
    "configFile": {
      "description": "Whether config file is available",
      "title": "Configfile",
      "type": "boolean"
    },
    "duplicateDetection": {
      "description": "Whether duplicate detection is enabled",
      "title": "Duplicatedetection",
      "type": "boolean"
    },
    "email": {
      "description": "Whether email notifications are enabled",
      "title": "Email",
      "type": "boolean"
    },
    "facialRecognition": {
      "description": "Whether facial recognition is enabled",
      "title": "Facialrecognition",
      "type": "boolean"
    },
    "importFaces": {
      "description": "Whether face import is enabled",
      "title": "Importfaces",
      "type": "boolean"
    },
    "map": {
      "description": "Whether map feature is enabled",
      "title": "Map",
      "type": "boolean"
    },
    "oauth": {
      "description": "Whether OAuth is enabled",
      "title": "Oauth",
      "type": "boolean"
    },
    "oauthAutoLaunch": {
      "description": "Whether OAuth auto-launch is enabled",
      "title": "Oauthautolaunch",
      "type": "boolean"
    },
    "ocr": {
      "description": "Whether OCR is enabled",
      "title": "Ocr",
      "type": "boolean"
    },
    "passwordLogin": {
      "description": "Whether password login is enabled",
      "title": "Passwordlogin",
      "type": "boolean"
    },
    "reverseGeocoding": {
      "description": "Whether reverse geocoding is enabled",
      "title": "Reversegeocoding",
      "type": "boolean"
    },
    "search": {
      "description": "Whether search is enabled",
      "title": "Search",
      "type": "boolean"
    },
    "sidecar": {
      "description": "Whether sidecar files are supported",
      "title": "Sidecar",
      "type": "boolean"
    },
    "smartSearch": {
      "description": "Whether smart search is enabled",
      "title": "Smartsearch",
      "type": "boolean"
    },
    "trash": {
      "description": "Whether trash feature is enabled",
      "title": "Trash",
      "type": "boolean"
    }
  },
  "required": [
    "configFile",
    "duplicateDetection",
    "email",
    "facialRecognition",
    "importFaces",
    "map",
    "oauth",
    "oauthAutoLaunch",
    "ocr",
    "passwordLogin",
    "reverseGeocoding",
    "search",
    "sidecar",
    "smartSearch",
    "trash"
  ],
  "title": "ServerFeaturesDto",
  "type": "object"
}

Config:

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

Fields:

config_file pydantic-field

config_file: StrictBool

Whether config file is available

duplicate_detection pydantic-field

duplicate_detection: StrictBool

Whether duplicate detection is enabled

email pydantic-field

email: StrictBool

Whether email notifications are enabled

facial_recognition pydantic-field

facial_recognition: StrictBool

Whether facial recognition is enabled

import_faces pydantic-field

import_faces: StrictBool

Whether face import is enabled

map pydantic-field

map: StrictBool

Whether map feature is enabled

oauth pydantic-field

oauth: StrictBool

Whether OAuth is enabled

oauth_auto_launch pydantic-field

oauth_auto_launch: StrictBool

Whether OAuth auto-launch is enabled

ocr pydantic-field

ocr: StrictBool

Whether OCR is enabled

password_login pydantic-field

password_login: StrictBool

Whether password login is enabled

reverse_geocoding pydantic-field

reverse_geocoding: StrictBool

Whether reverse geocoding is enabled

search pydantic-field

search: StrictBool

Whether search is enabled

sidecar pydantic-field

sidecar: StrictBool

Whether sidecar files are supported

smart_search: StrictBool

Whether smart search is enabled

trash pydantic-field

trash: StrictBool

Whether trash feature is enabled

from_dict classmethod

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

Create an instance of ServerFeaturesDto from a dict

Source code in immichpy/client/generated/models/server_features_dto.py
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of ServerFeaturesDto from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "configFile": obj.get("configFile"),
            "duplicateDetection": obj.get("duplicateDetection"),
            "email": obj.get("email"),
            "facialRecognition": obj.get("facialRecognition"),
            "importFaces": obj.get("importFaces"),
            "map": obj.get("map"),
            "oauth": obj.get("oauth"),
            "oauthAutoLaunch": obj.get("oauthAutoLaunch"),
            "ocr": obj.get("ocr"),
            "passwordLogin": obj.get("passwordLogin"),
            "reverseGeocoding": obj.get("reverseGeocoding"),
            "search": obj.get("search"),
            "sidecar": obj.get("sidecar"),
            "smartSearch": obj.get("smartSearch"),
            "trash": obj.get("trash"),
        }
    )
    return _obj

from_json classmethod

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

Create an instance of ServerFeaturesDto from a JSON string

Source code in immichpy/client/generated/models/server_features_dto.py
94
95
96
97
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of ServerFeaturesDto 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/server_features_dto.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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/server_features_dto.py
89
90
91
92
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/server_features_dto.py
85
86
87
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))