Skip to content

Server Config Dto

immichpy.client.generated.models.server_config_dto.ServerConfigDto pydantic-model

Bases: BaseModel

ServerConfigDto

Show JSON schema:
{
  "description": "ServerConfigDto",
  "properties": {
    "externalDomain": {
      "description": "External domain URL",
      "title": "Externaldomain",
      "type": "string"
    },
    "isInitialized": {
      "description": "Whether the server has been initialized",
      "title": "Isinitialized",
      "type": "boolean"
    },
    "isOnboarded": {
      "description": "Whether the admin has completed onboarding",
      "title": "Isonboarded",
      "type": "boolean"
    },
    "loginPageMessage": {
      "description": "Login page message",
      "title": "Loginpagemessage",
      "type": "string"
    },
    "maintenanceMode": {
      "description": "Whether maintenance mode is active",
      "title": "Maintenancemode",
      "type": "boolean"
    },
    "mapDarkStyleUrl": {
      "description": "Map dark style URL",
      "title": "Mapdarkstyleurl",
      "type": "string"
    },
    "mapLightStyleUrl": {
      "description": "Map light style URL",
      "title": "Maplightstyleurl",
      "type": "string"
    },
    "minFaces": {
      "description": "People min faces server default",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991,
      "title": "Minfaces",
      "type": "integer"
    },
    "oauthAccountManagementUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "",
      "description": "OAuth account management URL",
      "title": "Oauthaccountmanagementurl"
    },
    "oauthButtonText": {
      "description": "OAuth button text",
      "title": "Oauthbuttontext",
      "type": "string"
    },
    "publicUsers": {
      "description": "Whether public user registration is enabled",
      "title": "Publicusers",
      "type": "boolean"
    },
    "trashDays": {
      "description": "Number of days before trashed assets are permanently deleted",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991,
      "title": "Trashdays",
      "type": "integer"
    },
    "userDeleteDelay": {
      "description": "Delay in days before deleted users are permanently removed",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991,
      "title": "Userdeletedelay",
      "type": "integer"
    }
  },
  "required": [
    "externalDomain",
    "isInitialized",
    "isOnboarded",
    "loginPageMessage",
    "maintenanceMode",
    "mapDarkStyleUrl",
    "mapLightStyleUrl",
    "minFaces",
    "oauthButtonText",
    "publicUsers",
    "trashDays",
    "userDeleteDelay"
  ],
  "title": "ServerConfigDto",
  "type": "object"
}

Config:

  • validate_by_name: True
  • validate_by_alias: True
  • validate_assignment: True
  • protected_namespaces: ()

Fields:

external_domain pydantic-field

external_domain: StrictStr

External domain URL

is_initialized pydantic-field

is_initialized: StrictBool

Whether the server has been initialized

is_onboarded pydantic-field

is_onboarded: StrictBool

Whether the admin has completed onboarding

login_page_message pydantic-field

login_page_message: StrictStr

Login page message

maintenance_mode pydantic-field

maintenance_mode: StrictBool

Whether maintenance mode is active

map_dark_style_url pydantic-field

map_dark_style_url: StrictStr

Map dark style URL

map_light_style_url pydantic-field

map_light_style_url: StrictStr

Map light style URL

min_faces pydantic-field

min_faces: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]

People min faces server default

oauth_account_management_url pydantic-field

oauth_account_management_url: Optional[StrictStr] = ''

OAuth account management URL

oauth_button_text pydantic-field

oauth_button_text: StrictStr

OAuth button text

public_users pydantic-field

public_users: StrictBool

Whether public user registration is enabled

trash_days pydantic-field

trash_days: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]

Number of days before trashed assets are permanently deleted

user_delete_delay pydantic-field

user_delete_delay: Annotated[int, Field(le=9007199254740991, strict=True, ge=-9007199254740991)]

Delay in days before deleted users are permanently removed

from_dict classmethod

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

Create an instance of ServerConfigDto from a dict

Source code in immichpy/client/generated/models/server_config_dto.py
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of ServerConfigDto from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "externalDomain": obj.get("externalDomain"),
            "isInitialized": obj.get("isInitialized"),
            "isOnboarded": obj.get("isOnboarded"),
            "loginPageMessage": obj.get("loginPageMessage"),
            "maintenanceMode": obj.get("maintenanceMode"),
            "mapDarkStyleUrl": obj.get("mapDarkStyleUrl"),
            "mapLightStyleUrl": obj.get("mapLightStyleUrl"),
            "minFaces": obj.get("minFaces"),
            "oauthAccountManagementUrl": obj.get("oauthAccountManagementUrl")
            if obj.get("oauthAccountManagementUrl") is not None
            else "",
            "oauthButtonText": obj.get("oauthButtonText"),
            "publicUsers": obj.get("publicUsers"),
            "trashDays": obj.get("trashDays"),
            "userDeleteDelay": obj.get("userDeleteDelay"),
        }
    )
    return _obj

from_json classmethod

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

Create an instance of ServerConfigDto from a JSON string

Source code in immichpy/client/generated/models/server_config_dto.py
110
111
112
113
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of ServerConfigDto 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_config_dto.py
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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_config_dto.py
106
107
108
def to_json(self) -> str:
    """Returns the JSON representation of the model using alias"""
    return json.dumps(to_jsonable_python(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_config_dto.py
102
103
104
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))