// GENERATED CODE - DO NOT MODIFY BY HAND part of 'imagini_graphql.graphql.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** Login$Query$AuthResponse$Device _$Login$Query$AuthResponse$DeviceFromJson( Map json) { return Login$Query$AuthResponse$Device()..id = json['id'] as String; } Map _$Login$Query$AuthResponse$DeviceToJson( Login$Query$AuthResponse$Device instance) => { 'id': instance.id, }; Login$Query$AuthResponse _$Login$Query$AuthResponseFromJson( Map json) { return Login$Query$AuthResponse() ..result = _$enumDecodeNullable(_$AuthResultEnumMap, json['result'], unknownValue: AuthResult.artemisUnknown) ..device = json['device'] == null ? null : Login$Query$AuthResponse$Device.fromJson( json['device'] as Map); } Map _$Login$Query$AuthResponseToJson( Login$Query$AuthResponse instance) => { 'result': _$AuthResultEnumMap[instance.result], 'device': instance.device?.toJson(), }; T _$enumDecode( Map enumValues, dynamic source, { T unknownValue, }) { if (source == null) { throw ArgumentError('A value must be provided. Supported values: ' '${enumValues.values.join(', ')}'); } final value = enumValues.entries .singleWhere((e) => e.value == source, orElse: () => null) ?.key; if (value == null && unknownValue == null) { throw ArgumentError('`$source` is not one of the supported values: ' '${enumValues.values.join(', ')}'); } return value ?? unknownValue; } T _$enumDecodeNullable( Map enumValues, dynamic source, { T unknownValue, }) { if (source == null) { return null; } return _$enumDecode(enumValues, source, unknownValue: unknownValue); } const _$AuthResultEnumMap = { AuthResult.success: 'Success', AuthResult.failure: 'Failure', AuthResult.artemisUnknown: 'ARTEMIS_UNKNOWN', }; Login$Query _$Login$QueryFromJson(Map json) { return Login$Query() ..login = json['login'] == null ? null : Login$Query$AuthResponse.fromJson( json['login'] as Map); } Map _$Login$QueryToJson(Login$Query instance) => { 'login': instance.login?.toJson(), }; CreateMediaItem$Mutation$MediaItem _$CreateMediaItem$Mutation$MediaItemFromJson( Map json) { return CreateMediaItem$Mutation$MediaItem() ..id = json['id'] as String ..createdAt = json['createdAt'] == null ? null : DateTime.parse(json['createdAt'] as String) ..updatedAt = json['updatedAt'] == null ? null : DateTime.parse(json['updatedAt'] as String) ..exifDate = json['exifDate'] == null ? null : DateTime.parse(json['exifDate'] as String) ..latitude = (json['latitude'] as num)?.toDouble() ..longitude = (json['longitude'] as num)?.toDouble() ..isVideo = json['isVideo'] as bool ..fileName = json['fileName'] as String ..origName = json['origName'] as String ..userID = json['userID'] as String; } Map _$CreateMediaItem$Mutation$MediaItemToJson( CreateMediaItem$Mutation$MediaItem instance) => { 'id': instance.id, 'createdAt': instance.createdAt?.toIso8601String(), 'updatedAt': instance.updatedAt?.toIso8601String(), 'exifDate': instance.exifDate?.toIso8601String(), 'latitude': instance.latitude, 'longitude': instance.longitude, 'isVideo': instance.isVideo, 'fileName': instance.fileName, 'origName': instance.origName, 'userID': instance.userID, }; CreateMediaItem$Mutation _$CreateMediaItem$MutationFromJson( Map json) { return CreateMediaItem$Mutation() ..createMediaItem = json['createMediaItem'] == null ? null : CreateMediaItem$Mutation$MediaItem.fromJson( json['createMediaItem'] as Map); } Map _$CreateMediaItem$MutationToJson( CreateMediaItem$Mutation instance) => { 'createMediaItem': instance.createMediaItem?.toJson(), }; Me$Query$User _$Me$Query$UserFromJson(Map json) { return Me$Query$User() ..id = json['id'] as String ..createdAt = json['createdAt'] == null ? null : DateTime.parse(json['createdAt'] as String) ..updatedAt = json['updatedAt'] == null ? null : DateTime.parse(json['updatedAt'] as String) ..email = json['email'] as String ..username = json['username'] as String ..firstName = json['firstName'] as String ..lastName = json['lastName'] as String ..role = _$enumDecodeNullable(_$RoleEnumMap, json['role'], unknownValue: Role.artemisUnknown) ..authType = _$enumDecodeNullable(_$AuthTypeEnumMap, json['authType'], unknownValue: AuthType.artemisUnknown); } Map _$Me$Query$UserToJson(Me$Query$User instance) => { 'id': instance.id, 'createdAt': instance.createdAt?.toIso8601String(), 'updatedAt': instance.updatedAt?.toIso8601String(), 'email': instance.email, 'username': instance.username, 'firstName': instance.firstName, 'lastName': instance.lastName, 'role': _$RoleEnumMap[instance.role], 'authType': _$AuthTypeEnumMap[instance.authType], }; const _$RoleEnumMap = { Role.admin: 'Admin', Role.user: 'User', Role.artemisUnknown: 'ARTEMIS_UNKNOWN', }; const _$AuthTypeEnumMap = { AuthType.local: 'Local', AuthType.ldap: 'LDAP', AuthType.artemisUnknown: 'ARTEMIS_UNKNOWN', }; Me$Query _$Me$QueryFromJson(Map json) { return Me$Query() ..me = json['me'] == null ? null : Me$Query$User.fromJson(json['me'] as Map); } Map _$Me$QueryToJson(Me$Query instance) => { 'me': instance.me?.toJson(), }; MediaItems$Query$MediaItemResponse$MediaItem _$MediaItems$Query$MediaItemResponse$MediaItemFromJson( Map json) { return MediaItems$Query$MediaItemResponse$MediaItem() ..id = json['id'] as String ..fileName = json['fileName'] as String ..latitude = (json['latitude'] as num)?.toDouble() ..longitude = (json['longitude'] as num)?.toDouble() ..isVideo = json['isVideo'] as bool ..origName = json['origName'] as String ..createdAt = json['createdAt'] == null ? null : DateTime.parse(json['createdAt'] as String); } Map _$MediaItems$Query$MediaItemResponse$MediaItemToJson( MediaItems$Query$MediaItemResponse$MediaItem instance) => { 'id': instance.id, 'fileName': instance.fileName, 'latitude': instance.latitude, 'longitude': instance.longitude, 'isVideo': instance.isVideo, 'origName': instance.origName, 'createdAt': instance.createdAt?.toIso8601String(), }; MediaItems$Query$MediaItemResponse$PageResponse _$MediaItems$Query$MediaItemResponse$PageResponseFromJson( Map json) { return MediaItems$Query$MediaItemResponse$PageResponse() ..size = json['size'] as int ..page = json['page'] as int ..total = json['total'] as int; } Map _$MediaItems$Query$MediaItemResponse$PageResponseToJson( MediaItems$Query$MediaItemResponse$PageResponse instance) => { 'size': instance.size, 'page': instance.page, 'total': instance.total, }; MediaItems$Query$MediaItemResponse _$MediaItems$Query$MediaItemResponseFromJson( Map json) { return MediaItems$Query$MediaItemResponse() ..data = (json['data'] as List) ?.map((e) => e == null ? null : MediaItems$Query$MediaItemResponse$MediaItem.fromJson( e as Map)) ?.toList() ..page = json['page'] == null ? null : MediaItems$Query$MediaItemResponse$PageResponse.fromJson( json['page'] as Map); } Map _$MediaItems$Query$MediaItemResponseToJson( MediaItems$Query$MediaItemResponse instance) => { 'data': instance.data?.map((e) => e?.toJson())?.toList(), 'page': instance.page?.toJson(), }; MediaItems$Query _$MediaItems$QueryFromJson(Map json) { return MediaItems$Query() ..mediaItems = json['mediaItems'] == null ? null : MediaItems$Query$MediaItemResponse.fromJson( json['mediaItems'] as Map); } Map _$MediaItems$QueryToJson(MediaItems$Query instance) => { 'mediaItems': instance.mediaItems?.toJson(), }; TimeFilter _$TimeFilterFromJson(Map json) { return TimeFilter( equalTo: json['equalTo'] == null ? null : DateTime.parse(json['equalTo'] as String), notEqualTo: json['notEqualTo'] == null ? null : DateTime.parse(json['notEqualTo'] as String), lessThan: json['lessThan'] == null ? null : DateTime.parse(json['lessThan'] as String), lessThanOrEqualTo: json['lessThanOrEqualTo'] == null ? null : DateTime.parse(json['lessThanOrEqualTo'] as String), greaterThan: json['greaterThan'] == null ? null : DateTime.parse(json['greaterThan'] as String), greaterThanOrEqualTo: json['greaterThanOrEqualTo'] == null ? null : DateTime.parse(json['greaterThanOrEqualTo'] as String), ); } Map _$TimeFilterToJson(TimeFilter instance) => { 'equalTo': instance.equalTo?.toIso8601String(), 'notEqualTo': instance.notEqualTo?.toIso8601String(), 'lessThan': instance.lessThan?.toIso8601String(), 'lessThanOrEqualTo': instance.lessThanOrEqualTo?.toIso8601String(), 'greaterThan': instance.greaterThan?.toIso8601String(), 'greaterThanOrEqualTo': instance.greaterThanOrEqualTo?.toIso8601String(), }; FloatFilter _$FloatFilterFromJson(Map json) { return FloatFilter( equalTo: (json['equalTo'] as num)?.toDouble(), notEqualTo: (json['notEqualTo'] as num)?.toDouble(), lessThan: (json['lessThan'] as num)?.toDouble(), lessThanOrEqualTo: (json['lessThanOrEqualTo'] as num)?.toDouble(), greaterThan: (json['greaterThan'] as num)?.toDouble(), greaterThanOrEqualTo: (json['greaterThanOrEqualTo'] as num)?.toDouble(), ); } Map _$FloatFilterToJson(FloatFilter instance) => { 'equalTo': instance.equalTo, 'notEqualTo': instance.notEqualTo, 'lessThan': instance.lessThan, 'lessThanOrEqualTo': instance.lessThanOrEqualTo, 'greaterThan': instance.greaterThan, 'greaterThanOrEqualTo': instance.greaterThanOrEqualTo, }; BooleanFilter _$BooleanFilterFromJson(Map json) { return BooleanFilter( equalTo: json['equalTo'] as bool, notEqualTo: json['notEqualTo'] as bool, ); } Map _$BooleanFilterToJson(BooleanFilter instance) => { 'equalTo': instance.equalTo, 'notEqualTo': instance.notEqualTo, }; IDFilter _$IDFilterFromJson(Map json) { return IDFilter( equalTo: json['equalTo'] as String, notEqualTo: json['notEqualTo'] as String, ); } Map _$IDFilterToJson(IDFilter instance) => { 'equalTo': instance.equalTo, 'notEqualTo': instance.notEqualTo, }; StringFilter _$StringFilterFromJson(Map json) { return StringFilter( equalTo: json['equalTo'] as String, notEqualTo: json['notEqualTo'] as String, startsWith: json['startsWith'] as String, notStartsWith: json['notStartsWith'] as String, endsWith: json['endsWith'] as String, notEndsWith: json['notEndsWith'] as String, contains: json['contains'] as String, notContains: json['notContains'] as String, ); } Map _$StringFilterToJson(StringFilter instance) => { 'equalTo': instance.equalTo, 'notEqualTo': instance.notEqualTo, 'startsWith': instance.startsWith, 'notStartsWith': instance.notStartsWith, 'endsWith': instance.endsWith, 'notEndsWith': instance.notEndsWith, 'contains': instance.contains, 'notContains': instance.notContains, }; MediaItemFilter _$MediaItemFilterFromJson(Map json) { return MediaItemFilter( id: json['id'] == null ? null : IDFilter.fromJson(json['id'] as Map), createdAt: json['createdAt'] == null ? null : TimeFilter.fromJson(json['createdAt'] as Map), updatedAt: json['updatedAt'] == null ? null : TimeFilter.fromJson(json['updatedAt'] as Map), exifDate: json['exifDate'] == null ? null : TimeFilter.fromJson(json['exifDate'] as Map), latitude: json['latitude'] == null ? null : FloatFilter.fromJson(json['latitude'] as Map), longitude: json['longitude'] == null ? null : FloatFilter.fromJson(json['longitude'] as Map), isVideo: json['isVideo'] == null ? null : BooleanFilter.fromJson(json['isVideo'] as Map), origName: json['origName'] == null ? null : StringFilter.fromJson(json['origName'] as Map), tags: json['tags'] == null ? null : TagFilter.fromJson(json['tags'] as Map), albums: json['albums'] == null ? null : AlbumFilter.fromJson(json['albums'] as Map), ); } Map _$MediaItemFilterToJson(MediaItemFilter instance) => { 'id': instance.id?.toJson(), 'createdAt': instance.createdAt?.toJson(), 'updatedAt': instance.updatedAt?.toJson(), 'exifDate': instance.exifDate?.toJson(), 'latitude': instance.latitude?.toJson(), 'longitude': instance.longitude?.toJson(), 'isVideo': instance.isVideo?.toJson(), 'origName': instance.origName?.toJson(), 'tags': instance.tags?.toJson(), 'albums': instance.albums?.toJson(), }; TagFilter _$TagFilterFromJson(Map json) { return TagFilter( id: json['id'] == null ? null : IDFilter.fromJson(json['id'] as Map), createdAt: json['createdAt'] == null ? null : TimeFilter.fromJson(json['createdAt'] as Map), updatedAt: json['updatedAt'] == null ? null : TimeFilter.fromJson(json['updatedAt'] as Map), name: json['name'] == null ? null : StringFilter.fromJson(json['name'] as Map), ); } Map _$TagFilterToJson(TagFilter instance) => { 'id': instance.id?.toJson(), 'createdAt': instance.createdAt?.toJson(), 'updatedAt': instance.updatedAt?.toJson(), 'name': instance.name?.toJson(), }; AlbumFilter _$AlbumFilterFromJson(Map json) { return AlbumFilter( id: json['id'] == null ? null : IDFilter.fromJson(json['id'] as Map), createdAt: json['createdAt'] == null ? null : TimeFilter.fromJson(json['createdAt'] as Map), updatedAt: json['updatedAt'] == null ? null : TimeFilter.fromJson(json['updatedAt'] as Map), name: json['name'] == null ? null : StringFilter.fromJson(json['name'] as Map), ); } Map _$AlbumFilterToJson(AlbumFilter instance) => { 'id': instance.id?.toJson(), 'createdAt': instance.createdAt?.toJson(), 'updatedAt': instance.updatedAt?.toJson(), 'name': instance.name?.toJson(), }; Page _$PageFromJson(Map json) { return Page( size: json['size'] as int, page: json['page'] as int, ); } Map _$PageToJson(Page instance) => { 'size': instance.size, 'page': instance.page, }; Order _$OrderFromJson(Map json) { return Order( by: json['by'] as String, direction: _$enumDecodeNullable(_$OrderDirectionEnumMap, json['direction'], unknownValue: OrderDirection.artemisUnknown), ); } Map _$OrderToJson(Order instance) => { 'by': instance.by, 'direction': _$OrderDirectionEnumMap[instance.direction], }; const _$OrderDirectionEnumMap = { OrderDirection.asc: 'ASC', OrderDirection.desc: 'DESC', OrderDirection.artemisUnknown: 'ARTEMIS_UNKNOWN', }; LoginArguments _$LoginArgumentsFromJson(Map json) { return LoginArguments( user: json['user'] as String, password: json['password'] as String, deviceID: json['deviceID'] as String, ); } Map _$LoginArgumentsToJson(LoginArguments instance) => { 'user': instance.user, 'password': instance.password, 'deviceID': instance.deviceID, }; CreateMediaItemArguments _$CreateMediaItemArgumentsFromJson( Map json) { return CreateMediaItemArguments( file: fromGraphQLUploadToDartMultipartFile(json['file'] as MultipartFile), ); } Map _$CreateMediaItemArgumentsToJson( CreateMediaItemArguments instance) => { 'file': fromDartMultipartFileToGraphQLUpload(instance.file), }; MediaItemsArguments _$MediaItemsArgumentsFromJson(Map json) { return MediaItemsArguments( order: json['order'] == null ? null : Order.fromJson(json['order'] as Map), page: json['page'] == null ? null : Page.fromJson(json['page'] as Map), filter: json['filter'] == null ? null : MediaItemFilter.fromJson(json['filter'] as Map), ); } Map _$MediaItemsArgumentsToJson( MediaItemsArguments instance) => { 'order': instance.order?.toJson(), 'page': instance.page?.toJson(), 'filter': instance.filter?.toJson(), };