Skip to content

Exif Response Dto

immichpy.client.generated.models.exif_response_dto.ExifResponseDto pydantic-model

Bases: BaseModel

ExifResponseDto

Show JSON schema:
{
  "description": "ExifResponseDto",
  "properties": {
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "City name",
      "title": "City"
    },
    "country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Country name",
      "title": "Country"
    },
    "dateTimeOriginal": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Original date/time",
      "title": "Datetimeoriginal"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Image description",
      "title": "Description"
    },
    "exifImageHeight": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Image height in pixels",
      "title": "Exifimageheight"
    },
    "exifImageWidth": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Image width in pixels",
      "title": "Exifimagewidth"
    },
    "exposureTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Exposure time",
      "title": "Exposuretime"
    },
    "fNumber": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "F-number (aperture)",
      "title": "Fnumber"
    },
    "fileSizeInByte": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "File size in bytes",
      "title": "Filesizeinbyte"
    },
    "focalLength": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Focal length in mm",
      "title": "Focallength"
    },
    "iso": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "ISO sensitivity",
      "title": "Iso"
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "GPS latitude",
      "title": "Latitude"
    },
    "lensModel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Lens model",
      "title": "Lensmodel"
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "GPS longitude",
      "title": "Longitude"
    },
    "make": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Camera make",
      "title": "Make"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Camera model",
      "title": "Model"
    },
    "modifyDate": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Modification date/time",
      "title": "Modifydate"
    },
    "orientation": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Image orientation",
      "title": "Orientation"
    },
    "projectionType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Projection type",
      "title": "Projectiontype"
    },
    "rating": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Rating",
      "title": "Rating"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "State/province name",
      "title": "State"
    },
    "timeZone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Time zone",
      "title": "Timezone"
    }
  },
  "title": "ExifResponseDto",
  "type": "object"
}

Config:

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

Fields:

city pydantic-field

city: Optional[StrictStr] = None

City name

country pydantic-field

country: Optional[StrictStr] = None

Country name

date_time_original pydantic-field

date_time_original: Optional[datetime] = None

Original date/time

description pydantic-field

description: Optional[StrictStr] = None

Image description

exif_image_height pydantic-field

exif_image_height: Optional[Union[StrictFloat, StrictInt]] = None

Image height in pixels

exif_image_width pydantic-field

exif_image_width: Optional[Union[StrictFloat, StrictInt]] = None

Image width in pixels

exposure_time pydantic-field

exposure_time: Optional[StrictStr] = None

Exposure time

f_number pydantic-field

f_number: Optional[Union[StrictFloat, StrictInt]] = None

F-number (aperture)

file_size_in_byte pydantic-field

file_size_in_byte: Optional[StrictInt] = None

File size in bytes

focal_length pydantic-field

focal_length: Optional[Union[StrictFloat, StrictInt]] = None

Focal length in mm

iso pydantic-field

iso: Optional[Union[StrictFloat, StrictInt]] = None

ISO sensitivity

latitude pydantic-field

latitude: Optional[Union[StrictFloat, StrictInt]] = None

GPS latitude

lens_model pydantic-field

lens_model: Optional[StrictStr] = None

Lens model

longitude pydantic-field

longitude: Optional[Union[StrictFloat, StrictInt]] = None

GPS longitude

make pydantic-field

make: Optional[StrictStr] = None

Camera make

model pydantic-field

model: Optional[StrictStr] = None

Camera model

modify_date pydantic-field

modify_date: Optional[datetime] = None

Modification date/time

orientation pydantic-field

orientation: Optional[StrictStr] = None

Image orientation

projection_type pydantic-field

projection_type: Optional[StrictStr] = None

Projection type

rating pydantic-field

rating: Optional[Union[StrictFloat, StrictInt]] = None

Rating

state pydantic-field

state: Optional[StrictStr] = None

State/province name

time_zone pydantic-field

time_zone: Optional[StrictStr] = None

Time zone

from_dict classmethod

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

Create an instance of ExifResponseDto from a dict

Source code in immichpy/client/generated/models/exif_response_dto.py
273
274
275
276
277
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
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of ExifResponseDto from a dict"""
    if obj is None:
        return None

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

    _obj = cls.model_validate(
        {
            "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"),
            "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"),
            "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 ExifResponseDto from a JSON string

Source code in immichpy/client/generated/models/exif_response_dto.py
127
128
129
130
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of ExifResponseDto 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/exif_response_dto.py
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
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 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 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/exif_response_dto.py
122
123
124
125
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/exif_response_dto.py
118
119
120
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))