Skip to content

System Config Job Dto

immichpy.client.generated.models.system_config_job_dto.SystemConfigJobDto pydantic-model

Bases: BaseModel

SystemConfigJobDto

Show JSON schema:
{
  "$defs": {
    "JobSettingsDto": {
      "description": "JobSettingsDto",
      "properties": {
        "concurrency": {
          "description": "Concurrency",
          "minimum": 1,
          "title": "Concurrency",
          "type": "integer"
        }
      },
      "required": [
        "concurrency"
      ],
      "title": "JobSettingsDto",
      "type": "object"
    }
  },
  "description": "SystemConfigJobDto",
  "properties": {
    "backgroundTask": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "editor": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "faceDetection": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "library": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "metadataExtraction": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "migration": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "notifications": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "ocr": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "search": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "sidecar": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "smartSearch": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "thumbnailGeneration": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "videoConversion": {
      "$ref": "#/$defs/JobSettingsDto"
    },
    "workflow": {
      "$ref": "#/$defs/JobSettingsDto"
    }
  },
  "required": [
    "backgroundTask",
    "editor",
    "faceDetection",
    "library",
    "metadataExtraction",
    "migration",
    "notifications",
    "ocr",
    "search",
    "sidecar",
    "smartSearch",
    "thumbnailGeneration",
    "videoConversion",
    "workflow"
  ],
  "title": "SystemConfigJobDto",
  "type": "object"
}

Config:

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

Fields:

from_dict classmethod

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

Create an instance of SystemConfigJobDto from a dict

Source code in immichpy/client/generated/models/system_config_job_dto.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
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
195
196
197
198
199
200
201
202
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of SystemConfigJobDto from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "backgroundTask": JobSettingsDto.from_dict(obj["backgroundTask"])
            if obj.get("backgroundTask") is not None
            else None,
            "editor": JobSettingsDto.from_dict(obj["editor"])
            if obj.get("editor") is not None
            else None,
            "faceDetection": JobSettingsDto.from_dict(obj["faceDetection"])
            if obj.get("faceDetection") is not None
            else None,
            "library": JobSettingsDto.from_dict(obj["library"])
            if obj.get("library") is not None
            else None,
            "metadataExtraction": JobSettingsDto.from_dict(
                obj["metadataExtraction"]
            )
            if obj.get("metadataExtraction") is not None
            else None,
            "migration": JobSettingsDto.from_dict(obj["migration"])
            if obj.get("migration") is not None
            else None,
            "notifications": JobSettingsDto.from_dict(obj["notifications"])
            if obj.get("notifications") is not None
            else None,
            "ocr": JobSettingsDto.from_dict(obj["ocr"])
            if obj.get("ocr") is not None
            else None,
            "search": JobSettingsDto.from_dict(obj["search"])
            if obj.get("search") is not None
            else None,
            "sidecar": JobSettingsDto.from_dict(obj["sidecar"])
            if obj.get("sidecar") is not None
            else None,
            "smartSearch": JobSettingsDto.from_dict(obj["smartSearch"])
            if obj.get("smartSearch") is not None
            else None,
            "thumbnailGeneration": JobSettingsDto.from_dict(
                obj["thumbnailGeneration"]
            )
            if obj.get("thumbnailGeneration") is not None
            else None,
            "videoConversion": JobSettingsDto.from_dict(obj["videoConversion"])
            if obj.get("videoConversion") is not None
            else None,
            "workflow": JobSettingsDto.from_dict(obj["workflow"])
            if obj.get("workflow") is not None
            else None,
        }
    )
    return _obj

from_json classmethod

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

Create an instance of SystemConfigJobDto from a JSON string

Source code in immichpy/client/generated/models/system_config_job_dto.py
77
78
79
80
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of SystemConfigJobDto 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/system_config_job_dto.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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,
    )
    # override the default output from pydantic by calling `to_dict()` of background_task
    if self.background_task:
        _dict["backgroundTask"] = self.background_task.to_dict()
    # override the default output from pydantic by calling `to_dict()` of editor
    if self.editor:
        _dict["editor"] = self.editor.to_dict()
    # override the default output from pydantic by calling `to_dict()` of face_detection
    if self.face_detection:
        _dict["faceDetection"] = self.face_detection.to_dict()
    # override the default output from pydantic by calling `to_dict()` of library
    if self.library:
        _dict["library"] = self.library.to_dict()
    # override the default output from pydantic by calling `to_dict()` of metadata_extraction
    if self.metadata_extraction:
        _dict["metadataExtraction"] = self.metadata_extraction.to_dict()
    # override the default output from pydantic by calling `to_dict()` of migration
    if self.migration:
        _dict["migration"] = self.migration.to_dict()
    # override the default output from pydantic by calling `to_dict()` of notifications
    if self.notifications:
        _dict["notifications"] = self.notifications.to_dict()
    # override the default output from pydantic by calling `to_dict()` of ocr
    if self.ocr:
        _dict["ocr"] = self.ocr.to_dict()
    # override the default output from pydantic by calling `to_dict()` of search
    if self.search:
        _dict["search"] = self.search.to_dict()
    # override the default output from pydantic by calling `to_dict()` of sidecar
    if self.sidecar:
        _dict["sidecar"] = self.sidecar.to_dict()
    # override the default output from pydantic by calling `to_dict()` of smart_search
    if self.smart_search:
        _dict["smartSearch"] = self.smart_search.to_dict()
    # override the default output from pydantic by calling `to_dict()` of thumbnail_generation
    if self.thumbnail_generation:
        _dict["thumbnailGeneration"] = self.thumbnail_generation.to_dict()
    # override the default output from pydantic by calling `to_dict()` of video_conversion
    if self.video_conversion:
        _dict["videoConversion"] = self.video_conversion.to_dict()
    # override the default output from pydantic by calling `to_dict()` of workflow
    if self.workflow:
        _dict["workflow"] = self.workflow.to_dict()
    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/system_config_job_dto.py
72
73
74
75
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/system_config_job_dto.py
68
69
70
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))