update openapi models

This commit is contained in:
shenlong-tanwen 2025-05-17 12:20:33 +05:30
parent 6e0dbf657d
commit aa8a8b4513
51 changed files with 1098 additions and 847 deletions

View File

@ -17,6 +17,7 @@ import 'dart:io';
import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart';
import 'package:immich_mobile/utils/openapi_patching.dart';
import 'package:immich_mobile/utils/option.dart';
import 'package:http/http.dart';
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';

View File

@ -13,17 +13,17 @@ part of openapi.api;
class ActivityResponseDto {
/// Returns a new [ActivityResponseDto] instance.
ActivityResponseDto({
required this.assetId,
this.comment,
this.assetId = const None(),
this.comment = const None(),
required this.createdAt,
required this.id,
required this.type,
required this.user,
});
String? assetId;
Option<String> assetId;
String? comment;
Option<String> comment;
DateTime createdAt;
@ -45,8 +45,8 @@ class ActivityResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId == null ? 0 : assetId!.hashCode) +
(comment == null ? 0 : comment!.hashCode) +
(assetId.hashCode) +
(comment.hashCode) +
(createdAt.hashCode) +
(id.hashCode) +
(type.hashCode) +
@ -57,15 +57,19 @@ class ActivityResponseDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.assetId != null) {
if (this.assetId.unwrapOrNull() != null) {
json[r'assetId'] = this.assetId;
} else {
// json[r'assetId'] = null;
if(this.assetId.isSome) {
json[r'assetId'] = null;
}
}
if (this.comment != null) {
if (this.comment.unwrapOrNull() != null) {
json[r'comment'] = this.comment;
} else {
// json[r'comment'] = null;
if(this.comment.isSome) {
json[r'comment'] = null;
}
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'id'] = this.id;
@ -83,9 +87,9 @@ class ActivityResponseDto {
final json = value.cast<String, dynamic>();
return ActivityResponseDto(
assetId: mapValueOfType<String>(json, r'assetId'),
comment: mapValueOfType<String>(json, r'comment'),
createdAt: mapDateTime(json, r'createdAt', r'')!,
assetId: Option.from(mapValueOfType<String>(json, r'assetId')),
comment: Option.from(mapValueOfType<String>(json, r'comment')),
createdAt: mapDateTime(json, r'createdAt', r'')!,
id: mapValueOfType<String>(json, r'id')!,
type: ReactionType.fromJson(json[r'type'])!,
user: UserResponseDto.fromJson(json[r'user'])!,

View File

@ -14,7 +14,7 @@ class AlbumResponseDto {
/// Returns a new [AlbumResponseDto] instance.
AlbumResponseDto({
required this.albumName,
required this.albumThumbnailAssetId,
this.albumThumbnailAssetId = const None(),
this.albumUsers = const [],
required this.assetCount,
this.assets = const [],
@ -35,7 +35,7 @@ class AlbumResponseDto {
String albumName;
String? albumThumbnailAssetId;
Option<String> albumThumbnailAssetId;
List<AlbumUserResponseDto> albumUsers;
@ -118,7 +118,7 @@ class AlbumResponseDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(albumName.hashCode) +
(albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) +
(albumThumbnailAssetId.hashCode) +
(albumUsers.hashCode) +
(assetCount.hashCode) +
(assets.hashCode) +
@ -142,10 +142,12 @@ class AlbumResponseDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'albumName'] = this.albumName;
if (this.albumThumbnailAssetId != null) {
if (this.albumThumbnailAssetId.unwrapOrNull() != null) {
json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId;
} else {
// json[r'albumThumbnailAssetId'] = null;
if(this.albumThumbnailAssetId.isSome) {
json[r'albumThumbnailAssetId'] = null;
}
}
json[r'albumUsers'] = this.albumUsers;
json[r'assetCount'] = this.assetCount;
@ -192,23 +194,23 @@ class AlbumResponseDto {
return AlbumResponseDto(
albumName: mapValueOfType<String>(json, r'albumName')!,
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
albumThumbnailAssetId: Option.from(mapValueOfType<String>(json, r'albumThumbnailAssetId')),
albumUsers: AlbumUserResponseDto.listFromJson(json[r'albumUsers']),
assetCount: mapValueOfType<int>(json, r'assetCount')!,
assets: AssetResponseDto.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', r'')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
description: mapValueOfType<String>(json, r'description')!,
endDate: mapDateTime(json, r'endDate', r''),
endDate: mapDateTime(json, r'endDate', r''),
hasSharedLink: mapValueOfType<bool>(json, r'hasSharedLink')!,
id: mapValueOfType<String>(json, r'id')!,
isActivityEnabled: mapValueOfType<bool>(json, r'isActivityEnabled')!,
lastModifiedAssetTimestamp: mapDateTime(json, r'lastModifiedAssetTimestamp', r''),
lastModifiedAssetTimestamp: mapDateTime(json, r'lastModifiedAssetTimestamp', r''),
order: AssetOrder.fromJson(json[r'order']),
owner: UserResponseDto.fromJson(json[r'owner'])!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
shared: mapValueOfType<bool>(json, r'shared')!,
startDate: mapDateTime(json, r'startDate', r''),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
startDate: mapDateTime(json, r'startDate', r''),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;

View File

@ -69,11 +69,11 @@ class APIKeyResponseDto {
final json = value.cast<String, dynamic>();
return APIKeyResponseDto(
createdAt: mapDateTime(json, r'createdAt', r'')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
permissions: Permission.listFromJson(json[r'permissions']),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;

View File

@ -14,7 +14,7 @@ class AssetBulkUpdateDto {
/// Returns a new [AssetBulkUpdateDto] instance.
AssetBulkUpdateDto({
this.dateTimeOriginal,
this.duplicateId,
this.duplicateId = const None(),
this.ids = const [],
this.isFavorite,
this.latitude,
@ -31,7 +31,7 @@ class AssetBulkUpdateDto {
///
String? dateTimeOriginal;
String? duplicateId;
Option<String> duplicateId;
List<String> ids;
@ -92,7 +92,7 @@ class AssetBulkUpdateDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) +
(duplicateId == null ? 0 : duplicateId!.hashCode) +
(duplicateId.hashCode) +
(ids.hashCode) +
(isFavorite == null ? 0 : isFavorite!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
@ -110,10 +110,12 @@ class AssetBulkUpdateDto {
} else {
// json[r'dateTimeOriginal'] = null;
}
if (this.duplicateId != null) {
if (this.duplicateId.unwrapOrNull() != null) {
json[r'duplicateId'] = this.duplicateId;
} else {
// json[r'duplicateId'] = null;
if(this.duplicateId.isSome) {
json[r'duplicateId'] = null;
}
}
json[r'ids'] = this.ids;
if (this.isFavorite != null) {
@ -154,7 +156,7 @@ class AssetBulkUpdateDto {
return AssetBulkUpdateDto(
dateTimeOriginal: mapValueOfType<String>(json, r'dateTimeOriginal'),
duplicateId: mapValueOfType<String>(json, r'duplicateId'),
duplicateId: Option.from(mapValueOfType<String>(json, r'duplicateId')),
ids: json[r'ids'] is Iterable
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
: const [],

View File

@ -51,7 +51,7 @@ class AssetDeltaSyncDto {
final json = value.cast<String, dynamic>();
return AssetDeltaSyncDto(
updatedAfter: mapDateTime(json, r'updatedAfter', r'')!,
updatedAfter: mapDateTime(json, r'updatedAfter', r'')!,
userIds: json[r'userIds'] is Iterable
? (json[r'userIds'] as Iterable).cast<String>().toList(growable: false)
: const [],

View File

@ -20,7 +20,7 @@ class AssetFaceResponseDto {
required this.id,
required this.imageHeight,
required this.imageWidth,
required this.person,
this.person = const None(),
this.sourceType,
});
@ -38,7 +38,7 @@ class AssetFaceResponseDto {
int imageWidth;
PersonResponseDto? person;
Option<PersonResponseDto> person;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -70,7 +70,7 @@ class AssetFaceResponseDto {
(id.hashCode) +
(imageHeight.hashCode) +
(imageWidth.hashCode) +
(person == null ? 0 : person!.hashCode) +
(person.hashCode) +
(sourceType == null ? 0 : sourceType!.hashCode);
@override
@ -85,10 +85,12 @@ class AssetFaceResponseDto {
json[r'id'] = this.id;
json[r'imageHeight'] = this.imageHeight;
json[r'imageWidth'] = this.imageWidth;
if (this.person != null) {
if (this.person.unwrapOrNull() != null) {
json[r'person'] = this.person;
} else {
// json[r'person'] = null;
if(this.person.isSome) {
json[r'person'] = null;
}
}
if (this.sourceType != null) {
json[r'sourceType'] = this.sourceType;
@ -114,7 +116,7 @@ class AssetFaceResponseDto {
id: mapValueOfType<String>(json, r'id')!,
imageHeight: mapValueOfType<int>(json, r'imageHeight')!,
imageWidth: mapValueOfType<int>(json, r'imageWidth')!,
person: PersonResponseDto.fromJson(json[r'person']),
person: Option.from(PersonResponseDto.fromJson(json[r'person'])),
sourceType: SourceType.fromJson(json[r'sourceType']),
);
}

View File

@ -86,7 +86,7 @@ class AssetFullSyncDto {
return AssetFullSyncDto(
lastId: mapValueOfType<String>(json, r'lastId'),
limit: mapValueOfType<int>(json, r'limit')!,
updatedUntil: mapDateTime(json, r'updatedUntil', r'')!,
updatedUntil: mapDateTime(json, r'updatedUntil', r'')!,
userId: mapValueOfType<String>(json, r'userId'),
);
}

View File

@ -16,7 +16,7 @@ class AssetResponseDto {
required this.checksum,
required this.deviceAssetId,
required this.deviceId,
this.duplicateId,
this.duplicateId = const None(),
required this.duration,
this.exifInfo,
required this.fileCreatedAt,
@ -27,8 +27,8 @@ class AssetResponseDto {
required this.isFavorite,
required this.isOffline,
required this.isTrashed,
this.libraryId,
this.livePhotoVideoId,
this.libraryId = const None(),
this.livePhotoVideoId = const None(),
required this.localDateTime,
required this.originalFileName,
this.originalMimeType,
@ -37,9 +37,9 @@ class AssetResponseDto {
required this.ownerId,
this.people = const [],
this.resized,
this.stack,
this.stack = const None(),
this.tags = const [],
required this.thumbhash,
this.thumbhash = const None(),
required this.type,
this.unassignedFaces = const [],
required this.updatedAt,
@ -53,7 +53,7 @@ class AssetResponseDto {
String deviceId;
String? duplicateId;
Option<String> duplicateId;
String duration;
@ -82,9 +82,9 @@ class AssetResponseDto {
bool isTrashed;
/// This property was deprecated in v1.106.0
String? libraryId;
Option<String> libraryId;
String? livePhotoVideoId;
Option<String> livePhotoVideoId;
DateTime localDateTime;
@ -121,11 +121,11 @@ class AssetResponseDto {
///
bool? resized;
AssetStackResponseDto? stack;
Option<AssetStackResponseDto> stack;
List<TagResponseDto> tags;
String? thumbhash;
Option<String> thumbhash;
AssetTypeEnum type;
@ -175,7 +175,7 @@ class AssetResponseDto {
(checksum.hashCode) +
(deviceAssetId.hashCode) +
(deviceId.hashCode) +
(duplicateId == null ? 0 : duplicateId!.hashCode) +
(duplicateId.hashCode) +
(duration.hashCode) +
(exifInfo == null ? 0 : exifInfo!.hashCode) +
(fileCreatedAt.hashCode) +
@ -186,8 +186,8 @@ class AssetResponseDto {
(isFavorite.hashCode) +
(isOffline.hashCode) +
(isTrashed.hashCode) +
(libraryId == null ? 0 : libraryId!.hashCode) +
(livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) +
(libraryId.hashCode) +
(livePhotoVideoId.hashCode) +
(localDateTime.hashCode) +
(originalFileName.hashCode) +
(originalMimeType == null ? 0 : originalMimeType!.hashCode) +
@ -196,9 +196,9 @@ class AssetResponseDto {
(ownerId.hashCode) +
(people.hashCode) +
(resized == null ? 0 : resized!.hashCode) +
(stack == null ? 0 : stack!.hashCode) +
(stack.hashCode) +
(tags.hashCode) +
(thumbhash == null ? 0 : thumbhash!.hashCode) +
(thumbhash.hashCode) +
(type.hashCode) +
(unassignedFaces.hashCode) +
(updatedAt.hashCode) +
@ -212,10 +212,12 @@ class AssetResponseDto {
json[r'checksum'] = this.checksum;
json[r'deviceAssetId'] = this.deviceAssetId;
json[r'deviceId'] = this.deviceId;
if (this.duplicateId != null) {
if (this.duplicateId.unwrapOrNull() != null) {
json[r'duplicateId'] = this.duplicateId;
} else {
// json[r'duplicateId'] = null;
if(this.duplicateId.isSome) {
json[r'duplicateId'] = null;
}
}
json[r'duration'] = this.duration;
if (this.exifInfo != null) {
@ -231,15 +233,19 @@ class AssetResponseDto {
json[r'isFavorite'] = this.isFavorite;
json[r'isOffline'] = this.isOffline;
json[r'isTrashed'] = this.isTrashed;
if (this.libraryId != null) {
if (this.libraryId.unwrapOrNull() != null) {
json[r'libraryId'] = this.libraryId;
} else {
// json[r'libraryId'] = null;
if(this.libraryId.isSome) {
json[r'libraryId'] = null;
}
}
if (this.livePhotoVideoId != null) {
if (this.livePhotoVideoId.unwrapOrNull() != null) {
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
} else {
// json[r'livePhotoVideoId'] = null;
if(this.livePhotoVideoId.isSome) {
json[r'livePhotoVideoId'] = null;
}
}
json[r'localDateTime'] = this.localDateTime.toUtc().toIso8601String();
json[r'originalFileName'] = this.originalFileName;
@ -261,16 +267,20 @@ class AssetResponseDto {
} else {
// json[r'resized'] = null;
}
if (this.stack != null) {
if (this.stack.unwrapOrNull() != null) {
json[r'stack'] = this.stack;
} else {
// json[r'stack'] = null;
if(this.stack.isSome) {
json[r'stack'] = null;
}
}
json[r'tags'] = this.tags;
if (this.thumbhash != null) {
if (this.thumbhash.unwrapOrNull() != null) {
json[r'thumbhash'] = this.thumbhash;
} else {
// json[r'thumbhash'] = null;
if(this.thumbhash.isSome) {
json[r'thumbhash'] = null;
}
}
json[r'type'] = this.type;
json[r'unassignedFaces'] = this.unassignedFaces;
@ -291,20 +301,20 @@ class AssetResponseDto {
checksum: mapValueOfType<String>(json, r'checksum')!,
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
duplicateId: mapValueOfType<String>(json, r'duplicateId'),
duplicateId: Option.from(mapValueOfType<String>(json, r'duplicateId')),
duration: mapValueOfType<String>(json, r'duration')!,
exifInfo: ExifResponseDto.fromJson(json[r'exifInfo']),
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!,
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!,
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!,
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!,
hasMetadata: mapValueOfType<bool>(json, r'hasMetadata')!,
id: mapValueOfType<String>(json, r'id')!,
isArchived: mapValueOfType<bool>(json, r'isArchived')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
isOffline: mapValueOfType<bool>(json, r'isOffline')!,
isTrashed: mapValueOfType<bool>(json, r'isTrashed')!,
libraryId: mapValueOfType<String>(json, r'libraryId'),
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),
localDateTime: mapDateTime(json, r'localDateTime', r'')!,
libraryId: Option.from(mapValueOfType<String>(json, r'libraryId')),
livePhotoVideoId: Option.from(mapValueOfType<String>(json, r'livePhotoVideoId')),
localDateTime: mapDateTime(json, r'localDateTime', r'')!,
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
originalMimeType: mapValueOfType<String>(json, r'originalMimeType'),
originalPath: mapValueOfType<String>(json, r'originalPath')!,
@ -312,12 +322,12 @@ class AssetResponseDto {
ownerId: mapValueOfType<String>(json, r'ownerId')!,
people: PersonWithFacesResponseDto.listFromJson(json[r'people']),
resized: mapValueOfType<bool>(json, r'resized'),
stack: AssetStackResponseDto.fromJson(json[r'stack']),
stack: Option.from(AssetStackResponseDto.fromJson(json[r'stack'])),
tags: TagResponseDto.listFromJson(json[r'tags']),
thumbhash: mapValueOfType<String>(json, r'thumbhash'),
thumbhash: Option.from(mapValueOfType<String>(json, r'thumbhash')),
type: AssetTypeEnum.fromJson(json[r'type'])!,
unassignedFaces: AssetFaceWithoutPersonResponseDto.listFromJson(json[r'unassignedFaces']),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
visibility: AssetResponseDtoVisibilityEnum.fromJson(json[r'visibility'])!,
);
}

View File

@ -57,7 +57,7 @@ class CreateProfileImageResponseDto {
final json = value.cast<String, dynamic>();
return CreateProfileImageResponseDto(
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
userId: mapValueOfType<String>(json, r'userId')!,
);

View File

@ -13,73 +13,73 @@ part of openapi.api;
class ExifResponseDto {
/// Returns a new [ExifResponseDto] instance.
ExifResponseDto({
this.city,
this.country,
this.dateTimeOriginal,
this.description,
this.exifImageHeight,
this.exifImageWidth,
this.exposureTime,
this.fNumber,
this.fileSizeInByte,
this.focalLength,
this.iso,
this.latitude,
this.lensModel,
this.longitude,
this.make,
this.model,
this.modifyDate,
this.orientation,
this.projectionType,
this.rating,
this.state,
this.timeZone,
this.city = const None(),
this.country = const None(),
this.dateTimeOriginal = const None(),
this.description = const None(),
this.exifImageHeight = const None(),
this.exifImageWidth = const None(),
this.exposureTime = const None(),
this.fNumber = const None(),
this.fileSizeInByte = const None(),
this.focalLength = const None(),
this.iso = const None(),
this.latitude = const None(),
this.lensModel = const None(),
this.longitude = const None(),
this.make = const None(),
this.model = const None(),
this.modifyDate = const None(),
this.orientation = const None(),
this.projectionType = const None(),
this.rating = const None(),
this.state = const None(),
this.timeZone = const None(),
});
String? city;
Option<String> city;
String? country;
Option<String> country;
DateTime? dateTimeOriginal;
Option<DateTime> dateTimeOriginal;
String? description;
Option<String> description;
num? exifImageHeight;
Option<num> exifImageHeight;
num? exifImageWidth;
Option<num> exifImageWidth;
String? exposureTime;
Option<String> exposureTime;
num? fNumber;
Option<num> fNumber;
int? fileSizeInByte;
Option<int> fileSizeInByte;
num? focalLength;
Option<num> focalLength;
num? iso;
Option<num> iso;
num? latitude;
Option<num> latitude;
String? lensModel;
Option<String> lensModel;
num? longitude;
Option<num> longitude;
String? make;
Option<String> make;
String? model;
Option<String> model;
DateTime? modifyDate;
Option<DateTime> modifyDate;
String? orientation;
Option<String> orientation;
String? projectionType;
Option<String> projectionType;
num? rating;
Option<num> rating;
String? state;
Option<String> state;
String? timeZone;
Option<String> timeZone;
@override
bool operator ==(Object other) => identical(this, other) || other is ExifResponseDto &&
@ -109,143 +109,187 @@ class ExifResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(city == null ? 0 : city!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(exifImageHeight == null ? 0 : exifImageHeight!.hashCode) +
(exifImageWidth == null ? 0 : exifImageWidth!.hashCode) +
(exposureTime == null ? 0 : exposureTime!.hashCode) +
(fNumber == null ? 0 : fNumber!.hashCode) +
(fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) +
(focalLength == null ? 0 : focalLength!.hashCode) +
(iso == null ? 0 : iso!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(lensModel == null ? 0 : lensModel!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(modifyDate == null ? 0 : modifyDate!.hashCode) +
(orientation == null ? 0 : orientation!.hashCode) +
(projectionType == null ? 0 : projectionType!.hashCode) +
(rating == null ? 0 : rating!.hashCode) +
(state == null ? 0 : state!.hashCode) +
(timeZone == null ? 0 : timeZone!.hashCode);
(city.hashCode) +
(country.hashCode) +
(dateTimeOriginal.hashCode) +
(description.hashCode) +
(exifImageHeight.hashCode) +
(exifImageWidth.hashCode) +
(exposureTime.hashCode) +
(fNumber.hashCode) +
(fileSizeInByte.hashCode) +
(focalLength.hashCode) +
(iso.hashCode) +
(latitude.hashCode) +
(lensModel.hashCode) +
(longitude.hashCode) +
(make.hashCode) +
(model.hashCode) +
(modifyDate.hashCode) +
(orientation.hashCode) +
(projectionType.hashCode) +
(rating.hashCode) +
(state.hashCode) +
(timeZone.hashCode);
@override
String toString() => 'ExifResponseDto[city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.city != null) {
if (this.city.unwrapOrNull() != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
if(this.city.isSome) {
json[r'city'] = null;
}
}
if (this.country != null) {
if (this.country.unwrapOrNull() != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
if(this.country.isSome) {
json[r'country'] = null;
}
}
if (this.dateTimeOriginal != null) {
json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String();
if (this.dateTimeOriginal.unwrapOrNull() != null) {
json[r'dateTimeOriginal'] = this.dateTimeOriginal.unwrap().toUtc().toIso8601String();
} else {
// json[r'dateTimeOriginal'] = null;
if(this.dateTimeOriginal.isSome) {
json[r'dateTimeOriginal'] = null;
}
}
if (this.description != null) {
if (this.description.unwrapOrNull() != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
if(this.description.isSome) {
json[r'description'] = null;
}
}
if (this.exifImageHeight != null) {
if (this.exifImageHeight.unwrapOrNull() != null) {
json[r'exifImageHeight'] = this.exifImageHeight;
} else {
// json[r'exifImageHeight'] = null;
if(this.exifImageHeight.isSome) {
json[r'exifImageHeight'] = null;
}
}
if (this.exifImageWidth != null) {
if (this.exifImageWidth.unwrapOrNull() != null) {
json[r'exifImageWidth'] = this.exifImageWidth;
} else {
// json[r'exifImageWidth'] = null;
if(this.exifImageWidth.isSome) {
json[r'exifImageWidth'] = null;
}
}
if (this.exposureTime != null) {
if (this.exposureTime.unwrapOrNull() != null) {
json[r'exposureTime'] = this.exposureTime;
} else {
// json[r'exposureTime'] = null;
if(this.exposureTime.isSome) {
json[r'exposureTime'] = null;
}
}
if (this.fNumber != null) {
if (this.fNumber.unwrapOrNull() != null) {
json[r'fNumber'] = this.fNumber;
} else {
// json[r'fNumber'] = null;
if(this.fNumber.isSome) {
json[r'fNumber'] = null;
}
}
if (this.fileSizeInByte != null) {
if (this.fileSizeInByte.unwrapOrNull() != null) {
json[r'fileSizeInByte'] = this.fileSizeInByte;
} else {
// json[r'fileSizeInByte'] = null;
if(this.fileSizeInByte.isSome) {
json[r'fileSizeInByte'] = null;
}
}
if (this.focalLength != null) {
if (this.focalLength.unwrapOrNull() != null) {
json[r'focalLength'] = this.focalLength;
} else {
// json[r'focalLength'] = null;
if(this.focalLength.isSome) {
json[r'focalLength'] = null;
}
}
if (this.iso != null) {
if (this.iso.unwrapOrNull() != null) {
json[r'iso'] = this.iso;
} else {
// json[r'iso'] = null;
if(this.iso.isSome) {
json[r'iso'] = null;
}
}
if (this.latitude != null) {
if (this.latitude.unwrapOrNull() != null) {
json[r'latitude'] = this.latitude;
} else {
// json[r'latitude'] = null;
if(this.latitude.isSome) {
json[r'latitude'] = null;
}
}
if (this.lensModel != null) {
if (this.lensModel.unwrapOrNull() != null) {
json[r'lensModel'] = this.lensModel;
} else {
// json[r'lensModel'] = null;
if(this.lensModel.isSome) {
json[r'lensModel'] = null;
}
}
if (this.longitude != null) {
if (this.longitude.unwrapOrNull() != null) {
json[r'longitude'] = this.longitude;
} else {
// json[r'longitude'] = null;
if(this.longitude.isSome) {
json[r'longitude'] = null;
}
}
if (this.make != null) {
if (this.make.unwrapOrNull() != null) {
json[r'make'] = this.make;
} else {
// json[r'make'] = null;
if(this.make.isSome) {
json[r'make'] = null;
}
}
if (this.model != null) {
if (this.model.unwrapOrNull() != null) {
json[r'model'] = this.model;
} else {
// json[r'model'] = null;
if(this.model.isSome) {
json[r'model'] = null;
}
}
if (this.modifyDate != null) {
json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String();
if (this.modifyDate.unwrapOrNull() != null) {
json[r'modifyDate'] = this.modifyDate.unwrap().toUtc().toIso8601String();
} else {
// json[r'modifyDate'] = null;
if(this.modifyDate.isSome) {
json[r'modifyDate'] = null;
}
}
if (this.orientation != null) {
if (this.orientation.unwrapOrNull() != null) {
json[r'orientation'] = this.orientation;
} else {
// json[r'orientation'] = null;
if(this.orientation.isSome) {
json[r'orientation'] = null;
}
}
if (this.projectionType != null) {
if (this.projectionType.unwrapOrNull() != null) {
json[r'projectionType'] = this.projectionType;
} else {
// json[r'projectionType'] = null;
if(this.projectionType.isSome) {
json[r'projectionType'] = null;
}
}
if (this.rating != null) {
if (this.rating.unwrapOrNull() != null) {
json[r'rating'] = this.rating;
} else {
// json[r'rating'] = null;
if(this.rating.isSome) {
json[r'rating'] = null;
}
}
if (this.state != null) {
if (this.state.unwrapOrNull() != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
if(this.state.isSome) {
json[r'state'] = null;
}
}
if (this.timeZone != null) {
if (this.timeZone.unwrapOrNull() != null) {
json[r'timeZone'] = this.timeZone;
} else {
// json[r'timeZone'] = null;
if(this.timeZone.isSome) {
json[r'timeZone'] = null;
}
}
return json;
}
@ -259,44 +303,44 @@ class ExifResponseDto {
final json = value.cast<String, dynamic>();
return ExifResponseDto(
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', r''),
description: mapValueOfType<String>(json, r'description'),
exifImageHeight: json[r'exifImageHeight'] == null
city: Option.from(mapValueOfType<String>(json, r'city')),
country: Option.from(mapValueOfType<String>(json, r'country')),
dateTimeOriginal: Option.from(mapDateTime(json, r'dateTimeOriginal', r'')),
description: Option.from(mapValueOfType<String>(json, r'description')),
exifImageHeight: Option.from(json[r'exifImageHeight'] == null
? null
: num.parse('${json[r'exifImageHeight']}'),
exifImageWidth: json[r'exifImageWidth'] == null
: num.parse('${json[r'exifImageHeight']}')),
exifImageWidth: Option.from(json[r'exifImageWidth'] == null
? null
: num.parse('${json[r'exifImageWidth']}'),
exposureTime: mapValueOfType<String>(json, r'exposureTime'),
fNumber: json[r'fNumber'] == null
: num.parse('${json[r'exifImageWidth']}')),
exposureTime: Option.from(mapValueOfType<String>(json, r'exposureTime')),
fNumber: Option.from(json[r'fNumber'] == null
? null
: num.parse('${json[r'fNumber']}'),
fileSizeInByte: mapValueOfType<int>(json, r'fileSizeInByte'),
focalLength: json[r'focalLength'] == null
: num.parse('${json[r'fNumber']}')),
fileSizeInByte: Option.from(mapValueOfType<int>(json, r'fileSizeInByte')),
focalLength: Option.from(json[r'focalLength'] == null
? null
: num.parse('${json[r'focalLength']}'),
iso: json[r'iso'] == null
: num.parse('${json[r'focalLength']}')),
iso: Option.from(json[r'iso'] == null
? null
: num.parse('${json[r'iso']}'),
latitude: json[r'latitude'] == null
: num.parse('${json[r'iso']}')),
latitude: Option.from(json[r'latitude'] == null
? null
: num.parse('${json[r'latitude']}'),
lensModel: mapValueOfType<String>(json, r'lensModel'),
longitude: json[r'longitude'] == null
: num.parse('${json[r'latitude']}')),
lensModel: Option.from(mapValueOfType<String>(json, r'lensModel')),
longitude: Option.from(json[r'longitude'] == null
? null
: num.parse('${json[r'longitude']}'),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
modifyDate: mapDateTime(json, r'modifyDate', r''),
orientation: mapValueOfType<String>(json, r'orientation'),
projectionType: mapValueOfType<String>(json, r'projectionType'),
rating: json[r'rating'] == null
: num.parse('${json[r'longitude']}')),
make: Option.from(mapValueOfType<String>(json, r'make')),
model: Option.from(mapValueOfType<String>(json, r'model')),
modifyDate: Option.from(mapDateTime(json, r'modifyDate', r'')),
orientation: Option.from(mapValueOfType<String>(json, r'orientation')),
projectionType: Option.from(mapValueOfType<String>(json, r'projectionType')),
rating: Option.from(json[r'rating'] == null
? null
: num.parse('${json[r'rating']}'),
state: mapValueOfType<String>(json, r'state'),
timeZone: mapValueOfType<String>(json, r'timeZone'),
: num.parse('${json[r'rating']}')),
state: Option.from(mapValueOfType<String>(json, r'state')),
timeZone: Option.from(mapValueOfType<String>(json, r'timeZone')),
);
}
return null;

View File

@ -20,7 +20,7 @@ class LibraryResponseDto {
this.importPaths = const [],
required this.name,
required this.ownerId,
required this.refreshedAt,
this.refreshedAt = const None(),
required this.updatedAt,
});
@ -38,7 +38,7 @@ class LibraryResponseDto {
String ownerId;
DateTime? refreshedAt;
Option<DateTime> refreshedAt;
DateTime updatedAt;
@ -64,7 +64,7 @@ class LibraryResponseDto {
(importPaths.hashCode) +
(name.hashCode) +
(ownerId.hashCode) +
(refreshedAt == null ? 0 : refreshedAt!.hashCode) +
(refreshedAt.hashCode) +
(updatedAt.hashCode);
@override
@ -79,10 +79,12 @@ class LibraryResponseDto {
json[r'importPaths'] = this.importPaths;
json[r'name'] = this.name;
json[r'ownerId'] = this.ownerId;
if (this.refreshedAt != null) {
json[r'refreshedAt'] = this.refreshedAt!.toUtc().toIso8601String();
if (this.refreshedAt.unwrapOrNull() != null) {
json[r'refreshedAt'] = this.refreshedAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'refreshedAt'] = null;
if(this.refreshedAt.isSome) {
json[r'refreshedAt'] = null;
}
}
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
@ -98,7 +100,7 @@ class LibraryResponseDto {
return LibraryResponseDto(
assetCount: mapValueOfType<int>(json, r'assetCount')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
exclusionPatterns: json[r'exclusionPatterns'] is Iterable
? (json[r'exclusionPatterns'] as Iterable).cast<String>().toList(growable: false)
: const [],
@ -108,8 +110,8 @@ class LibraryResponseDto {
: const [],
name: mapValueOfType<String>(json, r'name')!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
refreshedAt: mapDateTime(json, r'refreshedAt', r''),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
refreshedAt: Option.from(mapDateTime(json, r'refreshedAt', r'')),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;

View File

@ -57,7 +57,7 @@ class LicenseResponseDto {
final json = value.cast<String, dynamic>();
return LicenseResponseDto(
activatedAt: mapDateTime(json, r'activatedAt', r'')!,
activatedAt: mapDateTime(json, r'activatedAt', r'')!,
activationKey: mapValueOfType<String>(json, r'activationKey')!,
licenseKey: mapValueOfType<String>(json, r'licenseKey')!,
);

View File

@ -13,17 +13,17 @@ part of openapi.api;
class MapMarkerResponseDto {
/// Returns a new [MapMarkerResponseDto] instance.
MapMarkerResponseDto({
required this.city,
required this.country,
this.city = const None(),
this.country = const None(),
required this.id,
required this.lat,
required this.lon,
required this.state,
this.state = const None(),
});
String? city;
Option<String> city;
String? country;
Option<String> country;
String id;
@ -31,7 +31,7 @@ class MapMarkerResponseDto {
double lon;
String? state;
Option<String> state;
@override
bool operator ==(Object other) => identical(this, other) || other is MapMarkerResponseDto &&
@ -45,35 +45,41 @@ class MapMarkerResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(city == null ? 0 : city!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(city.hashCode) +
(country.hashCode) +
(id.hashCode) +
(lat.hashCode) +
(lon.hashCode) +
(state == null ? 0 : state!.hashCode);
(state.hashCode);
@override
String toString() => 'MapMarkerResponseDto[city=$city, country=$country, id=$id, lat=$lat, lon=$lon, state=$state]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.city != null) {
if (this.city.unwrapOrNull() != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
if(this.city.isSome) {
json[r'city'] = null;
}
}
if (this.country != null) {
if (this.country.unwrapOrNull() != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
if(this.country.isSome) {
json[r'country'] = null;
}
}
json[r'id'] = this.id;
json[r'lat'] = this.lat;
json[r'lon'] = this.lon;
if (this.state != null) {
if (this.state.unwrapOrNull() != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
if(this.state.isSome) {
json[r'state'] = null;
}
}
return json;
}
@ -87,12 +93,12 @@ class MapMarkerResponseDto {
final json = value.cast<String, dynamic>();
return MapMarkerResponseDto(
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
city: Option.from(mapValueOfType<String>(json, r'city')),
country: Option.from(mapValueOfType<String>(json, r'country')),
id: mapValueOfType<String>(json, r'id')!,
lat: (mapValueOfType<num>(json, r'lat')!).toDouble(),
lon: (mapValueOfType<num>(json, r'lon')!).toDouble(),
state: mapValueOfType<String>(json, r'state'),
state: Option.from(mapValueOfType<String>(json, r'state')),
);
}
return null;

View File

@ -13,16 +13,16 @@ part of openapi.api;
class MapReverseGeocodeResponseDto {
/// Returns a new [MapReverseGeocodeResponseDto] instance.
MapReverseGeocodeResponseDto({
required this.city,
required this.country,
required this.state,
this.city = const None(),
this.country = const None(),
this.state = const None(),
});
String? city;
Option<String> city;
String? country;
Option<String> country;
String? state;
Option<String> state;
@override
bool operator ==(Object other) => identical(this, other) || other is MapReverseGeocodeResponseDto &&
@ -33,29 +33,35 @@ class MapReverseGeocodeResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(city == null ? 0 : city!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(state == null ? 0 : state!.hashCode);
(city.hashCode) +
(country.hashCode) +
(state.hashCode);
@override
String toString() => 'MapReverseGeocodeResponseDto[city=$city, country=$country, state=$state]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.city != null) {
if (this.city.unwrapOrNull() != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
if(this.city.isSome) {
json[r'city'] = null;
}
}
if (this.country != null) {
if (this.country.unwrapOrNull() != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
if(this.country.isSome) {
json[r'country'] = null;
}
}
if (this.state != null) {
if (this.state.unwrapOrNull() != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
if(this.state.isSome) {
json[r'state'] = null;
}
}
return json;
}
@ -69,9 +75,9 @@ class MapReverseGeocodeResponseDto {
final json = value.cast<String, dynamic>();
return MapReverseGeocodeResponseDto(
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
state: mapValueOfType<String>(json, r'state'),
city: Option.from(mapValueOfType<String>(json, r'city')),
country: Option.from(mapValueOfType<String>(json, r'country')),
state: Option.from(mapValueOfType<String>(json, r'state')),
);
}
return null;

View File

@ -100,8 +100,8 @@ class MemoryCreateDto {
: const [],
data: OnThisDayDto.fromJson(json[r'data'])!,
isSaved: mapValueOfType<bool>(json, r'isSaved'),
memoryAt: mapDateTime(json, r'memoryAt', r'')!,
seenAt: mapDateTime(json, r'seenAt', r''),
memoryAt: mapDateTime(json, r'memoryAt', r'')!,
seenAt: mapDateTime(json, r'seenAt', r''),
type: MemoryType.fromJson(json[r'type'])!,
);
}

View File

@ -158,18 +158,18 @@ class MemoryResponseDto {
return MemoryResponseDto(
assets: AssetResponseDto.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', r'')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
data: OnThisDayDto.fromJson(json[r'data'])!,
deletedAt: mapDateTime(json, r'deletedAt', r''),
hideAt: mapDateTime(json, r'hideAt', r''),
deletedAt: mapDateTime(json, r'deletedAt', r''),
hideAt: mapDateTime(json, r'hideAt', r''),
id: mapValueOfType<String>(json, r'id')!,
isSaved: mapValueOfType<bool>(json, r'isSaved')!,
memoryAt: mapDateTime(json, r'memoryAt', r'')!,
memoryAt: mapDateTime(json, r'memoryAt', r'')!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
seenAt: mapDateTime(json, r'seenAt', r''),
showAt: mapDateTime(json, r'showAt', r''),
seenAt: mapDateTime(json, r'seenAt', r''),
showAt: mapDateTime(json, r'showAt', r''),
type: MemoryType.fromJson(json[r'type'])!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;

View File

@ -88,8 +88,8 @@ class MemoryUpdateDto {
return MemoryUpdateDto(
isSaved: mapValueOfType<bool>(json, r'isSaved'),
memoryAt: mapDateTime(json, r'memoryAt', r''),
seenAt: mapDateTime(json, r'seenAt', r''),
memoryAt: mapDateTime(json, r'memoryAt', r''),
seenAt: mapDateTime(json, r'seenAt', r''),
);
}
return null;

View File

@ -14,8 +14,8 @@ class MetadataSearchDto {
/// Returns a new [MetadataSearchDto] instance.
MetadataSearchDto({
this.checksum,
this.city,
this.country,
this.city = const None(),
this.country = const None(),
this.createdAfter,
this.createdBefore,
this.description,
@ -28,10 +28,10 @@ class MetadataSearchDto {
this.isMotion,
this.isNotInAlbum,
this.isOffline,
this.lensModel,
this.libraryId,
this.lensModel = const None(),
this.libraryId = const None(),
this.make,
this.model,
this.model = const None(),
this.order = AssetOrder.desc,
this.originalFileName,
this.originalPath,
@ -40,7 +40,7 @@ class MetadataSearchDto {
this.previewPath,
this.rating,
this.size,
this.state,
this.state = const None(),
this.tagIds = const [],
this.takenAfter,
this.takenBefore,
@ -65,9 +65,9 @@ class MetadataSearchDto {
///
String? checksum;
String? city;
Option<String> city;
String? country;
Option<String> country;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -165,9 +165,9 @@ class MetadataSearchDto {
///
bool? isOffline;
String? lensModel;
Option<String> lensModel;
String? libraryId;
Option<String> libraryId;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -177,7 +177,7 @@ class MetadataSearchDto {
///
String? make;
String? model;
Option<String> model;
AssetOrder order;
@ -236,7 +236,7 @@ class MetadataSearchDto {
///
num? size;
String? state;
Option<String> state;
List<String> tagIds;
@ -393,8 +393,8 @@ class MetadataSearchDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(checksum == null ? 0 : checksum!.hashCode) +
(city == null ? 0 : city!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(city.hashCode) +
(country.hashCode) +
(createdAfter == null ? 0 : createdAfter!.hashCode) +
(createdBefore == null ? 0 : createdBefore!.hashCode) +
(description == null ? 0 : description!.hashCode) +
@ -407,10 +407,10 @@ class MetadataSearchDto {
(isMotion == null ? 0 : isMotion!.hashCode) +
(isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) +
(isOffline == null ? 0 : isOffline!.hashCode) +
(lensModel == null ? 0 : lensModel!.hashCode) +
(libraryId == null ? 0 : libraryId!.hashCode) +
(lensModel.hashCode) +
(libraryId.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(model.hashCode) +
(order.hashCode) +
(originalFileName == null ? 0 : originalFileName!.hashCode) +
(originalPath == null ? 0 : originalPath!.hashCode) +
@ -419,7 +419,7 @@ class MetadataSearchDto {
(previewPath == null ? 0 : previewPath!.hashCode) +
(rating == null ? 0 : rating!.hashCode) +
(size == null ? 0 : size!.hashCode) +
(state == null ? 0 : state!.hashCode) +
(state.hashCode) +
(tagIds.hashCode) +
(takenAfter == null ? 0 : takenAfter!.hashCode) +
(takenBefore == null ? 0 : takenBefore!.hashCode) +
@ -445,15 +445,19 @@ class MetadataSearchDto {
} else {
// json[r'checksum'] = null;
}
if (this.city != null) {
if (this.city.unwrapOrNull() != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
if(this.city.isSome) {
json[r'city'] = null;
}
}
if (this.country != null) {
if (this.country.unwrapOrNull() != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
if(this.country.isSome) {
json[r'country'] = null;
}
}
if (this.createdAfter != null) {
json[r'createdAfter'] = this.createdAfter!.toUtc().toIso8601String();
@ -515,25 +519,31 @@ class MetadataSearchDto {
} else {
// json[r'isOffline'] = null;
}
if (this.lensModel != null) {
if (this.lensModel.unwrapOrNull() != null) {
json[r'lensModel'] = this.lensModel;
} else {
// json[r'lensModel'] = null;
if(this.lensModel.isSome) {
json[r'lensModel'] = null;
}
}
if (this.libraryId != null) {
if (this.libraryId.unwrapOrNull() != null) {
json[r'libraryId'] = this.libraryId;
} else {
// json[r'libraryId'] = null;
if(this.libraryId.isSome) {
json[r'libraryId'] = null;
}
}
if (this.make != null) {
json[r'make'] = this.make;
} else {
// json[r'make'] = null;
}
if (this.model != null) {
if (this.model.unwrapOrNull() != null) {
json[r'model'] = this.model;
} else {
// json[r'model'] = null;
if(this.model.isSome) {
json[r'model'] = null;
}
}
json[r'order'] = this.order;
if (this.originalFileName != null) {
@ -567,10 +577,12 @@ class MetadataSearchDto {
} else {
// json[r'size'] = null;
}
if (this.state != null) {
if (this.state.unwrapOrNull() != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
if(this.state.isSome) {
json[r'state'] = null;
}
}
json[r'tagIds'] = this.tagIds;
if (this.takenAfter != null) {
@ -651,10 +663,10 @@ class MetadataSearchDto {
return MetadataSearchDto(
checksum: mapValueOfType<String>(json, r'checksum'),
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
createdAfter: mapDateTime(json, r'createdAfter', r''),
createdBefore: mapDateTime(json, r'createdBefore', r''),
city: Option.from(mapValueOfType<String>(json, r'city')),
country: Option.from(mapValueOfType<String>(json, r'country')),
createdAfter: mapDateTime(json, r'createdAfter', r''),
createdBefore: mapDateTime(json, r'createdBefore', r''),
description: mapValueOfType<String>(json, r'description'),
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId'),
deviceId: mapValueOfType<String>(json, r'deviceId'),
@ -665,10 +677,10 @@ class MetadataSearchDto {
isMotion: mapValueOfType<bool>(json, r'isMotion'),
isNotInAlbum: mapValueOfType<bool>(json, r'isNotInAlbum'),
isOffline: mapValueOfType<bool>(json, r'isOffline'),
lensModel: mapValueOfType<String>(json, r'lensModel'),
libraryId: mapValueOfType<String>(json, r'libraryId'),
lensModel: Option.from(mapValueOfType<String>(json, r'lensModel')),
libraryId: Option.from(mapValueOfType<String>(json, r'libraryId')),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
model: Option.from(mapValueOfType<String>(json, r'model')),
order: AssetOrder.fromJson(json[r'order']) ?? AssetOrder.desc,
originalFileName: mapValueOfType<String>(json, r'originalFileName'),
originalPath: mapValueOfType<String>(json, r'originalPath'),
@ -679,18 +691,18 @@ class MetadataSearchDto {
previewPath: mapValueOfType<String>(json, r'previewPath'),
rating: num.parse('${json[r'rating']}'),
size: num.parse('${json[r'size']}'),
state: mapValueOfType<String>(json, r'state'),
state: Option.from(mapValueOfType<String>(json, r'state')),
tagIds: json[r'tagIds'] is Iterable
? (json[r'tagIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
takenAfter: mapDateTime(json, r'takenAfter', r''),
takenBefore: mapDateTime(json, r'takenBefore', r''),
takenAfter: mapDateTime(json, r'takenAfter', r''),
takenBefore: mapDateTime(json, r'takenBefore', r''),
thumbnailPath: mapValueOfType<String>(json, r'thumbnailPath'),
trashedAfter: mapDateTime(json, r'trashedAfter', r''),
trashedBefore: mapDateTime(json, r'trashedBefore', r''),
trashedAfter: mapDateTime(json, r'trashedAfter', r''),
trashedBefore: mapDateTime(json, r'trashedBefore', r''),
type: AssetTypeEnum.fromJson(json[r'type']),
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
visibility: AssetVisibility.fromJson(json[r'visibility']),
withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
withExif: mapValueOfType<bool>(json, r'withExif'),

View File

@ -14,9 +14,9 @@ class NotificationCreateDto {
/// Returns a new [NotificationCreateDto] instance.
NotificationCreateDto({
this.data,
this.description,
this.description = const None(),
this.level,
this.readAt,
this.readAt = const None(),
required this.title,
this.type,
required this.userId,
@ -30,7 +30,7 @@ class NotificationCreateDto {
///
Object? data;
String? description;
Option<String> description;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -40,7 +40,7 @@ class NotificationCreateDto {
///
NotificationLevel? level;
DateTime? readAt;
Option<DateTime> readAt;
String title;
@ -68,9 +68,9 @@ class NotificationCreateDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(data == null ? 0 : data!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(description.hashCode) +
(level == null ? 0 : level!.hashCode) +
(readAt == null ? 0 : readAt!.hashCode) +
(readAt.hashCode) +
(title.hashCode) +
(type == null ? 0 : type!.hashCode) +
(userId.hashCode);
@ -85,20 +85,24 @@ class NotificationCreateDto {
} else {
// json[r'data'] = null;
}
if (this.description != null) {
if (this.description.unwrapOrNull() != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
if(this.description.isSome) {
json[r'description'] = null;
}
}
if (this.level != null) {
json[r'level'] = this.level;
} else {
// json[r'level'] = null;
}
if (this.readAt != null) {
json[r'readAt'] = this.readAt!.toUtc().toIso8601String();
if (this.readAt.unwrapOrNull() != null) {
json[r'readAt'] = this.readAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'readAt'] = null;
if(this.readAt.isSome) {
json[r'readAt'] = null;
}
}
json[r'title'] = this.title;
if (this.type != null) {
@ -120,9 +124,9 @@ class NotificationCreateDto {
return NotificationCreateDto(
data: mapValueOfType<Object>(json, r'data'),
description: mapValueOfType<String>(json, r'description'),
description: Option.from(mapValueOfType<String>(json, r'description')),
level: NotificationLevel.fromJson(json[r'level']),
readAt: mapDateTime(json, r'readAt', r''),
readAt: Option.from(mapDateTime(json, r'readAt', r'')),
title: mapValueOfType<String>(json, r'title')!,
type: NotificationType.fromJson(json[r'type']),
userId: mapValueOfType<String>(json, r'userId')!,

View File

@ -117,12 +117,12 @@ class NotificationDto {
final json = value.cast<String, dynamic>();
return NotificationDto(
createdAt: mapDateTime(json, r'createdAt', r'')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
data: mapValueOfType<Object>(json, r'data'),
description: mapValueOfType<String>(json, r'description'),
id: mapValueOfType<String>(json, r'id')!,
level: NotificationLevel.fromJson(json[r'level'])!,
readAt: mapDateTime(json, r'readAt', r''),
readAt: mapDateTime(json, r'readAt', r''),
title: mapValueOfType<String>(json, r'title')!,
type: NotificationType.fromJson(json[r'type'])!,
);

View File

@ -14,12 +14,12 @@ class NotificationUpdateAllDto {
/// Returns a new [NotificationUpdateAllDto] instance.
NotificationUpdateAllDto({
this.ids = const [],
this.readAt,
this.readAt = const None(),
});
List<String> ids;
DateTime? readAt;
Option<DateTime> readAt;
@override
bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateAllDto &&
@ -30,7 +30,7 @@ class NotificationUpdateAllDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(ids.hashCode) +
(readAt == null ? 0 : readAt!.hashCode);
(readAt.hashCode);
@override
String toString() => 'NotificationUpdateAllDto[ids=$ids, readAt=$readAt]';
@ -38,10 +38,12 @@ class NotificationUpdateAllDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'ids'] = this.ids;
if (this.readAt != null) {
json[r'readAt'] = this.readAt!.toUtc().toIso8601String();
if (this.readAt.unwrapOrNull() != null) {
json[r'readAt'] = this.readAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'readAt'] = null;
if(this.readAt.isSome) {
json[r'readAt'] = null;
}
}
return json;
}
@ -58,7 +60,7 @@ class NotificationUpdateAllDto {
ids: json[r'ids'] is Iterable
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
: const [],
readAt: mapDateTime(json, r'readAt', r''),
readAt: Option.from(mapDateTime(json, r'readAt', r'')),
);
}
return null;

View File

@ -13,10 +13,10 @@ part of openapi.api;
class NotificationUpdateDto {
/// Returns a new [NotificationUpdateDto] instance.
NotificationUpdateDto({
this.readAt,
this.readAt = const None(),
});
DateTime? readAt;
Option<DateTime> readAt;
@override
bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateDto &&
@ -25,17 +25,19 @@ class NotificationUpdateDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(readAt == null ? 0 : readAt!.hashCode);
(readAt.hashCode);
@override
String toString() => 'NotificationUpdateDto[readAt=$readAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.readAt != null) {
json[r'readAt'] = this.readAt!.toUtc().toIso8601String();
if (this.readAt.unwrapOrNull() != null) {
json[r'readAt'] = this.readAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'readAt'] = null;
if(this.readAt.isSome) {
json[r'readAt'] = null;
}
}
return json;
}
@ -49,7 +51,7 @@ class NotificationUpdateDto {
final json = value.cast<String, dynamic>();
return NotificationUpdateDto(
readAt: mapDateTime(json, r'readAt', r''),
readAt: Option.from(mapDateTime(json, r'readAt', r'')),
);
}
return null;

View File

@ -96,7 +96,7 @@ class PartnerResponseDto {
id: mapValueOfType<String>(json, r'id')!,
inTimeline: mapValueOfType<bool>(json, r'inTimeline'),
name: mapValueOfType<String>(json, r'name')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
);
}

View File

@ -13,8 +13,8 @@ part of openapi.api;
class PeopleUpdateItem {
/// Returns a new [PeopleUpdateItem] instance.
PeopleUpdateItem({
this.birthDate,
this.color,
this.birthDate = const None(),
this.color = const None(),
this.featureFaceAssetId,
required this.id,
this.isFavorite,
@ -23,9 +23,9 @@ class PeopleUpdateItem {
});
/// Person date of birth. Note: the mobile app cannot currently set the birth date to null.
DateTime? birthDate;
Option<DateTime> birthDate;
String? color;
Option<String> color;
/// Asset is used to get the feature face thumbnail.
///
@ -78,8 +78,8 @@ class PeopleUpdateItem {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(birthDate == null ? 0 : birthDate!.hashCode) +
(color == null ? 0 : color!.hashCode) +
(birthDate.hashCode) +
(color.hashCode) +
(featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) +
(id.hashCode) +
(isFavorite == null ? 0 : isFavorite!.hashCode) +
@ -91,15 +91,19 @@ class PeopleUpdateItem {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.birthDate != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc());
if (this.birthDate.unwrapOrNull() != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate.unwrap().toUtc());
} else {
// json[r'birthDate'] = null;
if(this.birthDate.isSome) {
json[r'birthDate'] = null;
}
}
if (this.color != null) {
if (this.color.unwrapOrNull() != null) {
json[r'color'] = this.color;
} else {
// json[r'color'] = null;
if(this.color.isSome) {
json[r'color'] = null;
}
}
if (this.featureFaceAssetId != null) {
json[r'featureFaceAssetId'] = this.featureFaceAssetId;
@ -134,8 +138,8 @@ class PeopleUpdateItem {
final json = value.cast<String, dynamic>();
return PeopleUpdateItem(
birthDate: mapDateTime(json, r'birthDate', r''),
color: mapValueOfType<String>(json, r'color'),
birthDate: Option.from(mapDateTime(json, r'birthDate', r'')),
color: Option.from(mapValueOfType<String>(json, r'color')),
featureFaceAssetId: mapValueOfType<String>(json, r'featureFaceAssetId'),
id: mapValueOfType<String>(json, r'id')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),

View File

@ -13,17 +13,17 @@ part of openapi.api;
class PersonCreateDto {
/// Returns a new [PersonCreateDto] instance.
PersonCreateDto({
this.birthDate,
this.color,
this.birthDate = const None(),
this.color = const None(),
this.isFavorite,
this.isHidden,
this.name,
});
/// Person date of birth. Note: the mobile app cannot currently set the birth date to null.
DateTime? birthDate;
Option<DateTime> birthDate;
String? color;
Option<String> color;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -62,8 +62,8 @@ class PersonCreateDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(birthDate == null ? 0 : birthDate!.hashCode) +
(color == null ? 0 : color!.hashCode) +
(birthDate.hashCode) +
(color.hashCode) +
(isFavorite == null ? 0 : isFavorite!.hashCode) +
(isHidden == null ? 0 : isHidden!.hashCode) +
(name == null ? 0 : name!.hashCode);
@ -73,15 +73,19 @@ class PersonCreateDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.birthDate != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc());
if (this.birthDate.unwrapOrNull() != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate.unwrap().toUtc());
} else {
// json[r'birthDate'] = null;
if(this.birthDate.isSome) {
json[r'birthDate'] = null;
}
}
if (this.color != null) {
if (this.color.unwrapOrNull() != null) {
json[r'color'] = this.color;
} else {
// json[r'color'] = null;
if(this.color.isSome) {
json[r'color'] = null;
}
}
if (this.isFavorite != null) {
json[r'isFavorite'] = this.isFavorite;
@ -110,8 +114,8 @@ class PersonCreateDto {
final json = value.cast<String, dynamic>();
return PersonCreateDto(
birthDate: mapDateTime(json, r'birthDate', r''),
color: mapValueOfType<String>(json, r'color'),
birthDate: Option.from(mapDateTime(json, r'birthDate', r'')),
color: Option.from(mapValueOfType<String>(json, r'color')),
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
isHidden: mapValueOfType<bool>(json, r'isHidden'),
name: mapValueOfType<String>(json, r'name'),

View File

@ -13,7 +13,7 @@ part of openapi.api;
class PersonResponseDto {
/// Returns a new [PersonResponseDto] instance.
PersonResponseDto({
required this.birthDate,
this.birthDate = const None(),
this.color,
required this.id,
this.isFavorite,
@ -23,7 +23,7 @@ class PersonResponseDto {
this.updatedAt,
});
DateTime? birthDate;
Option<DateTime> birthDate;
/// This property was added in v1.126.0
///
@ -74,7 +74,7 @@ class PersonResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(birthDate == null ? 0 : birthDate!.hashCode) +
(birthDate.hashCode) +
(color == null ? 0 : color!.hashCode) +
(id.hashCode) +
(isFavorite == null ? 0 : isFavorite!.hashCode) +
@ -88,10 +88,12 @@ class PersonResponseDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.birthDate != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc());
if (this.birthDate.unwrapOrNull() != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate.unwrap().toUtc());
} else {
// json[r'birthDate'] = null;
if(this.birthDate.isSome) {
json[r'birthDate'] = null;
}
}
if (this.color != null) {
json[r'color'] = this.color;
@ -124,14 +126,14 @@ class PersonResponseDto {
final json = value.cast<String, dynamic>();
return PersonResponseDto(
birthDate: mapDateTime(json, r'birthDate', r''),
birthDate: Option.from(mapDateTime(json, r'birthDate', r'')),
color: mapValueOfType<String>(json, r'color'),
id: mapValueOfType<String>(json, r'id')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
isHidden: mapValueOfType<bool>(json, r'isHidden')!,
name: mapValueOfType<String>(json, r'name')!,
thumbnailPath: mapValueOfType<String>(json, r'thumbnailPath')!,
updatedAt: mapDateTime(json, r'updatedAt', r''),
updatedAt: mapDateTime(json, r'updatedAt', r''),
);
}
return null;

View File

@ -13,8 +13,8 @@ part of openapi.api;
class PersonUpdateDto {
/// Returns a new [PersonUpdateDto] instance.
PersonUpdateDto({
this.birthDate,
this.color,
this.birthDate = const None(),
this.color = const None(),
this.featureFaceAssetId,
this.isFavorite,
this.isHidden,
@ -22,9 +22,9 @@ class PersonUpdateDto {
});
/// Person date of birth. Note: the mobile app cannot currently set the birth date to null.
DateTime? birthDate;
Option<DateTime> birthDate;
String? color;
Option<String> color;
/// Asset is used to get the feature face thumbnail.
///
@ -73,8 +73,8 @@ class PersonUpdateDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(birthDate == null ? 0 : birthDate!.hashCode) +
(color == null ? 0 : color!.hashCode) +
(birthDate.hashCode) +
(color.hashCode) +
(featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) +
(isFavorite == null ? 0 : isFavorite!.hashCode) +
(isHidden == null ? 0 : isHidden!.hashCode) +
@ -85,15 +85,19 @@ class PersonUpdateDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.birthDate != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc());
if (this.birthDate.unwrapOrNull() != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate.unwrap().toUtc());
} else {
// json[r'birthDate'] = null;
if(this.birthDate.isSome) {
json[r'birthDate'] = null;
}
}
if (this.color != null) {
if (this.color.unwrapOrNull() != null) {
json[r'color'] = this.color;
} else {
// json[r'color'] = null;
if(this.color.isSome) {
json[r'color'] = null;
}
}
if (this.featureFaceAssetId != null) {
json[r'featureFaceAssetId'] = this.featureFaceAssetId;
@ -127,8 +131,8 @@ class PersonUpdateDto {
final json = value.cast<String, dynamic>();
return PersonUpdateDto(
birthDate: mapDateTime(json, r'birthDate', r''),
color: mapValueOfType<String>(json, r'color'),
birthDate: Option.from(mapDateTime(json, r'birthDate', r'')),
color: Option.from(mapValueOfType<String>(json, r'color')),
featureFaceAssetId: mapValueOfType<String>(json, r'featureFaceAssetId'),
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
isHidden: mapValueOfType<bool>(json, r'isHidden'),

View File

@ -13,7 +13,7 @@ part of openapi.api;
class PersonWithFacesResponseDto {
/// Returns a new [PersonWithFacesResponseDto] instance.
PersonWithFacesResponseDto({
required this.birthDate,
this.birthDate = const None(),
this.color,
this.faces = const [],
required this.id,
@ -24,7 +24,7 @@ class PersonWithFacesResponseDto {
this.updatedAt,
});
DateTime? birthDate;
Option<DateTime> birthDate;
/// This property was added in v1.126.0
///
@ -78,7 +78,7 @@ class PersonWithFacesResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(birthDate == null ? 0 : birthDate!.hashCode) +
(birthDate.hashCode) +
(color == null ? 0 : color!.hashCode) +
(faces.hashCode) +
(id.hashCode) +
@ -93,10 +93,12 @@ class PersonWithFacesResponseDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.birthDate != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc());
if (this.birthDate.unwrapOrNull() != null) {
json[r'birthDate'] = _dateFormatter.format(this.birthDate.unwrap().toUtc());
} else {
// json[r'birthDate'] = null;
if(this.birthDate.isSome) {
json[r'birthDate'] = null;
}
}
if (this.color != null) {
json[r'color'] = this.color;
@ -130,7 +132,7 @@ class PersonWithFacesResponseDto {
final json = value.cast<String, dynamic>();
return PersonWithFacesResponseDto(
birthDate: mapDateTime(json, r'birthDate', r''),
birthDate: Option.from(mapDateTime(json, r'birthDate', r'')),
color: mapValueOfType<String>(json, r'color'),
faces: AssetFaceWithoutPersonResponseDto.listFromJson(json[r'faces']),
id: mapValueOfType<String>(json, r'id')!,
@ -138,7 +140,7 @@ class PersonWithFacesResponseDto {
isHidden: mapValueOfType<bool>(json, r'isHidden')!,
name: mapValueOfType<String>(json, r'name')!,
thumbnailPath: mapValueOfType<String>(json, r'thumbnailPath')!,
updatedAt: mapDateTime(json, r'updatedAt', r''),
updatedAt: mapDateTime(json, r'updatedAt', r''),
);
}
return null;

View File

@ -13,8 +13,8 @@ part of openapi.api;
class RandomSearchDto {
/// Returns a new [RandomSearchDto] instance.
RandomSearchDto({
this.city,
this.country,
this.city = const None(),
this.country = const None(),
this.createdAfter,
this.createdBefore,
this.deviceId,
@ -23,14 +23,14 @@ class RandomSearchDto {
this.isMotion,
this.isNotInAlbum,
this.isOffline,
this.lensModel,
this.libraryId,
this.lensModel = const None(),
this.libraryId = const None(),
this.make,
this.model,
this.model = const None(),
this.personIds = const [],
this.rating,
this.size,
this.state,
this.state = const None(),
this.tagIds = const [],
this.takenAfter,
this.takenBefore,
@ -46,9 +46,9 @@ class RandomSearchDto {
this.withStacked,
});
String? city;
Option<String> city;
String? country;
Option<String> country;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -114,9 +114,9 @@ class RandomSearchDto {
///
bool? isOffline;
String? lensModel;
Option<String> lensModel;
String? libraryId;
Option<String> libraryId;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -126,7 +126,7 @@ class RandomSearchDto {
///
String? make;
String? model;
Option<String> model;
List<String> personIds;
@ -150,7 +150,7 @@ class RandomSearchDto {
///
num? size;
String? state;
Option<String> state;
List<String> tagIds;
@ -287,8 +287,8 @@ class RandomSearchDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(city == null ? 0 : city!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(city.hashCode) +
(country.hashCode) +
(createdAfter == null ? 0 : createdAfter!.hashCode) +
(createdBefore == null ? 0 : createdBefore!.hashCode) +
(deviceId == null ? 0 : deviceId!.hashCode) +
@ -297,14 +297,14 @@ class RandomSearchDto {
(isMotion == null ? 0 : isMotion!.hashCode) +
(isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) +
(isOffline == null ? 0 : isOffline!.hashCode) +
(lensModel == null ? 0 : lensModel!.hashCode) +
(libraryId == null ? 0 : libraryId!.hashCode) +
(lensModel.hashCode) +
(libraryId.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(model.hashCode) +
(personIds.hashCode) +
(rating == null ? 0 : rating!.hashCode) +
(size == null ? 0 : size!.hashCode) +
(state == null ? 0 : state!.hashCode) +
(state.hashCode) +
(tagIds.hashCode) +
(takenAfter == null ? 0 : takenAfter!.hashCode) +
(takenBefore == null ? 0 : takenBefore!.hashCode) +
@ -324,15 +324,19 @@ class RandomSearchDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.city != null) {
if (this.city.unwrapOrNull() != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
if(this.city.isSome) {
json[r'city'] = null;
}
}
if (this.country != null) {
if (this.country.unwrapOrNull() != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
if(this.country.isSome) {
json[r'country'] = null;
}
}
if (this.createdAfter != null) {
json[r'createdAfter'] = this.createdAfter!.toUtc().toIso8601String();
@ -374,25 +378,31 @@ class RandomSearchDto {
} else {
// json[r'isOffline'] = null;
}
if (this.lensModel != null) {
if (this.lensModel.unwrapOrNull() != null) {
json[r'lensModel'] = this.lensModel;
} else {
// json[r'lensModel'] = null;
if(this.lensModel.isSome) {
json[r'lensModel'] = null;
}
}
if (this.libraryId != null) {
if (this.libraryId.unwrapOrNull() != null) {
json[r'libraryId'] = this.libraryId;
} else {
// json[r'libraryId'] = null;
if(this.libraryId.isSome) {
json[r'libraryId'] = null;
}
}
if (this.make != null) {
json[r'make'] = this.make;
} else {
// json[r'make'] = null;
}
if (this.model != null) {
if (this.model.unwrapOrNull() != null) {
json[r'model'] = this.model;
} else {
// json[r'model'] = null;
if(this.model.isSome) {
json[r'model'] = null;
}
}
json[r'personIds'] = this.personIds;
if (this.rating != null) {
@ -405,10 +415,12 @@ class RandomSearchDto {
} else {
// json[r'size'] = null;
}
if (this.state != null) {
if (this.state.unwrapOrNull() != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
if(this.state.isSome) {
json[r'state'] = null;
}
}
json[r'tagIds'] = this.tagIds;
if (this.takenAfter != null) {
@ -483,36 +495,36 @@ class RandomSearchDto {
final json = value.cast<String, dynamic>();
return RandomSearchDto(
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
createdAfter: mapDateTime(json, r'createdAfter', r''),
createdBefore: mapDateTime(json, r'createdBefore', r''),
city: Option.from(mapValueOfType<String>(json, r'city')),
country: Option.from(mapValueOfType<String>(json, r'country')),
createdAfter: mapDateTime(json, r'createdAfter', r''),
createdBefore: mapDateTime(json, r'createdBefore', r''),
deviceId: mapValueOfType<String>(json, r'deviceId'),
isEncoded: mapValueOfType<bool>(json, r'isEncoded'),
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
isMotion: mapValueOfType<bool>(json, r'isMotion'),
isNotInAlbum: mapValueOfType<bool>(json, r'isNotInAlbum'),
isOffline: mapValueOfType<bool>(json, r'isOffline'),
lensModel: mapValueOfType<String>(json, r'lensModel'),
libraryId: mapValueOfType<String>(json, r'libraryId'),
lensModel: Option.from(mapValueOfType<String>(json, r'lensModel')),
libraryId: Option.from(mapValueOfType<String>(json, r'libraryId')),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
model: Option.from(mapValueOfType<String>(json, r'model')),
personIds: json[r'personIds'] is Iterable
? (json[r'personIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
rating: num.parse('${json[r'rating']}'),
size: num.parse('${json[r'size']}'),
state: mapValueOfType<String>(json, r'state'),
state: Option.from(mapValueOfType<String>(json, r'state')),
tagIds: json[r'tagIds'] is Iterable
? (json[r'tagIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
takenAfter: mapDateTime(json, r'takenAfter', r''),
takenBefore: mapDateTime(json, r'takenBefore', r''),
trashedAfter: mapDateTime(json, r'trashedAfter', r''),
trashedBefore: mapDateTime(json, r'trashedBefore', r''),
takenAfter: mapDateTime(json, r'takenAfter', r''),
takenBefore: mapDateTime(json, r'takenBefore', r''),
trashedAfter: mapDateTime(json, r'trashedAfter', r''),
trashedBefore: mapDateTime(json, r'trashedBefore', r''),
type: AssetTypeEnum.fromJson(json[r'type']),
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
visibility: AssetVisibility.fromJson(json[r'visibility']),
withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
withExif: mapValueOfType<bool>(json, r'withExif'),

View File

@ -13,13 +13,13 @@ part of openapi.api;
class ReverseGeocodingStateResponseDto {
/// Returns a new [ReverseGeocodingStateResponseDto] instance.
ReverseGeocodingStateResponseDto({
required this.lastImportFileName,
required this.lastUpdate,
this.lastImportFileName = const None(),
this.lastUpdate = const None(),
});
String? lastImportFileName;
Option<String> lastImportFileName;
String? lastUpdate;
Option<String> lastUpdate;
@override
bool operator ==(Object other) => identical(this, other) || other is ReverseGeocodingStateResponseDto &&
@ -29,23 +29,27 @@ class ReverseGeocodingStateResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(lastImportFileName == null ? 0 : lastImportFileName!.hashCode) +
(lastUpdate == null ? 0 : lastUpdate!.hashCode);
(lastImportFileName.hashCode) +
(lastUpdate.hashCode);
@override
String toString() => 'ReverseGeocodingStateResponseDto[lastImportFileName=$lastImportFileName, lastUpdate=$lastUpdate]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.lastImportFileName != null) {
if (this.lastImportFileName.unwrapOrNull() != null) {
json[r'lastImportFileName'] = this.lastImportFileName;
} else {
// json[r'lastImportFileName'] = null;
if(this.lastImportFileName.isSome) {
json[r'lastImportFileName'] = null;
}
}
if (this.lastUpdate != null) {
if (this.lastUpdate.unwrapOrNull() != null) {
json[r'lastUpdate'] = this.lastUpdate;
} else {
// json[r'lastUpdate'] = null;
if(this.lastUpdate.isSome) {
json[r'lastUpdate'] = null;
}
}
return json;
}
@ -59,8 +63,8 @@ class ReverseGeocodingStateResponseDto {
final json = value.cast<String, dynamic>();
return ReverseGeocodingStateResponseDto(
lastImportFileName: mapValueOfType<String>(json, r'lastImportFileName'),
lastUpdate: mapValueOfType<String>(json, r'lastUpdate'),
lastImportFileName: Option.from(mapValueOfType<String>(json, r'lastImportFileName')),
lastUpdate: Option.from(mapValueOfType<String>(json, r'lastUpdate')),
);
}
return null;

View File

@ -16,7 +16,7 @@ class SearchAssetResponseDto {
required this.count,
this.facets = const [],
this.items = const [],
required this.nextPage,
this.nextPage = const None(),
required this.total,
});
@ -26,7 +26,7 @@ class SearchAssetResponseDto {
List<AssetResponseDto> items;
String? nextPage;
Option<String> nextPage;
int total;
@ -44,7 +44,7 @@ class SearchAssetResponseDto {
(count.hashCode) +
(facets.hashCode) +
(items.hashCode) +
(nextPage == null ? 0 : nextPage!.hashCode) +
(nextPage.hashCode) +
(total.hashCode);
@override
@ -55,10 +55,12 @@ class SearchAssetResponseDto {
json[r'count'] = this.count;
json[r'facets'] = this.facets;
json[r'items'] = this.items;
if (this.nextPage != null) {
if (this.nextPage.unwrapOrNull() != null) {
json[r'nextPage'] = this.nextPage;
} else {
// json[r'nextPage'] = null;
if(this.nextPage.isSome) {
json[r'nextPage'] = null;
}
}
json[r'total'] = this.total;
return json;
@ -76,7 +78,7 @@ class SearchAssetResponseDto {
count: mapValueOfType<int>(json, r'count')!,
facets: SearchFacetResponseDto.listFromJson(json[r'facets']),
items: AssetResponseDto.listFromJson(json[r'items']),
nextPage: mapValueOfType<String>(json, r'nextPage'),
nextPage: Option.from(mapValueOfType<String>(json, r'nextPage')),
total: mapValueOfType<int>(json, r'total')!,
);
}

View File

@ -57,7 +57,7 @@ class ServerVersionHistoryResponseDto {
final json = value.cast<String, dynamic>();
return ServerVersionHistoryResponseDto(
createdAt: mapDateTime(json, r'createdAt', r'')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
id: mapValueOfType<String>(json, r'id')!,
version: mapValueOfType<String>(json, r'version')!,
);

View File

@ -18,7 +18,7 @@ class SharedLinkCreateDto {
this.allowUpload,
this.assetIds = const [],
this.description,
this.expiresAt,
this.expiresAt = const None(),
this.password,
this.showMetadata = true,
required this.type,
@ -52,7 +52,7 @@ class SharedLinkCreateDto {
///
String? description;
DateTime? expiresAt;
Option<DateTime> expiresAt;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -86,7 +86,7 @@ class SharedLinkCreateDto {
(allowUpload == null ? 0 : allowUpload!.hashCode) +
(assetIds.hashCode) +
(description == null ? 0 : description!.hashCode) +
(expiresAt == null ? 0 : expiresAt!.hashCode) +
(expiresAt.hashCode) +
(password == null ? 0 : password!.hashCode) +
(showMetadata.hashCode) +
(type.hashCode);
@ -113,10 +113,12 @@ class SharedLinkCreateDto {
} else {
// json[r'description'] = null;
}
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
if (this.expiresAt.unwrapOrNull() != null) {
json[r'expiresAt'] = this.expiresAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'expiresAt'] = null;
if(this.expiresAt.isSome) {
json[r'expiresAt'] = null;
}
}
if (this.password != null) {
json[r'password'] = this.password;
@ -144,7 +146,7 @@ class SharedLinkCreateDto {
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
description: mapValueOfType<String>(json, r'description'),
expiresAt: mapDateTime(json, r'expiresAt', r''),
expiresAt: Option.from(mapDateTime(json, r'expiresAt', r'')),
password: mapValueOfType<String>(json, r'password'),
showMetadata: mapValueOfType<bool>(json, r'showMetadata') ?? true,
type: SharedLinkType.fromJson(json[r'type'])!,

View File

@ -17,7 +17,7 @@ class SharedLinkEditDto {
this.allowUpload,
this.changeExpiryTime,
this.description,
this.expiresAt,
this.expiresAt = const None(),
this.password,
this.showMetadata,
});
@ -55,7 +55,7 @@ class SharedLinkEditDto {
///
String? description;
DateTime? expiresAt;
Option<DateTime> expiresAt;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -90,7 +90,7 @@ class SharedLinkEditDto {
(allowUpload == null ? 0 : allowUpload!.hashCode) +
(changeExpiryTime == null ? 0 : changeExpiryTime!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(expiresAt == null ? 0 : expiresAt!.hashCode) +
(expiresAt.hashCode) +
(password == null ? 0 : password!.hashCode) +
(showMetadata == null ? 0 : showMetadata!.hashCode);
@ -119,10 +119,12 @@ class SharedLinkEditDto {
} else {
// json[r'description'] = null;
}
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
if (this.expiresAt.unwrapOrNull() != null) {
json[r'expiresAt'] = this.expiresAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'expiresAt'] = null;
if(this.expiresAt.isSome) {
json[r'expiresAt'] = null;
}
}
if (this.password != null) {
json[r'password'] = this.password;
@ -150,7 +152,7 @@ class SharedLinkEditDto {
allowUpload: mapValueOfType<bool>(json, r'allowUpload'),
changeExpiryTime: mapValueOfType<bool>(json, r'changeExpiryTime'),
description: mapValueOfType<String>(json, r'description'),
expiresAt: mapDateTime(json, r'expiresAt', r''),
expiresAt: Option.from(mapDateTime(json, r'expiresAt', r'')),
password: mapValueOfType<String>(json, r'password'),
showMetadata: mapValueOfType<bool>(json, r'showMetadata'),
);

View File

@ -18,13 +18,13 @@ class SharedLinkResponseDto {
required this.allowUpload,
this.assets = const [],
required this.createdAt,
required this.description,
required this.expiresAt,
this.description = const None(),
this.expiresAt = const None(),
required this.id,
required this.key,
required this.password,
this.password = const None(),
required this.showMetadata,
this.token,
this.token = const None(),
required this.type,
required this.userId,
});
@ -45,19 +45,19 @@ class SharedLinkResponseDto {
DateTime createdAt;
String? description;
Option<String> description;
DateTime? expiresAt;
Option<DateTime> expiresAt;
String id;
String key;
String? password;
Option<String> password;
bool showMetadata;
String? token;
Option<String> token;
SharedLinkType type;
@ -88,13 +88,13 @@ class SharedLinkResponseDto {
(allowUpload.hashCode) +
(assets.hashCode) +
(createdAt.hashCode) +
(description == null ? 0 : description!.hashCode) +
(expiresAt == null ? 0 : expiresAt!.hashCode) +
(description.hashCode) +
(expiresAt.hashCode) +
(id.hashCode) +
(key.hashCode) +
(password == null ? 0 : password!.hashCode) +
(password.hashCode) +
(showMetadata.hashCode) +
(token == null ? 0 : token!.hashCode) +
(token.hashCode) +
(type.hashCode) +
(userId.hashCode);
@ -112,28 +112,36 @@ class SharedLinkResponseDto {
json[r'allowUpload'] = this.allowUpload;
json[r'assets'] = this.assets;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.description != null) {
if (this.description.unwrapOrNull() != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
if(this.description.isSome) {
json[r'description'] = null;
}
}
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
if (this.expiresAt.unwrapOrNull() != null) {
json[r'expiresAt'] = this.expiresAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'expiresAt'] = null;
if(this.expiresAt.isSome) {
json[r'expiresAt'] = null;
}
}
json[r'id'] = this.id;
json[r'key'] = this.key;
if (this.password != null) {
if (this.password.unwrapOrNull() != null) {
json[r'password'] = this.password;
} else {
// json[r'password'] = null;
if(this.password.isSome) {
json[r'password'] = null;
}
}
json[r'showMetadata'] = this.showMetadata;
if (this.token != null) {
if (this.token.unwrapOrNull() != null) {
json[r'token'] = this.token;
} else {
// json[r'token'] = null;
if(this.token.isSome) {
json[r'token'] = null;
}
}
json[r'type'] = this.type;
json[r'userId'] = this.userId;
@ -153,14 +161,14 @@ class SharedLinkResponseDto {
allowDownload: mapValueOfType<bool>(json, r'allowDownload')!,
allowUpload: mapValueOfType<bool>(json, r'allowUpload')!,
assets: AssetResponseDto.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', r'')!,
description: mapValueOfType<String>(json, r'description'),
expiresAt: mapDateTime(json, r'expiresAt', r''),
createdAt: mapDateTime(json, r'createdAt', r'')!,
description: Option.from(mapValueOfType<String>(json, r'description')),
expiresAt: Option.from(mapDateTime(json, r'expiresAt', r'')),
id: mapValueOfType<String>(json, r'id')!,
key: mapValueOfType<String>(json, r'key')!,
password: mapValueOfType<String>(json, r'password'),
password: Option.from(mapValueOfType<String>(json, r'password')),
showMetadata: mapValueOfType<bool>(json, r'showMetadata')!,
token: mapValueOfType<String>(json, r'token'),
token: Option.from(mapValueOfType<String>(json, r'token')),
type: SharedLinkType.fromJson(json[r'type'])!,
userId: mapValueOfType<String>(json, r'userId')!,
);

View File

@ -13,8 +13,8 @@ part of openapi.api;
class SmartSearchDto {
/// Returns a new [SmartSearchDto] instance.
SmartSearchDto({
this.city,
this.country,
this.city = const None(),
this.country = const None(),
this.createdAfter,
this.createdBefore,
this.deviceId,
@ -24,16 +24,16 @@ class SmartSearchDto {
this.isNotInAlbum,
this.isOffline,
this.language,
this.lensModel,
this.libraryId,
this.lensModel = const None(),
this.libraryId = const None(),
this.make,
this.model,
this.model = const None(),
this.page,
this.personIds = const [],
required this.query,
this.rating,
this.size,
this.state,
this.state = const None(),
this.tagIds = const [],
this.takenAfter,
this.takenBefore,
@ -47,9 +47,9 @@ class SmartSearchDto {
this.withExif,
});
String? city;
Option<String> city;
String? country;
Option<String> country;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -123,9 +123,9 @@ class SmartSearchDto {
///
String? language;
String? lensModel;
Option<String> lensModel;
String? libraryId;
Option<String> libraryId;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -135,7 +135,7 @@ class SmartSearchDto {
///
String? make;
String? model;
Option<String> model;
/// Minimum value: 1
///
@ -170,7 +170,7 @@ class SmartSearchDto {
///
num? size;
String? state;
Option<String> state;
List<String> tagIds;
@ -292,8 +292,8 @@ class SmartSearchDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(city == null ? 0 : city!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(city.hashCode) +
(country.hashCode) +
(createdAfter == null ? 0 : createdAfter!.hashCode) +
(createdBefore == null ? 0 : createdBefore!.hashCode) +
(deviceId == null ? 0 : deviceId!.hashCode) +
@ -303,16 +303,16 @@ class SmartSearchDto {
(isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) +
(isOffline == null ? 0 : isOffline!.hashCode) +
(language == null ? 0 : language!.hashCode) +
(lensModel == null ? 0 : lensModel!.hashCode) +
(libraryId == null ? 0 : libraryId!.hashCode) +
(lensModel.hashCode) +
(libraryId.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(model.hashCode) +
(page == null ? 0 : page!.hashCode) +
(personIds.hashCode) +
(query.hashCode) +
(rating == null ? 0 : rating!.hashCode) +
(size == null ? 0 : size!.hashCode) +
(state == null ? 0 : state!.hashCode) +
(state.hashCode) +
(tagIds.hashCode) +
(takenAfter == null ? 0 : takenAfter!.hashCode) +
(takenBefore == null ? 0 : takenBefore!.hashCode) +
@ -330,15 +330,19 @@ class SmartSearchDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.city != null) {
if (this.city.unwrapOrNull() != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
if(this.city.isSome) {
json[r'city'] = null;
}
}
if (this.country != null) {
if (this.country.unwrapOrNull() != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
if(this.country.isSome) {
json[r'country'] = null;
}
}
if (this.createdAfter != null) {
json[r'createdAfter'] = this.createdAfter!.toUtc().toIso8601String();
@ -385,25 +389,31 @@ class SmartSearchDto {
} else {
// json[r'language'] = null;
}
if (this.lensModel != null) {
if (this.lensModel.unwrapOrNull() != null) {
json[r'lensModel'] = this.lensModel;
} else {
// json[r'lensModel'] = null;
if(this.lensModel.isSome) {
json[r'lensModel'] = null;
}
}
if (this.libraryId != null) {
if (this.libraryId.unwrapOrNull() != null) {
json[r'libraryId'] = this.libraryId;
} else {
// json[r'libraryId'] = null;
if(this.libraryId.isSome) {
json[r'libraryId'] = null;
}
}
if (this.make != null) {
json[r'make'] = this.make;
} else {
// json[r'make'] = null;
}
if (this.model != null) {
if (this.model.unwrapOrNull() != null) {
json[r'model'] = this.model;
} else {
// json[r'model'] = null;
if(this.model.isSome) {
json[r'model'] = null;
}
}
if (this.page != null) {
json[r'page'] = this.page;
@ -422,10 +432,12 @@ class SmartSearchDto {
} else {
// json[r'size'] = null;
}
if (this.state != null) {
if (this.state.unwrapOrNull() != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
if(this.state.isSome) {
json[r'state'] = null;
}
}
json[r'tagIds'] = this.tagIds;
if (this.takenAfter != null) {
@ -490,10 +502,10 @@ class SmartSearchDto {
final json = value.cast<String, dynamic>();
return SmartSearchDto(
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
createdAfter: mapDateTime(json, r'createdAfter', r''),
createdBefore: mapDateTime(json, r'createdBefore', r''),
city: Option.from(mapValueOfType<String>(json, r'city')),
country: Option.from(mapValueOfType<String>(json, r'country')),
createdAfter: mapDateTime(json, r'createdAfter', r''),
createdBefore: mapDateTime(json, r'createdBefore', r''),
deviceId: mapValueOfType<String>(json, r'deviceId'),
isEncoded: mapValueOfType<bool>(json, r'isEncoded'),
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
@ -501,10 +513,10 @@ class SmartSearchDto {
isNotInAlbum: mapValueOfType<bool>(json, r'isNotInAlbum'),
isOffline: mapValueOfType<bool>(json, r'isOffline'),
language: mapValueOfType<String>(json, r'language'),
lensModel: mapValueOfType<String>(json, r'lensModel'),
libraryId: mapValueOfType<String>(json, r'libraryId'),
lensModel: Option.from(mapValueOfType<String>(json, r'lensModel')),
libraryId: Option.from(mapValueOfType<String>(json, r'libraryId')),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
model: Option.from(mapValueOfType<String>(json, r'model')),
page: num.parse('${json[r'page']}'),
personIds: json[r'personIds'] is Iterable
? (json[r'personIds'] as Iterable).cast<String>().toList(growable: false)
@ -512,17 +524,17 @@ class SmartSearchDto {
query: mapValueOfType<String>(json, r'query')!,
rating: num.parse('${json[r'rating']}'),
size: num.parse('${json[r'size']}'),
state: mapValueOfType<String>(json, r'state'),
state: Option.from(mapValueOfType<String>(json, r'state')),
tagIds: json[r'tagIds'] is Iterable
? (json[r'tagIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
takenAfter: mapDateTime(json, r'takenAfter', r''),
takenBefore: mapDateTime(json, r'takenBefore', r''),
trashedAfter: mapDateTime(json, r'trashedAfter', r''),
trashedBefore: mapDateTime(json, r'trashedBefore', r''),
takenAfter: mapDateTime(json, r'takenAfter', r''),
takenBefore: mapDateTime(json, r'takenBefore', r''),
trashedAfter: mapDateTime(json, r'trashedAfter', r''),
trashedBefore: mapDateTime(json, r'trashedBefore', r''),
type: AssetTypeEnum.fromJson(json[r'type']),
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
visibility: AssetVisibility.fromJson(json[r'visibility']),
withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
withExif: mapValueOfType<bool>(json, r'withExif'),

View File

@ -14,81 +14,81 @@ class SyncAssetExifV1 {
/// Returns a new [SyncAssetExifV1] instance.
SyncAssetExifV1({
required this.assetId,
required this.city,
required this.country,
required this.dateTimeOriginal,
required this.description,
required this.exifImageHeight,
required this.exifImageWidth,
required this.exposureTime,
required this.fNumber,
required this.fileSizeInByte,
required this.focalLength,
required this.fps,
required this.iso,
required this.latitude,
required this.lensModel,
required this.longitude,
required this.make,
required this.model,
required this.modifyDate,
required this.orientation,
required this.profileDescription,
required this.projectionType,
required this.rating,
required this.state,
required this.timeZone,
this.city = const None(),
this.country = const None(),
this.dateTimeOriginal = const None(),
this.description = const None(),
this.exifImageHeight = const None(),
this.exifImageWidth = const None(),
this.exposureTime = const None(),
this.fNumber = const None(),
this.fileSizeInByte = const None(),
this.focalLength = const None(),
this.fps = const None(),
this.iso = const None(),
this.latitude = const None(),
this.lensModel = const None(),
this.longitude = const None(),
this.make = const None(),
this.model = const None(),
this.modifyDate = const None(),
this.orientation = const None(),
this.profileDescription = const None(),
this.projectionType = const None(),
this.rating = const None(),
this.state = const None(),
this.timeZone = const None(),
});
String assetId;
String? city;
Option<String> city;
String? country;
Option<String> country;
DateTime? dateTimeOriginal;
Option<DateTime> dateTimeOriginal;
String? description;
Option<String> description;
int? exifImageHeight;
Option<int> exifImageHeight;
int? exifImageWidth;
Option<int> exifImageWidth;
String? exposureTime;
Option<String> exposureTime;
int? fNumber;
Option<int> fNumber;
int? fileSizeInByte;
Option<int> fileSizeInByte;
int? focalLength;
Option<int> focalLength;
int? fps;
Option<int> fps;
int? iso;
Option<int> iso;
int? latitude;
Option<int> latitude;
String? lensModel;
Option<String> lensModel;
int? longitude;
Option<int> longitude;
String? make;
Option<String> make;
String? model;
Option<String> model;
DateTime? modifyDate;
Option<DateTime> modifyDate;
String? orientation;
Option<String> orientation;
String? profileDescription;
Option<String> profileDescription;
String? projectionType;
Option<String> projectionType;
int? rating;
Option<int> rating;
String? state;
Option<String> state;
String? timeZone;
Option<String> timeZone;
@override
bool operator ==(Object other) => identical(this, other) || other is SyncAssetExifV1 &&
@ -122,30 +122,30 @@ class SyncAssetExifV1 {
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(city == null ? 0 : city!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) +
(description == null ? 0 : description!.hashCode) +
(exifImageHeight == null ? 0 : exifImageHeight!.hashCode) +
(exifImageWidth == null ? 0 : exifImageWidth!.hashCode) +
(exposureTime == null ? 0 : exposureTime!.hashCode) +
(fNumber == null ? 0 : fNumber!.hashCode) +
(fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) +
(focalLength == null ? 0 : focalLength!.hashCode) +
(fps == null ? 0 : fps!.hashCode) +
(iso == null ? 0 : iso!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(lensModel == null ? 0 : lensModel!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(modifyDate == null ? 0 : modifyDate!.hashCode) +
(orientation == null ? 0 : orientation!.hashCode) +
(profileDescription == null ? 0 : profileDescription!.hashCode) +
(projectionType == null ? 0 : projectionType!.hashCode) +
(rating == null ? 0 : rating!.hashCode) +
(state == null ? 0 : state!.hashCode) +
(timeZone == null ? 0 : timeZone!.hashCode);
(city.hashCode) +
(country.hashCode) +
(dateTimeOriginal.hashCode) +
(description.hashCode) +
(exifImageHeight.hashCode) +
(exifImageWidth.hashCode) +
(exposureTime.hashCode) +
(fNumber.hashCode) +
(fileSizeInByte.hashCode) +
(focalLength.hashCode) +
(fps.hashCode) +
(iso.hashCode) +
(latitude.hashCode) +
(lensModel.hashCode) +
(longitude.hashCode) +
(make.hashCode) +
(model.hashCode) +
(modifyDate.hashCode) +
(orientation.hashCode) +
(profileDescription.hashCode) +
(projectionType.hashCode) +
(rating.hashCode) +
(state.hashCode) +
(timeZone.hashCode);
@override
String toString() => 'SyncAssetExifV1[assetId=$assetId, city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, fps=$fps, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, profileDescription=$profileDescription, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]';
@ -153,125 +153,173 @@ class SyncAssetExifV1 {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
if (this.city != null) {
if (this.city.unwrapOrNull() != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
if(this.city.isSome) {
json[r'city'] = null;
}
}
if (this.country != null) {
if (this.country.unwrapOrNull() != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
if(this.country.isSome) {
json[r'country'] = null;
}
}
if (this.dateTimeOriginal != null) {
json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String();
if (this.dateTimeOriginal.unwrapOrNull() != null) {
json[r'dateTimeOriginal'] = this.dateTimeOriginal.unwrap().toUtc().toIso8601String();
} else {
// json[r'dateTimeOriginal'] = null;
if(this.dateTimeOriginal.isSome) {
json[r'dateTimeOriginal'] = null;
}
}
if (this.description != null) {
if (this.description.unwrapOrNull() != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
if(this.description.isSome) {
json[r'description'] = null;
}
}
if (this.exifImageHeight != null) {
if (this.exifImageHeight.unwrapOrNull() != null) {
json[r'exifImageHeight'] = this.exifImageHeight;
} else {
// json[r'exifImageHeight'] = null;
if(this.exifImageHeight.isSome) {
json[r'exifImageHeight'] = null;
}
}
if (this.exifImageWidth != null) {
if (this.exifImageWidth.unwrapOrNull() != null) {
json[r'exifImageWidth'] = this.exifImageWidth;
} else {
// json[r'exifImageWidth'] = null;
if(this.exifImageWidth.isSome) {
json[r'exifImageWidth'] = null;
}
}
if (this.exposureTime != null) {
if (this.exposureTime.unwrapOrNull() != null) {
json[r'exposureTime'] = this.exposureTime;
} else {
// json[r'exposureTime'] = null;
if(this.exposureTime.isSome) {
json[r'exposureTime'] = null;
}
}
if (this.fNumber != null) {
if (this.fNumber.unwrapOrNull() != null) {
json[r'fNumber'] = this.fNumber;
} else {
// json[r'fNumber'] = null;
if(this.fNumber.isSome) {
json[r'fNumber'] = null;
}
}
if (this.fileSizeInByte != null) {
if (this.fileSizeInByte.unwrapOrNull() != null) {
json[r'fileSizeInByte'] = this.fileSizeInByte;
} else {
// json[r'fileSizeInByte'] = null;
if(this.fileSizeInByte.isSome) {
json[r'fileSizeInByte'] = null;
}
}
if (this.focalLength != null) {
if (this.focalLength.unwrapOrNull() != null) {
json[r'focalLength'] = this.focalLength;
} else {
// json[r'focalLength'] = null;
if(this.focalLength.isSome) {
json[r'focalLength'] = null;
}
}
if (this.fps != null) {
if (this.fps.unwrapOrNull() != null) {
json[r'fps'] = this.fps;
} else {
// json[r'fps'] = null;
if(this.fps.isSome) {
json[r'fps'] = null;
}
}
if (this.iso != null) {
if (this.iso.unwrapOrNull() != null) {
json[r'iso'] = this.iso;
} else {
// json[r'iso'] = null;
if(this.iso.isSome) {
json[r'iso'] = null;
}
}
if (this.latitude != null) {
if (this.latitude.unwrapOrNull() != null) {
json[r'latitude'] = this.latitude;
} else {
// json[r'latitude'] = null;
if(this.latitude.isSome) {
json[r'latitude'] = null;
}
}
if (this.lensModel != null) {
if (this.lensModel.unwrapOrNull() != null) {
json[r'lensModel'] = this.lensModel;
} else {
// json[r'lensModel'] = null;
if(this.lensModel.isSome) {
json[r'lensModel'] = null;
}
}
if (this.longitude != null) {
if (this.longitude.unwrapOrNull() != null) {
json[r'longitude'] = this.longitude;
} else {
// json[r'longitude'] = null;
if(this.longitude.isSome) {
json[r'longitude'] = null;
}
}
if (this.make != null) {
if (this.make.unwrapOrNull() != null) {
json[r'make'] = this.make;
} else {
// json[r'make'] = null;
if(this.make.isSome) {
json[r'make'] = null;
}
}
if (this.model != null) {
if (this.model.unwrapOrNull() != null) {
json[r'model'] = this.model;
} else {
// json[r'model'] = null;
if(this.model.isSome) {
json[r'model'] = null;
}
}
if (this.modifyDate != null) {
json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String();
if (this.modifyDate.unwrapOrNull() != null) {
json[r'modifyDate'] = this.modifyDate.unwrap().toUtc().toIso8601String();
} else {
// json[r'modifyDate'] = null;
if(this.modifyDate.isSome) {
json[r'modifyDate'] = null;
}
}
if (this.orientation != null) {
if (this.orientation.unwrapOrNull() != null) {
json[r'orientation'] = this.orientation;
} else {
// json[r'orientation'] = null;
if(this.orientation.isSome) {
json[r'orientation'] = null;
}
}
if (this.profileDescription != null) {
if (this.profileDescription.unwrapOrNull() != null) {
json[r'profileDescription'] = this.profileDescription;
} else {
// json[r'profileDescription'] = null;
if(this.profileDescription.isSome) {
json[r'profileDescription'] = null;
}
}
if (this.projectionType != null) {
if (this.projectionType.unwrapOrNull() != null) {
json[r'projectionType'] = this.projectionType;
} else {
// json[r'projectionType'] = null;
if(this.projectionType.isSome) {
json[r'projectionType'] = null;
}
}
if (this.rating != null) {
if (this.rating.unwrapOrNull() != null) {
json[r'rating'] = this.rating;
} else {
// json[r'rating'] = null;
if(this.rating.isSome) {
json[r'rating'] = null;
}
}
if (this.state != null) {
if (this.state.unwrapOrNull() != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
if(this.state.isSome) {
json[r'state'] = null;
}
}
if (this.timeZone != null) {
if (this.timeZone.unwrapOrNull() != null) {
json[r'timeZone'] = this.timeZone;
} else {
// json[r'timeZone'] = null;
if(this.timeZone.isSome) {
json[r'timeZone'] = null;
}
}
return json;
}
@ -286,30 +334,30 @@ class SyncAssetExifV1 {
return SyncAssetExifV1(
assetId: mapValueOfType<String>(json, r'assetId')!,
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', r''),
description: mapValueOfType<String>(json, r'description'),
exifImageHeight: mapValueOfType<int>(json, r'exifImageHeight'),
exifImageWidth: mapValueOfType<int>(json, r'exifImageWidth'),
exposureTime: mapValueOfType<String>(json, r'exposureTime'),
fNumber: mapValueOfType<int>(json, r'fNumber'),
fileSizeInByte: mapValueOfType<int>(json, r'fileSizeInByte'),
focalLength: mapValueOfType<int>(json, r'focalLength'),
fps: mapValueOfType<int>(json, r'fps'),
iso: mapValueOfType<int>(json, r'iso'),
latitude: mapValueOfType<int>(json, r'latitude'),
lensModel: mapValueOfType<String>(json, r'lensModel'),
longitude: mapValueOfType<int>(json, r'longitude'),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
modifyDate: mapDateTime(json, r'modifyDate', r''),
orientation: mapValueOfType<String>(json, r'orientation'),
profileDescription: mapValueOfType<String>(json, r'profileDescription'),
projectionType: mapValueOfType<String>(json, r'projectionType'),
rating: mapValueOfType<int>(json, r'rating'),
state: mapValueOfType<String>(json, r'state'),
timeZone: mapValueOfType<String>(json, r'timeZone'),
city: Option.from(mapValueOfType<String>(json, r'city')),
country: Option.from(mapValueOfType<String>(json, r'country')),
dateTimeOriginal: Option.from(mapDateTime(json, r'dateTimeOriginal', r'')),
description: Option.from(mapValueOfType<String>(json, r'description')),
exifImageHeight: Option.from(mapValueOfType<int>(json, r'exifImageHeight')),
exifImageWidth: Option.from(mapValueOfType<int>(json, r'exifImageWidth')),
exposureTime: Option.from(mapValueOfType<String>(json, r'exposureTime')),
fNumber: Option.from(mapValueOfType<int>(json, r'fNumber')),
fileSizeInByte: Option.from(mapValueOfType<int>(json, r'fileSizeInByte')),
focalLength: Option.from(mapValueOfType<int>(json, r'focalLength')),
fps: Option.from(mapValueOfType<int>(json, r'fps')),
iso: Option.from(mapValueOfType<int>(json, r'iso')),
latitude: Option.from(mapValueOfType<int>(json, r'latitude')),
lensModel: Option.from(mapValueOfType<String>(json, r'lensModel')),
longitude: Option.from(mapValueOfType<int>(json, r'longitude')),
make: Option.from(mapValueOfType<String>(json, r'make')),
model: Option.from(mapValueOfType<String>(json, r'model')),
modifyDate: Option.from(mapDateTime(json, r'modifyDate', r'')),
orientation: Option.from(mapValueOfType<String>(json, r'orientation')),
profileDescription: Option.from(mapValueOfType<String>(json, r'profileDescription')),
projectionType: Option.from(mapValueOfType<String>(json, r'projectionType')),
rating: Option.from(mapValueOfType<int>(json, r'rating')),
state: Option.from(mapValueOfType<String>(json, r'state')),
timeZone: Option.from(mapValueOfType<String>(json, r'timeZone')),
);
}
return null;

View File

@ -14,35 +14,35 @@ class SyncAssetV1 {
/// Returns a new [SyncAssetV1] instance.
SyncAssetV1({
required this.checksum,
required this.deletedAt,
required this.fileCreatedAt,
required this.fileModifiedAt,
this.deletedAt = const None(),
this.fileCreatedAt = const None(),
this.fileModifiedAt = const None(),
required this.id,
required this.isFavorite,
required this.localDateTime,
this.localDateTime = const None(),
required this.ownerId,
required this.thumbhash,
this.thumbhash = const None(),
required this.type,
required this.visibility,
});
String checksum;
DateTime? deletedAt;
Option<DateTime> deletedAt;
DateTime? fileCreatedAt;
Option<DateTime> fileCreatedAt;
DateTime? fileModifiedAt;
Option<DateTime> fileModifiedAt;
String id;
bool isFavorite;
DateTime? localDateTime;
Option<DateTime> localDateTime;
String ownerId;
String? thumbhash;
Option<String> thumbhash;
SyncAssetV1TypeEnum type;
@ -66,14 +66,14 @@ class SyncAssetV1 {
int get hashCode =>
// ignore: unnecessary_parenthesis
(checksum.hashCode) +
(deletedAt == null ? 0 : deletedAt!.hashCode) +
(fileCreatedAt == null ? 0 : fileCreatedAt!.hashCode) +
(fileModifiedAt == null ? 0 : fileModifiedAt!.hashCode) +
(deletedAt.hashCode) +
(fileCreatedAt.hashCode) +
(fileModifiedAt.hashCode) +
(id.hashCode) +
(isFavorite.hashCode) +
(localDateTime == null ? 0 : localDateTime!.hashCode) +
(localDateTime.hashCode) +
(ownerId.hashCode) +
(thumbhash == null ? 0 : thumbhash!.hashCode) +
(thumbhash.hashCode) +
(type.hashCode) +
(visibility.hashCode);
@ -83,33 +83,43 @@ class SyncAssetV1 {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'checksum'] = this.checksum;
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
if (this.deletedAt.unwrapOrNull() != null) {
json[r'deletedAt'] = this.deletedAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'deletedAt'] = null;
if(this.deletedAt.isSome) {
json[r'deletedAt'] = null;
}
}
if (this.fileCreatedAt != null) {
json[r'fileCreatedAt'] = this.fileCreatedAt!.toUtc().toIso8601String();
if (this.fileCreatedAt.unwrapOrNull() != null) {
json[r'fileCreatedAt'] = this.fileCreatedAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'fileCreatedAt'] = null;
if(this.fileCreatedAt.isSome) {
json[r'fileCreatedAt'] = null;
}
}
if (this.fileModifiedAt != null) {
json[r'fileModifiedAt'] = this.fileModifiedAt!.toUtc().toIso8601String();
if (this.fileModifiedAt.unwrapOrNull() != null) {
json[r'fileModifiedAt'] = this.fileModifiedAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'fileModifiedAt'] = null;
if(this.fileModifiedAt.isSome) {
json[r'fileModifiedAt'] = null;
}
}
json[r'id'] = this.id;
json[r'isFavorite'] = this.isFavorite;
if (this.localDateTime != null) {
json[r'localDateTime'] = this.localDateTime!.toUtc().toIso8601String();
if (this.localDateTime.unwrapOrNull() != null) {
json[r'localDateTime'] = this.localDateTime.unwrap().toUtc().toIso8601String();
} else {
// json[r'localDateTime'] = null;
if(this.localDateTime.isSome) {
json[r'localDateTime'] = null;
}
}
json[r'ownerId'] = this.ownerId;
if (this.thumbhash != null) {
if (this.thumbhash.unwrapOrNull() != null) {
json[r'thumbhash'] = this.thumbhash;
} else {
// json[r'thumbhash'] = null;
if(this.thumbhash.isSome) {
json[r'thumbhash'] = null;
}
}
json[r'type'] = this.type;
json[r'visibility'] = this.visibility;
@ -126,14 +136,14 @@ class SyncAssetV1 {
return SyncAssetV1(
checksum: mapValueOfType<String>(json, r'checksum')!,
deletedAt: mapDateTime(json, r'deletedAt', r''),
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r''),
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r''),
deletedAt: Option.from(mapDateTime(json, r'deletedAt', r'')),
fileCreatedAt: Option.from(mapDateTime(json, r'fileCreatedAt', r'')),
fileModifiedAt: Option.from(mapDateTime(json, r'fileModifiedAt', r'')),
id: mapValueOfType<String>(json, r'id')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
localDateTime: mapDateTime(json, r'localDateTime', r''),
localDateTime: Option.from(mapDateTime(json, r'localDateTime', r'')),
ownerId: mapValueOfType<String>(json, r'ownerId')!,
thumbhash: mapValueOfType<String>(json, r'thumbhash'),
thumbhash: Option.from(mapValueOfType<String>(json, r'thumbhash')),
type: SyncAssetV1TypeEnum.fromJson(json[r'type'])!,
visibility: SyncAssetV1VisibilityEnum.fromJson(json[r'visibility'])!,
);

View File

@ -13,13 +13,13 @@ part of openapi.api;
class SyncUserV1 {
/// Returns a new [SyncUserV1] instance.
SyncUserV1({
required this.deletedAt,
this.deletedAt = const None(),
required this.email,
required this.id,
required this.name,
});
DateTime? deletedAt;
Option<DateTime> deletedAt;
String email;
@ -37,7 +37,7 @@ class SyncUserV1 {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(deletedAt == null ? 0 : deletedAt!.hashCode) +
(deletedAt.hashCode) +
(email.hashCode) +
(id.hashCode) +
(name.hashCode);
@ -47,10 +47,12 @@ class SyncUserV1 {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
if (this.deletedAt.unwrapOrNull() != null) {
json[r'deletedAt'] = this.deletedAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'deletedAt'] = null;
if(this.deletedAt.isSome) {
json[r'deletedAt'] = null;
}
}
json[r'email'] = this.email;
json[r'id'] = this.id;
@ -67,7 +69,7 @@ class SyncUserV1 {
final json = value.cast<String, dynamic>();
return SyncUserV1(
deletedAt: mapDateTime(json, r'deletedAt', r''),
deletedAt: Option.from(mapDateTime(json, r'deletedAt', r'')),
email: mapValueOfType<String>(json, r'email')!,
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,

View File

@ -15,7 +15,7 @@ class TagCreateDto {
TagCreateDto({
this.color,
required this.name,
this.parentId,
this.parentId = const None(),
});
///
@ -28,7 +28,7 @@ class TagCreateDto {
String name;
String? parentId;
Option<String> parentId;
@override
bool operator ==(Object other) => identical(this, other) || other is TagCreateDto &&
@ -41,7 +41,7 @@ class TagCreateDto {
// ignore: unnecessary_parenthesis
(color == null ? 0 : color!.hashCode) +
(name.hashCode) +
(parentId == null ? 0 : parentId!.hashCode);
(parentId.hashCode);
@override
String toString() => 'TagCreateDto[color=$color, name=$name, parentId=$parentId]';
@ -54,10 +54,12 @@ class TagCreateDto {
// json[r'color'] = null;
}
json[r'name'] = this.name;
if (this.parentId != null) {
if (this.parentId.unwrapOrNull() != null) {
json[r'parentId'] = this.parentId;
} else {
// json[r'parentId'] = null;
if(this.parentId.isSome) {
json[r'parentId'] = null;
}
}
return json;
}
@ -73,7 +75,7 @@ class TagCreateDto {
return TagCreateDto(
color: mapValueOfType<String>(json, r'color'),
name: mapValueOfType<String>(json, r'name')!,
parentId: mapValueOfType<String>(json, r'parentId'),
parentId: Option.from(mapValueOfType<String>(json, r'parentId')),
);
}
return null;

View File

@ -102,11 +102,11 @@ class TagResponseDto {
return TagResponseDto(
color: mapValueOfType<String>(json, r'color'),
createdAt: mapDateTime(json, r'createdAt', r'')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
parentId: mapValueOfType<String>(json, r'parentId'),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
value: mapValueOfType<String>(json, r'value')!,
);
}

View File

@ -13,10 +13,10 @@ part of openapi.api;
class TagUpdateDto {
/// Returns a new [TagUpdateDto] instance.
TagUpdateDto({
this.color,
this.color = const None(),
});
String? color;
Option<String> color;
@override
bool operator ==(Object other) => identical(this, other) || other is TagUpdateDto &&
@ -25,17 +25,19 @@ class TagUpdateDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(color == null ? 0 : color!.hashCode);
(color.hashCode);
@override
String toString() => 'TagUpdateDto[color=$color]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.color != null) {
if (this.color.unwrapOrNull() != null) {
json[r'color'] = this.color;
} else {
// json[r'color'] = null;
if(this.color.isSome) {
json[r'color'] = null;
}
}
return json;
}
@ -49,7 +51,7 @@ class TagUpdateDto {
final json = value.cast<String, dynamic>();
return TagUpdateDto(
color: mapValueOfType<String>(json, r'color'),
color: Option.from(mapValueOfType<String>(json, r'color')),
);
}
return null;

View File

@ -17,7 +17,7 @@ class UpdateAssetDto {
this.description,
this.isFavorite,
this.latitude,
this.livePhotoVideoId,
this.livePhotoVideoId = const None(),
this.longitude,
this.rating,
this.visibility,
@ -55,7 +55,7 @@ class UpdateAssetDto {
///
num? latitude;
String? livePhotoVideoId;
Option<String> livePhotoVideoId;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -101,7 +101,7 @@ class UpdateAssetDto {
(description == null ? 0 : description!.hashCode) +
(isFavorite == null ? 0 : isFavorite!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) +
(livePhotoVideoId.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(rating == null ? 0 : rating!.hashCode) +
(visibility == null ? 0 : visibility!.hashCode);
@ -131,10 +131,12 @@ class UpdateAssetDto {
} else {
// json[r'latitude'] = null;
}
if (this.livePhotoVideoId != null) {
if (this.livePhotoVideoId.unwrapOrNull() != null) {
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
} else {
// json[r'livePhotoVideoId'] = null;
if(this.livePhotoVideoId.isSome) {
json[r'livePhotoVideoId'] = null;
}
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
@ -167,7 +169,7 @@ class UpdateAssetDto {
description: mapValueOfType<String>(json, r'description'),
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
latitude: num.parse('${json[r'latitude']}'),
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),
livePhotoVideoId: Option.from(mapValueOfType<String>(json, r'livePhotoVideoId')),
longitude: num.parse('${json[r'longitude']}'),
rating: num.parse('${json[r'rating']}'),
visibility: AssetVisibility.fromJson(json[r'visibility']),

View File

@ -14,7 +14,7 @@ class UsageByUserDto {
/// Returns a new [UsageByUserDto] instance.
UsageByUserDto({
required this.photos,
required this.quotaSizeInBytes,
this.quotaSizeInBytes = const None(),
required this.usage,
required this.usagePhotos,
required this.usageVideos,
@ -25,7 +25,7 @@ class UsageByUserDto {
int photos;
int? quotaSizeInBytes;
Option<int> quotaSizeInBytes;
int usage;
@ -54,7 +54,7 @@ class UsageByUserDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(photos.hashCode) +
(quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) +
(quotaSizeInBytes.hashCode) +
(usage.hashCode) +
(usagePhotos.hashCode) +
(usageVideos.hashCode) +
@ -68,10 +68,12 @@ class UsageByUserDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'photos'] = this.photos;
if (this.quotaSizeInBytes != null) {
if (this.quotaSizeInBytes.unwrapOrNull() != null) {
json[r'quotaSizeInBytes'] = this.quotaSizeInBytes;
} else {
// json[r'quotaSizeInBytes'] = null;
if(this.quotaSizeInBytes.isSome) {
json[r'quotaSizeInBytes'] = null;
}
}
json[r'usage'] = this.usage;
json[r'usagePhotos'] = this.usagePhotos;
@ -92,7 +94,7 @@ class UsageByUserDto {
return UsageByUserDto(
photos: mapValueOfType<int>(json, r'photos')!,
quotaSizeInBytes: mapValueOfType<int>(json, r'quotaSizeInBytes'),
quotaSizeInBytes: Option.from(mapValueOfType<int>(json, r'quotaSizeInBytes')),
usage: mapValueOfType<int>(json, r'usage')!,
usagePhotos: mapValueOfType<int>(json, r'usagePhotos')!,
usageVideos: mapValueOfType<int>(json, r'usageVideos')!,

View File

@ -13,17 +13,17 @@ part of openapi.api;
class UserAdminCreateDto {
/// Returns a new [UserAdminCreateDto] instance.
UserAdminCreateDto({
this.avatarColor,
this.avatarColor = const None(),
required this.email,
required this.name,
this.notify,
required this.password,
this.quotaSizeInBytes,
this.quotaSizeInBytes = const None(),
this.shouldChangePassword,
this.storageLabel,
this.storageLabel = const None(),
});
UserAvatarColor? avatarColor;
Option<UserAvatarColor> avatarColor;
String email;
@ -40,7 +40,7 @@ class UserAdminCreateDto {
String password;
/// Minimum value: 0
int? quotaSizeInBytes;
Option<int> quotaSizeInBytes;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -50,7 +50,7 @@ class UserAdminCreateDto {
///
bool? shouldChangePassword;
String? storageLabel;
Option<String> storageLabel;
@override
bool operator ==(Object other) => identical(this, other) || other is UserAdminCreateDto &&
@ -66,24 +66,26 @@ class UserAdminCreateDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(avatarColor == null ? 0 : avatarColor!.hashCode) +
(avatarColor.hashCode) +
(email.hashCode) +
(name.hashCode) +
(notify == null ? 0 : notify!.hashCode) +
(password.hashCode) +
(quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) +
(quotaSizeInBytes.hashCode) +
(shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) +
(storageLabel == null ? 0 : storageLabel!.hashCode);
(storageLabel.hashCode);
@override
String toString() => 'UserAdminCreateDto[avatarColor=$avatarColor, email=$email, name=$name, notify=$notify, password=$password, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.avatarColor != null) {
if (this.avatarColor.unwrapOrNull() != null) {
json[r'avatarColor'] = this.avatarColor;
} else {
// json[r'avatarColor'] = null;
if(this.avatarColor.isSome) {
json[r'avatarColor'] = null;
}
}
json[r'email'] = this.email;
json[r'name'] = this.name;
@ -93,20 +95,24 @@ class UserAdminCreateDto {
// json[r'notify'] = null;
}
json[r'password'] = this.password;
if (this.quotaSizeInBytes != null) {
if (this.quotaSizeInBytes.unwrapOrNull() != null) {
json[r'quotaSizeInBytes'] = this.quotaSizeInBytes;
} else {
// json[r'quotaSizeInBytes'] = null;
if(this.quotaSizeInBytes.isSome) {
json[r'quotaSizeInBytes'] = null;
}
}
if (this.shouldChangePassword != null) {
json[r'shouldChangePassword'] = this.shouldChangePassword;
} else {
// json[r'shouldChangePassword'] = null;
}
if (this.storageLabel != null) {
if (this.storageLabel.unwrapOrNull() != null) {
json[r'storageLabel'] = this.storageLabel;
} else {
// json[r'storageLabel'] = null;
if(this.storageLabel.isSome) {
json[r'storageLabel'] = null;
}
}
return json;
}
@ -120,14 +126,14 @@ class UserAdminCreateDto {
final json = value.cast<String, dynamic>();
return UserAdminCreateDto(
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor']),
avatarColor: Option.from(UserAvatarColor.fromJson(json[r'avatarColor'])),
email: mapValueOfType<String>(json, r'email')!,
name: mapValueOfType<String>(json, r'name')!,
notify: mapValueOfType<bool>(json, r'notify'),
password: mapValueOfType<String>(json, r'password')!,
quotaSizeInBytes: mapValueOfType<int>(json, r'quotaSizeInBytes'),
quotaSizeInBytes: Option.from(mapValueOfType<int>(json, r'quotaSizeInBytes')),
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword'),
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
storageLabel: Option.from(mapValueOfType<String>(json, r'storageLabel')),
);
}
return null;

View File

@ -15,20 +15,20 @@ class UserAdminResponseDto {
UserAdminResponseDto({
required this.avatarColor,
required this.createdAt,
required this.deletedAt,
this.deletedAt = const None(),
required this.email,
required this.id,
required this.isAdmin,
required this.license,
this.license = const None(),
required this.name,
required this.oauthId,
required this.profileChangedAt,
required this.profileImagePath,
required this.quotaSizeInBytes,
required this.quotaUsageInBytes,
this.quotaSizeInBytes = const None(),
this.quotaUsageInBytes = const None(),
required this.shouldChangePassword,
required this.status,
required this.storageLabel,
this.storageLabel = const None(),
required this.updatedAt,
});
@ -36,7 +36,7 @@ class UserAdminResponseDto {
DateTime createdAt;
DateTime? deletedAt;
Option<DateTime> deletedAt;
String email;
@ -44,7 +44,7 @@ class UserAdminResponseDto {
bool isAdmin;
UserLicense? license;
Option<UserLicense> license;
String name;
@ -54,15 +54,15 @@ class UserAdminResponseDto {
String profileImagePath;
int? quotaSizeInBytes;
Option<int> quotaSizeInBytes;
int? quotaUsageInBytes;
Option<int> quotaUsageInBytes;
bool shouldChangePassword;
UserStatus status;
String? storageLabel;
Option<String> storageLabel;
DateTime updatedAt;
@ -91,20 +91,20 @@ class UserAdminResponseDto {
// ignore: unnecessary_parenthesis
(avatarColor.hashCode) +
(createdAt.hashCode) +
(deletedAt == null ? 0 : deletedAt!.hashCode) +
(deletedAt.hashCode) +
(email.hashCode) +
(id.hashCode) +
(isAdmin.hashCode) +
(license == null ? 0 : license!.hashCode) +
(license.hashCode) +
(name.hashCode) +
(oauthId.hashCode) +
(profileChangedAt.hashCode) +
(profileImagePath.hashCode) +
(quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) +
(quotaUsageInBytes == null ? 0 : quotaUsageInBytes!.hashCode) +
(quotaSizeInBytes.hashCode) +
(quotaUsageInBytes.hashCode) +
(shouldChangePassword.hashCode) +
(status.hashCode) +
(storageLabel == null ? 0 : storageLabel!.hashCode) +
(storageLabel.hashCode) +
(updatedAt.hashCode);
@override
@ -114,39 +114,49 @@ class UserAdminResponseDto {
final json = <String, dynamic>{};
json[r'avatarColor'] = this.avatarColor;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
if (this.deletedAt.unwrapOrNull() != null) {
json[r'deletedAt'] = this.deletedAt.unwrap().toUtc().toIso8601String();
} else {
// json[r'deletedAt'] = null;
if(this.deletedAt.isSome) {
json[r'deletedAt'] = null;
}
}
json[r'email'] = this.email;
json[r'id'] = this.id;
json[r'isAdmin'] = this.isAdmin;
if (this.license != null) {
if (this.license.unwrapOrNull() != null) {
json[r'license'] = this.license;
} else {
// json[r'license'] = null;
if(this.license.isSome) {
json[r'license'] = null;
}
}
json[r'name'] = this.name;
json[r'oauthId'] = this.oauthId;
json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String();
json[r'profileImagePath'] = this.profileImagePath;
if (this.quotaSizeInBytes != null) {
if (this.quotaSizeInBytes.unwrapOrNull() != null) {
json[r'quotaSizeInBytes'] = this.quotaSizeInBytes;
} else {
// json[r'quotaSizeInBytes'] = null;
if(this.quotaSizeInBytes.isSome) {
json[r'quotaSizeInBytes'] = null;
}
}
if (this.quotaUsageInBytes != null) {
if (this.quotaUsageInBytes.unwrapOrNull() != null) {
json[r'quotaUsageInBytes'] = this.quotaUsageInBytes;
} else {
// json[r'quotaUsageInBytes'] = null;
if(this.quotaUsageInBytes.isSome) {
json[r'quotaUsageInBytes'] = null;
}
}
json[r'shouldChangePassword'] = this.shouldChangePassword;
json[r'status'] = this.status;
if (this.storageLabel != null) {
if (this.storageLabel.unwrapOrNull() != null) {
json[r'storageLabel'] = this.storageLabel;
} else {
// json[r'storageLabel'] = null;
if(this.storageLabel.isSome) {
json[r'storageLabel'] = null;
}
}
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
@ -162,22 +172,22 @@ class UserAdminResponseDto {
return UserAdminResponseDto(
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
deletedAt: mapDateTime(json, r'deletedAt', r''),
createdAt: mapDateTime(json, r'createdAt', r'')!,
deletedAt: Option.from(mapDateTime(json, r'deletedAt', r'')),
email: mapValueOfType<String>(json, r'email')!,
id: mapValueOfType<String>(json, r'id')!,
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
license: UserLicense.fromJson(json[r'license']),
license: Option.from(UserLicense.fromJson(json[r'license'])),
name: mapValueOfType<String>(json, r'name')!,
oauthId: mapValueOfType<String>(json, r'oauthId')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
quotaSizeInBytes: mapValueOfType<int>(json, r'quotaSizeInBytes'),
quotaUsageInBytes: mapValueOfType<int>(json, r'quotaUsageInBytes'),
quotaSizeInBytes: Option.from(mapValueOfType<int>(json, r'quotaSizeInBytes')),
quotaUsageInBytes: Option.from(mapValueOfType<int>(json, r'quotaUsageInBytes')),
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
status: UserStatus.fromJson(json[r'status'])!,
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
storageLabel: Option.from(mapValueOfType<String>(json, r'storageLabel')),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;

View File

@ -13,17 +13,17 @@ part of openapi.api;
class UserAdminUpdateDto {
/// Returns a new [UserAdminUpdateDto] instance.
UserAdminUpdateDto({
this.avatarColor,
this.avatarColor = const None(),
this.email,
this.name,
this.password,
this.pinCode,
this.quotaSizeInBytes,
this.pinCode = const None(),
this.quotaSizeInBytes = const None(),
this.shouldChangePassword,
this.storageLabel,
this.storageLabel = const None(),
});
UserAvatarColor? avatarColor;
Option<UserAvatarColor> avatarColor;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -49,10 +49,10 @@ class UserAdminUpdateDto {
///
String? password;
String? pinCode;
Option<String> pinCode;
/// Minimum value: 0
int? quotaSizeInBytes;
Option<int> quotaSizeInBytes;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -62,7 +62,7 @@ class UserAdminUpdateDto {
///
bool? shouldChangePassword;
String? storageLabel;
Option<String> storageLabel;
@override
bool operator ==(Object other) => identical(this, other) || other is UserAdminUpdateDto &&
@ -78,24 +78,26 @@ class UserAdminUpdateDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(avatarColor == null ? 0 : avatarColor!.hashCode) +
(avatarColor.hashCode) +
(email == null ? 0 : email!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(password == null ? 0 : password!.hashCode) +
(pinCode == null ? 0 : pinCode!.hashCode) +
(quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) +
(pinCode.hashCode) +
(quotaSizeInBytes.hashCode) +
(shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) +
(storageLabel == null ? 0 : storageLabel!.hashCode);
(storageLabel.hashCode);
@override
String toString() => 'UserAdminUpdateDto[avatarColor=$avatarColor, email=$email, name=$name, password=$password, pinCode=$pinCode, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.avatarColor != null) {
if (this.avatarColor.unwrapOrNull() != null) {
json[r'avatarColor'] = this.avatarColor;
} else {
// json[r'avatarColor'] = null;
if(this.avatarColor.isSome) {
json[r'avatarColor'] = null;
}
}
if (this.email != null) {
json[r'email'] = this.email;
@ -112,25 +114,31 @@ class UserAdminUpdateDto {
} else {
// json[r'password'] = null;
}
if (this.pinCode != null) {
if (this.pinCode.unwrapOrNull() != null) {
json[r'pinCode'] = this.pinCode;
} else {
// json[r'pinCode'] = null;
if(this.pinCode.isSome) {
json[r'pinCode'] = null;
}
}
if (this.quotaSizeInBytes != null) {
if (this.quotaSizeInBytes.unwrapOrNull() != null) {
json[r'quotaSizeInBytes'] = this.quotaSizeInBytes;
} else {
// json[r'quotaSizeInBytes'] = null;
if(this.quotaSizeInBytes.isSome) {
json[r'quotaSizeInBytes'] = null;
}
}
if (this.shouldChangePassword != null) {
json[r'shouldChangePassword'] = this.shouldChangePassword;
} else {
// json[r'shouldChangePassword'] = null;
}
if (this.storageLabel != null) {
if (this.storageLabel.unwrapOrNull() != null) {
json[r'storageLabel'] = this.storageLabel;
} else {
// json[r'storageLabel'] = null;
if(this.storageLabel.isSome) {
json[r'storageLabel'] = null;
}
}
return json;
}
@ -144,14 +152,14 @@ class UserAdminUpdateDto {
final json = value.cast<String, dynamic>();
return UserAdminUpdateDto(
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor']),
avatarColor: Option.from(UserAvatarColor.fromJson(json[r'avatarColor'])),
email: mapValueOfType<String>(json, r'email'),
name: mapValueOfType<String>(json, r'name'),
password: mapValueOfType<String>(json, r'password'),
pinCode: mapValueOfType<String>(json, r'pinCode'),
quotaSizeInBytes: mapValueOfType<int>(json, r'quotaSizeInBytes'),
pinCode: Option.from(mapValueOfType<String>(json, r'pinCode')),
quotaSizeInBytes: Option.from(mapValueOfType<int>(json, r'quotaSizeInBytes')),
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword'),
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
storageLabel: Option.from(mapValueOfType<String>(json, r'storageLabel')),
);
}
return null;

View File

@ -57,7 +57,7 @@ class UserLicense {
final json = value.cast<String, dynamic>();
return UserLicense(
activatedAt: mapDateTime(json, r'activatedAt', r'')!,
activatedAt: mapDateTime(json, r'activatedAt', r'')!,
activationKey: mapValueOfType<String>(json, r'activationKey')!,
licenseKey: mapValueOfType<String>(json, r'licenseKey')!,
);

View File

@ -79,7 +79,7 @@ class UserResponseDto {
email: mapValueOfType<String>(json, r'email')!,
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
);
}

View File

@ -13,13 +13,13 @@ part of openapi.api;
class UserUpdateMeDto {
/// Returns a new [UserUpdateMeDto] instance.
UserUpdateMeDto({
this.avatarColor,
this.avatarColor = const None(),
this.email,
this.name,
this.password,
});
UserAvatarColor? avatarColor;
Option<UserAvatarColor> avatarColor;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -55,7 +55,7 @@ class UserUpdateMeDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(avatarColor == null ? 0 : avatarColor!.hashCode) +
(avatarColor.hashCode) +
(email == null ? 0 : email!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(password == null ? 0 : password!.hashCode);
@ -65,10 +65,12 @@ class UserUpdateMeDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.avatarColor != null) {
if (this.avatarColor.unwrapOrNull() != null) {
json[r'avatarColor'] = this.avatarColor;
} else {
// json[r'avatarColor'] = null;
if(this.avatarColor.isSome) {
json[r'avatarColor'] = null;
}
}
if (this.email != null) {
json[r'email'] = this.email;
@ -97,7 +99,7 @@ class UserUpdateMeDto {
final json = value.cast<String, dynamic>();
return UserUpdateMeDto(
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor']),
avatarColor: Option.from(UserAvatarColor.fromJson(json[r'avatarColor'])),
email: mapValueOfType<String>(json, r'email'),
name: mapValueOfType<String>(json, r'name'),
password: mapValueOfType<String>(json, r'password'),