Skip to content

Sync Asset Exif V1

immichpy.client.generated.models.sync_asset_exif_v1.SyncAssetExifV1 pydantic-model

Bases: BaseModel

SyncAssetExifV1

Show JSON schema:
{
  "description": "SyncAssetExifV1",
  "properties": {
    "assetId": {
      "description": "Asset ID",
      "title": "Assetid",
      "type": "string"
    },
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "City",
      "title": "City"
    },
    "country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Country",
      "title": "Country"
    },
    "dateTimeOriginal": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Date time original",
      "title": "Datetimeoriginal"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Description",
      "title": "Description"
    },
    "exifImageHeight": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Exif image height",
      "title": "Exifimageheight"
    },
    "exifImageWidth": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Exif image width",
      "title": "Exifimagewidth"
    },
    "exposureTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Exposure time",
      "title": "Exposuretime"
    },
    "fNumber": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "F number",
      "title": "Fnumber"
    },
    "fileSizeInByte": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "File size in byte",
      "title": "Filesizeinbyte"
    },
    "focalLength": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Focal length",
      "title": "Focallength"
    },
    "fps": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "FPS",
      "title": "Fps"
    },
    "iso": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO",
      "title": "Iso"
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Latitude",
      "title": "Latitude"
    },
    "lensModel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Lens model",
      "title": "Lensmodel"
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Longitude",
      "title": "Longitude"
    },
    "make": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Make",
      "title": "Make"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Model",
      "title": "Model"
    },
    "modifyDate": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Modify date",
      "title": "Modifydate"
    },
    "orientation": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Orientation",
      "title": "Orientation"
    },
    "profileDescription": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Profile description",
      "title": "Profiledescription"
    },
    "projectionType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Projection type",
      "title": "Projectiontype"
    },
    "rating": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Rating",
      "title": "Rating"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "State",
      "title": "State"
    },
    "timeZone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Time zone",
      "title": "Timezone"
    }
  },
  "required": [
    "assetId",
    "city",
    "country",
    "dateTimeOriginal",
    "description",
    "exifImageHeight",
    "exifImageWidth",
    "exposureTime",
    "fNumber",
    "fileSizeInByte",
    "focalLength",
    "fps",
    "iso",
    "latitude",
    "lensModel",
    "longitude",
    "make",
    "model",
    "modifyDate",
    "orientation",
    "profileDescription",
    "projectionType",
    "rating",
    "state",
    "timeZone"
  ],
  "title": "SyncAssetExifV1",
  "type": "object"
}

Config:

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

Fields:

asset_id pydantic-field

asset_id: StrictStr

Asset ID

city pydantic-field

city: Optional[StrictStr]

City

country pydantic-field

country: Optional[StrictStr]

Country

date_time_original pydantic-field

date_time_original: Optional[datetime]

Date time original

description pydantic-field

description: Optional[StrictStr]

Description

exif_image_height pydantic-field

exif_image_height: Optional[StrictInt]

Exif image height

exif_image_width pydantic-field

exif_image_width: Optional[StrictInt]

Exif image width

exposure_time pydantic-field

exposure_time: Optional[StrictStr]

Exposure time

f_number pydantic-field

f_number: Optional[Union[StrictFloat, StrictInt]]

F number

file_size_in_byte pydantic-field

file_size_in_byte: Optional[StrictInt]

File size in byte

focal_length pydantic-field

focal_length: Optional[Union[StrictFloat, StrictInt]]

Focal length

fps pydantic-field

fps: Optional[Union[StrictFloat, StrictInt]]

FPS

iso pydantic-field

iso: Optional[StrictInt]

ISO

latitude pydantic-field

latitude: Optional[Union[StrictFloat, StrictInt]]

Latitude

lens_model pydantic-field

lens_model: Optional[StrictStr]

Lens model

longitude pydantic-field

longitude: Optional[Union[StrictFloat, StrictInt]]

Longitude

make pydantic-field

make: Optional[StrictStr]

Make

model pydantic-field

model: Optional[StrictStr]

Model

modify_date pydantic-field

modify_date: Optional[datetime]

Modify date

orientation pydantic-field

orientation: Optional[StrictStr]

Orientation

profile_description pydantic-field

profile_description: Optional[StrictStr]

Profile description

projection_type pydantic-field

projection_type: Optional[StrictStr]

Projection type

rating pydantic-field

rating: Optional[StrictInt]

Rating

state pydantic-field

state: Optional[StrictStr]

State

time_zone pydantic-field

time_zone: Optional[StrictStr]

Time zone

from_dict classmethod

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

Create an instance of SyncAssetExifV1 from a dict

Source code in immichpy/client/generated/models/sync_asset_exif_v1.py
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of SyncAssetExifV1 from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "assetId": obj.get("assetId"),
            "city": obj.get("city"),
            "country": obj.get("country"),
            "dateTimeOriginal": obj.get("dateTimeOriginal"),
            "description": obj.get("description"),
            "exifImageHeight": obj.get("exifImageHeight"),
            "exifImageWidth": obj.get("exifImageWidth"),
            "exposureTime": obj.get("exposureTime"),
            "fNumber": obj.get("fNumber"),
            "fileSizeInByte": obj.get("fileSizeInByte"),
            "focalLength": obj.get("focalLength"),
            "fps": obj.get("fps"),
            "iso": obj.get("iso"),
            "latitude": obj.get("latitude"),
            "lensModel": obj.get("lensModel"),
            "longitude": obj.get("longitude"),
            "make": obj.get("make"),
            "model": obj.get("model"),
            "modifyDate": obj.get("modifyDate"),
            "orientation": obj.get("orientation"),
            "profileDescription": obj.get("profileDescription"),
            "projectionType": obj.get("projectionType"),
            "rating": obj.get("rating"),
            "state": obj.get("state"),
            "timeZone": obj.get("timeZone"),
        }
    )
    return _obj

