From 9c091a7219874352f48621e2e14e5371fe233ab0 Mon Sep 17 00:00:00 2001 From: CJPeckover Date: Fri, 6 Jun 2025 23:57:16 -0400 Subject: [PATCH] - make open-api-dart --- mobile/openapi/lib/model/metadata_search_dto.dart | 11 ++++++++++- mobile/openapi/lib/model/random_search_dto.dart | 11 ++++++++++- mobile/openapi/lib/model/smart_search_dto.dart | 11 ++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/mobile/openapi/lib/model/metadata_search_dto.dart b/mobile/openapi/lib/model/metadata_search_dto.dart index 7f1184467b..520777a45d 100644 --- a/mobile/openapi/lib/model/metadata_search_dto.dart +++ b/mobile/openapi/lib/model/metadata_search_dto.dart @@ -13,6 +13,7 @@ part of openapi.api; class MetadataSearchDto { /// Returns a new [MetadataSearchDto] instance. MetadataSearchDto({ + this.albumIds = const [], this.checksum, this.city, this.country, @@ -57,6 +58,8 @@ class MetadataSearchDto { this.withStacked, }); + List albumIds; + /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -346,6 +349,7 @@ class MetadataSearchDto { @override bool operator ==(Object other) => identical(this, other) || other is MetadataSearchDto && + _deepEquality.equals(other.albumIds, albumIds) && other.checksum == checksum && other.city == city && other.country == country && @@ -392,6 +396,7 @@ class MetadataSearchDto { @override int get hashCode => // ignore: unnecessary_parenthesis + (albumIds.hashCode) + (checksum == null ? 0 : checksum!.hashCode) + (city == null ? 0 : city!.hashCode) + (country == null ? 0 : country!.hashCode) + @@ -436,10 +441,11 @@ class MetadataSearchDto { (withStacked == null ? 0 : withStacked!.hashCode); @override - String toString() => 'MetadataSearchDto[checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, deviceAssetId=$deviceAssetId, deviceId=$deviceId, encodedVideoPath=$encodedVideoPath, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; + String toString() => 'MetadataSearchDto[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, deviceAssetId=$deviceAssetId, deviceId=$deviceId, encodedVideoPath=$encodedVideoPath, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; Map toJson() { final json = {}; + json[r'albumIds'] = this.albumIds; if (this.checksum != null) { json[r'checksum'] = this.checksum; } else { @@ -650,6 +656,9 @@ class MetadataSearchDto { final json = value.cast(); return MetadataSearchDto( + albumIds: json[r'albumIds'] is Iterable + ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) + : const [], checksum: mapValueOfType(json, r'checksum'), city: mapValueOfType(json, r'city'), country: mapValueOfType(json, r'country'), diff --git a/mobile/openapi/lib/model/random_search_dto.dart b/mobile/openapi/lib/model/random_search_dto.dart index 0284212efc..c5914f9fa3 100644 --- a/mobile/openapi/lib/model/random_search_dto.dart +++ b/mobile/openapi/lib/model/random_search_dto.dart @@ -13,6 +13,7 @@ part of openapi.api; class RandomSearchDto { /// Returns a new [RandomSearchDto] instance. RandomSearchDto({ + this.albumIds = const [], this.city, this.country, this.createdAfter, @@ -46,6 +47,8 @@ class RandomSearchDto { this.withStacked, }); + List albumIds; + String? city; String? country; @@ -252,6 +255,7 @@ class RandomSearchDto { @override bool operator ==(Object other) => identical(this, other) || other is RandomSearchDto && + _deepEquality.equals(other.albumIds, albumIds) && other.city == city && other.country == country && other.createdAfter == createdAfter && @@ -287,6 +291,7 @@ class RandomSearchDto { @override int get hashCode => // ignore: unnecessary_parenthesis + (albumIds.hashCode) + (city == null ? 0 : city!.hashCode) + (country == null ? 0 : country!.hashCode) + (createdAfter == null ? 0 : createdAfter!.hashCode) + @@ -320,10 +325,11 @@ class RandomSearchDto { (withStacked == null ? 0 : withStacked!.hashCode); @override - String toString() => 'RandomSearchDto[city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; + String toString() => 'RandomSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; Map toJson() { final json = {}; + json[r'albumIds'] = this.albumIds; if (this.city != null) { json[r'city'] = this.city; } else { @@ -483,6 +489,9 @@ class RandomSearchDto { final json = value.cast(); return RandomSearchDto( + albumIds: json[r'albumIds'] is Iterable + ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) + : const [], city: mapValueOfType(json, r'city'), country: mapValueOfType(json, r'country'), createdAfter: mapDateTime(json, r'createdAfter', r''), diff --git a/mobile/openapi/lib/model/smart_search_dto.dart b/mobile/openapi/lib/model/smart_search_dto.dart index a915d97b31..c221340553 100644 --- a/mobile/openapi/lib/model/smart_search_dto.dart +++ b/mobile/openapi/lib/model/smart_search_dto.dart @@ -13,6 +13,7 @@ part of openapi.api; class SmartSearchDto { /// Returns a new [SmartSearchDto] instance. SmartSearchDto({ + this.albumIds = const [], this.city, this.country, this.createdAfter, @@ -47,6 +48,8 @@ class SmartSearchDto { this.withExif, }); + List albumIds; + String? city; String? country; @@ -256,6 +259,7 @@ class SmartSearchDto { @override bool operator ==(Object other) => identical(this, other) || other is SmartSearchDto && + _deepEquality.equals(other.albumIds, albumIds) && other.city == city && other.country == country && other.createdAfter == createdAfter && @@ -292,6 +296,7 @@ class SmartSearchDto { @override int get hashCode => // ignore: unnecessary_parenthesis + (albumIds.hashCode) + (city == null ? 0 : city!.hashCode) + (country == null ? 0 : country!.hashCode) + (createdAfter == null ? 0 : createdAfter!.hashCode) + @@ -326,10 +331,11 @@ class SmartSearchDto { (withExif == null ? 0 : withExif!.hashCode); @override - String toString() => 'SmartSearchDto[city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, language=$language, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, page=$page, personIds=$personIds, query=$query, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif]'; + String toString() => 'SmartSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, language=$language, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, page=$page, personIds=$personIds, query=$query, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif]'; Map toJson() { final json = {}; + json[r'albumIds'] = this.albumIds; if (this.city != null) { json[r'city'] = this.city; } else { @@ -490,6 +496,9 @@ class SmartSearchDto { final json = value.cast(); return SmartSearchDto( + albumIds: json[r'albumIds'] is Iterable + ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) + : const [], city: mapValueOfType(json, r'city'), country: mapValueOfType(json, r'country'), createdAfter: mapDateTime(json, r'createdAfter', r''),