2022-07-13 05:23:48 -07:00
|
|
|
//
|
|
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
|
|
//
|
|
|
|
// @dart=2.12
|
|
|
|
|
|
|
|
// ignore_for_file: unused_element, unused_import
|
|
|
|
// ignore_for_file: always_put_required_named_parameters_first
|
|
|
|
// ignore_for_file: constant_identifier_names
|
|
|
|
// ignore_for_file: lines_longer_than_80_chars
|
|
|
|
|
|
|
|
part of openapi.api;
|
|
|
|
|
|
|
|
class ExifResponseDto {
|
|
|
|
/// Returns a new [ExifResponseDto] instance.
|
|
|
|
ExifResponseDto({
|
|
|
|
this.id,
|
2022-10-06 09:25:54 -07:00
|
|
|
this.fileSizeInByte,
|
2022-07-13 05:23:48 -07:00
|
|
|
this.make,
|
|
|
|
this.model,
|
|
|
|
this.imageName,
|
|
|
|
this.exifImageWidth,
|
|
|
|
this.exifImageHeight,
|
|
|
|
this.orientation,
|
|
|
|
this.dateTimeOriginal,
|
|
|
|
this.modifyDate,
|
|
|
|
this.lensModel,
|
|
|
|
this.fNumber,
|
|
|
|
this.focalLength,
|
|
|
|
this.iso,
|
|
|
|
this.exposureTime,
|
|
|
|
this.latitude,
|
|
|
|
this.longitude,
|
|
|
|
this.city,
|
|
|
|
this.state,
|
|
|
|
this.country,
|
|
|
|
});
|
|
|
|
|
2022-10-06 09:25:54 -07:00
|
|
|
int? id;
|
|
|
|
|
|
|
|
int? fileSizeInByte;
|
2022-07-13 05:23:48 -07:00
|
|
|
|
|
|
|
String? make;
|
|
|
|
|
|
|
|
String? model;
|
|
|
|
|
|
|
|
String? imageName;
|
|
|
|
|
|
|
|
num? exifImageWidth;
|
|
|
|
|
|
|
|
num? exifImageHeight;
|
|
|
|
|
|
|
|
String? orientation;
|
|
|
|
|
|
|
|
DateTime? dateTimeOriginal;
|
|
|
|
|
|
|
|
DateTime? modifyDate;
|
|
|
|
|
|
|
|
String? lensModel;
|
|
|
|
|
|
|
|
num? fNumber;
|
|
|
|
|
|
|
|
num? focalLength;
|
|
|
|
|
|
|
|
num? iso;
|
|
|
|
|
|
|
|
num? exposureTime;
|
|
|
|
|
|
|
|
num? latitude;
|
|
|
|
|
|
|
|
num? longitude;
|
|
|
|
|
|
|
|
String? city;
|
|
|
|
|
|
|
|
String? state;
|
|
|
|
|
|
|
|
String? country;
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool operator ==(Object other) => identical(this, other) || other is ExifResponseDto &&
|
|
|
|
other.id == id &&
|
2022-10-06 09:25:54 -07:00
|
|
|
other.fileSizeInByte == fileSizeInByte &&
|
2022-07-13 05:23:48 -07:00
|
|
|
other.make == make &&
|
|
|
|
other.model == model &&
|
|
|
|
other.imageName == imageName &&
|
|
|
|
other.exifImageWidth == exifImageWidth &&
|
|
|
|
other.exifImageHeight == exifImageHeight &&
|
|
|
|
other.orientation == orientation &&
|
|
|
|
other.dateTimeOriginal == dateTimeOriginal &&
|
|
|
|
other.modifyDate == modifyDate &&
|
|
|
|
other.lensModel == lensModel &&
|
|
|
|
other.fNumber == fNumber &&
|
|
|
|
other.focalLength == focalLength &&
|
|
|
|
other.iso == iso &&
|
|
|
|
other.exposureTime == exposureTime &&
|
|
|
|
other.latitude == latitude &&
|
|
|
|
other.longitude == longitude &&
|
|
|
|
other.city == city &&
|
|
|
|
other.state == state &&
|
|
|
|
other.country == country;
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode =>
|
|
|
|
// ignore: unnecessary_parenthesis
|
|
|
|
(id == null ? 0 : id!.hashCode) +
|
2022-10-06 09:25:54 -07:00
|
|
|
(fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) +
|
2022-07-13 05:23:48 -07:00
|
|
|
(make == null ? 0 : make!.hashCode) +
|
|
|
|
(model == null ? 0 : model!.hashCode) +
|
|
|
|
(imageName == null ? 0 : imageName!.hashCode) +
|
|
|
|
(exifImageWidth == null ? 0 : exifImageWidth!.hashCode) +
|
|
|
|
(exifImageHeight == null ? 0 : exifImageHeight!.hashCode) +
|
|
|
|
(orientation == null ? 0 : orientation!.hashCode) +
|
|
|
|
(dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) +
|
|
|
|
(modifyDate == null ? 0 : modifyDate!.hashCode) +
|
|
|
|
(lensModel == null ? 0 : lensModel!.hashCode) +
|
|
|
|
(fNumber == null ? 0 : fNumber!.hashCode) +
|
|
|
|
(focalLength == null ? 0 : focalLength!.hashCode) +
|
|
|
|
(iso == null ? 0 : iso!.hashCode) +
|
|
|
|
(exposureTime == null ? 0 : exposureTime!.hashCode) +
|
|
|
|
(latitude == null ? 0 : latitude!.hashCode) +
|
|
|
|
(longitude == null ? 0 : longitude!.hashCode) +
|
|
|
|
(city == null ? 0 : city!.hashCode) +
|
|
|
|
(state == null ? 0 : state!.hashCode) +
|
|
|
|
(country == null ? 0 : country!.hashCode);
|
|
|
|
|
|
|
|
@override
|
2022-10-06 09:25:54 -07:00
|
|
|
String toString() => 'ExifResponseDto[id=$id, fileSizeInByte=$fileSizeInByte, make=$make, model=$model, imageName=$imageName, exifImageWidth=$exifImageWidth, exifImageHeight=$exifImageHeight, orientation=$orientation, dateTimeOriginal=$dateTimeOriginal, modifyDate=$modifyDate, lensModel=$lensModel, fNumber=$fNumber, focalLength=$focalLength, iso=$iso, exposureTime=$exposureTime, latitude=$latitude, longitude=$longitude, city=$city, state=$state, country=$country]';
|
2022-07-13 05:23:48 -07:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
2023-01-09 21:08:45 -07:00
|
|
|
final json = <String, dynamic>{};
|
|
|
|
if (this.id != null) {
|
|
|
|
json[r'id'] = this.id;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'id'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.fileSizeInByte != null) {
|
|
|
|
json[r'fileSizeInByte'] = this.fileSizeInByte;
|
2022-10-06 09:25:54 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'fileSizeInByte'] = null;
|
2022-10-06 09:25:54 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.make != null) {
|
|
|
|
json[r'make'] = this.make;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'make'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.model != null) {
|
|
|
|
json[r'model'] = this.model;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'model'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.imageName != null) {
|
|
|
|
json[r'imageName'] = this.imageName;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'imageName'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.exifImageWidth != null) {
|
|
|
|
json[r'exifImageWidth'] = this.exifImageWidth;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'exifImageWidth'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.exifImageHeight != null) {
|
|
|
|
json[r'exifImageHeight'] = this.exifImageHeight;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'exifImageHeight'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.orientation != null) {
|
|
|
|
json[r'orientation'] = this.orientation;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'orientation'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.dateTimeOriginal != null) {
|
|
|
|
json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String();
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'dateTimeOriginal'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.modifyDate != null) {
|
|
|
|
json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String();
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'modifyDate'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.lensModel != null) {
|
|
|
|
json[r'lensModel'] = this.lensModel;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'lensModel'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.fNumber != null) {
|
|
|
|
json[r'fNumber'] = this.fNumber;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'fNumber'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.focalLength != null) {
|
|
|
|
json[r'focalLength'] = this.focalLength;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'focalLength'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.iso != null) {
|
|
|
|
json[r'iso'] = this.iso;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'iso'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.exposureTime != null) {
|
|
|
|
json[r'exposureTime'] = this.exposureTime;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'exposureTime'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.latitude != null) {
|
|
|
|
json[r'latitude'] = this.latitude;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'latitude'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.longitude != null) {
|
|
|
|
json[r'longitude'] = this.longitude;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'longitude'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.city != null) {
|
|
|
|
json[r'city'] = this.city;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'city'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.state != null) {
|
|
|
|
json[r'state'] = this.state;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'state'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
if (this.country != null) {
|
|
|
|
json[r'country'] = this.country;
|
2022-07-13 05:23:48 -07:00
|
|
|
} else {
|
2023-01-09 21:08:45 -07:00
|
|
|
// json[r'country'] = null;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
2023-01-09 21:08:45 -07:00
|
|
|
return json;
|
2022-07-13 05:23:48 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Returns a new [ExifResponseDto] instance and imports its values from
|
|
|
|
/// [value] if it's a [Map], null otherwise.
|
|
|
|
// ignore: prefer_constructors_over_static_methods
|
|
|
|
static ExifResponseDto? fromJson(dynamic value) {
|
|
|
|
if (value is Map) {
|
|
|
|
final json = value.cast<String, dynamic>();
|
|
|
|
|
|
|
|
// Ensure that the map contains the required keys.
|
|
|
|
// Note 1: the values aren't checked for validity beyond being non-null.
|
|
|
|
// Note 2: this code is stripped in release mode!
|
|
|
|
assert(() {
|
|
|
|
requiredKeys.forEach((key) {
|
|
|
|
assert(json.containsKey(key), 'Required key "ExifResponseDto[$key]" is missing from JSON.');
|
|
|
|
assert(json[key] != null, 'Required key "ExifResponseDto[$key]" has a null value in JSON.');
|
|
|
|
});
|
|
|
|
return true;
|
|
|
|
}());
|
|
|
|
|
|
|
|
return ExifResponseDto(
|
2022-10-06 09:25:54 -07:00
|
|
|
id: mapValueOfType<int>(json, r'id'),
|
|
|
|
fileSizeInByte: mapValueOfType<int>(json, r'fileSizeInByte'),
|
2022-07-13 05:23:48 -07:00
|
|
|
make: mapValueOfType<String>(json, r'make'),
|
|
|
|
model: mapValueOfType<String>(json, r'model'),
|
|
|
|
imageName: mapValueOfType<String>(json, r'imageName'),
|
|
|
|
exifImageWidth: json[r'exifImageWidth'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'exifImageWidth'].toString()),
|
|
|
|
exifImageHeight: json[r'exifImageHeight'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'exifImageHeight'].toString()),
|
|
|
|
orientation: mapValueOfType<String>(json, r'orientation'),
|
|
|
|
dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', ''),
|
|
|
|
modifyDate: mapDateTime(json, r'modifyDate', ''),
|
|
|
|
lensModel: mapValueOfType<String>(json, r'lensModel'),
|
|
|
|
fNumber: json[r'fNumber'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'fNumber'].toString()),
|
|
|
|
focalLength: json[r'focalLength'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'focalLength'].toString()),
|
|
|
|
iso: json[r'iso'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'iso'].toString()),
|
|
|
|
exposureTime: json[r'exposureTime'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'exposureTime'].toString()),
|
|
|
|
latitude: json[r'latitude'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'latitude'].toString()),
|
|
|
|
longitude: json[r'longitude'] == null
|
|
|
|
? null
|
|
|
|
: num.parse(json[r'longitude'].toString()),
|
|
|
|
city: mapValueOfType<String>(json, r'city'),
|
|
|
|
state: mapValueOfType<String>(json, r'state'),
|
|
|
|
country: mapValueOfType<String>(json, r'country'),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
static List<ExifResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
|
|
|
|
final result = <ExifResponseDto>[];
|
|
|
|
if (json is List && json.isNotEmpty) {
|
|
|
|
for (final row in json) {
|
|
|
|
final value = ExifResponseDto.fromJson(row);
|
|
|
|
if (value != null) {
|
|
|
|
result.add(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result.toList(growable: growable);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Map<String, ExifResponseDto> mapFromJson(dynamic json) {
|
|
|
|
final map = <String, ExifResponseDto>{};
|
|
|
|
if (json is Map && json.isNotEmpty) {
|
|
|
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
|
|
for (final entry in json.entries) {
|
|
|
|
final value = ExifResponseDto.fromJson(entry.value);
|
|
|
|
if (value != null) {
|
|
|
|
map[entry.key] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
// maps a json object with a list of ExifResponseDto-objects as value to a dart map
|
|
|
|
static Map<String, List<ExifResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
|
|
|
final map = <String, List<ExifResponseDto>>{};
|
|
|
|
if (json is Map && json.isNotEmpty) {
|
|
|
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
|
|
for (final entry in json.entries) {
|
|
|
|
final value = ExifResponseDto.listFromJson(entry.value, growable: growable,);
|
|
|
|
if (value != null) {
|
|
|
|
map[entry.key] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// The list of required keys that must be present in a JSON.
|
|
|
|
static const requiredKeys = <String>{
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|