from_json classmethod

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

Create an instance of SyncAssetExifV1 from a JSON string

Source code in immichpy/client/generated/models/sync_asset_exif_v1.py
119
120
121
122
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of SyncAssetExifV1 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/sync_asset_exif_v1.py
124
125
126
127
128
129
130
131
132
133
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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
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,
    )
    # set to None if city (nullable) is None
    # and model_fields_set contains the field
    if self.city is None and "city" in self.model_fields_set:
        _dict["city"] = None

    # set to None if country (nullable) is None
    # and model_fields_set contains the field
    if self.country is None and "country" in self.model_fields_set:
        _dict["country"] = None

    # set to None if date_time_original (nullable) is None
    # and model_fields_set contains the field
    if (
        self.date_time_original is None
        and "date_time_original" in self.model_fields_set
    ):
        _dict["dateTimeOriginal"] = None

    # set to None if description (nullable) is None
    # and model_fields_set contains the field
    if self.description is None and "description" in self.model_fields_set:
        _dict["description"] = None

    # set to None if exif_image_height (nullable) is None
    # and model_fields_set contains the field
    if (
        self.exif_image_height is None
        and "exif_image_height" in self.model_fields_set
    ):
        _dict["exifImageHeight"] = None

    # set to None if exif_image_width (nullable) is None
    # and model_fields_set contains the field
    if (
        self.exif_image_width is None
        and "exif_image_width" in self.model_fields_set
    ):
        _dict["exifImageWidth"] = None

    # set to None if exposure_time (nullable) is None
    # and model_fields_set contains the field
    if self.exposure_time is None and "exposure_time" in self.model_fields_set:
        _dict["exposureTime"] = None

    # set to None if f_number (nullable) is None
    # and model_fields_set contains the field
    if self.f_number is None and "f_number" in self.model_fields_set:
        _dict["fNumber"] = None

    # set to None if file_size_in_byte (nullable) is None
    # and model_fields_set contains the field
    if (
        self.file_size_in_byte is None
        and "file_size_in_byte" in self.model_fields_set
    ):
        _dict["fileSizeInByte"] = None

    # set to None if focal_length (nullable) is None
    # and model_fields_set contains the field
    if self.focal_length is None and "focal_length" in self.model_fields_set:
        _dict["focalLength"] = None

    # set to None if fps (nullable) is None
    # and model_fields_set contains the field
    if self.fps is None and "fps" in self.model_fields_set:
        _dict["fps"] = None

    # set to None if iso (nullable) is None
    # and model_fields_set contains the field
    if self.iso is None and "iso" in self.model_fields_set:
        _dict["iso"] = None

    # set to None if latitude (nullable) is None
    # and model_fields_set contains the field
    if self.latitude is None and "latitude" in self.model_fields_set:
        _dict["latitude"] = None

    # set to None if lens_model (nullable) is None
    # and model_fields_set contains the field
    if self.lens_model is None and "lens_model" in self.model_fields_set:
        _dict["lensModel"] = None

    # set to None if longitude (nullable) is None
    # and model_fields_set contains the field
    if self.longitude is None and "longitude" in self.model_fields_set:
        _dict["longitude"] = None

    # set to None if make (nullable) is None
    # and model_fields_set contains the field
    if self.make is None and "make" in self.model_fields_set:
        _dict["make"] = None

    # set to None if model (nullable) is None
    # and model_fields_set contains the field
    if self.model is None and "model" in self.model_fields_set:
        _dict["model"] = None

    # set to None if modify_date (nullable) is None
    # and model_fields_set contains the field
    if self.modify_date is None and "modify_date" in self.model_fields_set:
        _dict["modifyDate"] = None

    # set to None if orientation (nullable) is None
    # and model_fields_set contains the field
    if self.orientation is None and "orientation" in self.model_fields_set:
        _dict["orientation"] = None

    # set to None if profile_description (nullable) is None
    # and model_fields_set contains the field
    if (
        self.profile_description is None
        and "profile_description" in self.model_fields_set
    ):
        _dict["profileDescription"] = None

    # set to None if projection_type (nullable) is None
    # and model_fields_set contains the field
    if self.projection_type is None and "projection_type" in self.model_fields_set:
        _dict["projectionType"] = None

    # set to None if rating (nullable) is None
    # and model_fields_set contains the field
    if self.rating is None and "rating" in self.model_fields_set:
        _dict["rating"] = None

    # set to None if state (nullable) is None
    # and model_fields_set contains the field
    if self.state is None and "state" in self.model_fields_set:
        _dict["state"] = None

    # set to None if time_zone (nullable) is None
    # and model_fields_set contains the field
    if self.time_zone is None and "time_zone" in self.model_fields_set:
        _dict["timeZone"] = None

    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/sync_asset_exif_v1.py
114
115
116
117
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/sync_asset_exif_v1.py
110
111
112
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))