// GENERATED CODE - DO NOT MODIFY BY HAND part of 'attachment.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** _$SnAttachmentImpl _$$SnAttachmentImplFromJson(Map json) => _$SnAttachmentImpl( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), deletedAt: json['deleted_at'] == null ? null : DateTime.parse(json['deleted_at'] as String), rid: json['rid'] as String, uuid: json['uuid'] as String, size: (json['size'] as num).toInt(), name: json['name'] as String, alt: json['alt'] as String, mimetype: json['mimetype'] as String, hash: json['hash'] as String, destination: (json['destination'] as num).toInt(), refCount: (json['ref_count'] as num).toInt(), contentRating: (json['content_rating'] as num?)?.toInt() ?? 0, qualityRating: (json['quality_rating'] as num?)?.toInt() ?? 0, cleanedAt: json['cleaned_at'] == null ? null : DateTime.parse(json['cleaned_at'] as String), isAnalyzed: json['is_analyzed'] as bool, isSelfRef: json['is_self_ref'] as bool, isIndexable: json['is_indexable'] as bool, ref: json['ref'] == null ? null : SnAttachment.fromJson(json['ref'] as Map), refId: (json['ref_id'] as num?)?.toInt(), pool: json['pool'] == null ? null : SnAttachmentPool.fromJson(json['pool'] as Map), poolId: (json['pool_id'] as num?)?.toInt(), accountId: (json['account_id'] as num).toInt(), thumbnailId: (json['thumbnail_id'] as num?)?.toInt(), thumbnail: json['thumbnail'] == null ? null : SnAttachment.fromJson(json['thumbnail'] as Map), compressedId: (json['compressed_id'] as num?)?.toInt(), compressed: json['compressed'] == null ? null : SnAttachment.fromJson(json['compressed'] as Map), boosts: (json['boosts'] as List?) ?.map( (e) => SnAttachmentBoost.fromJson(e as Map)) .toList() ?? const [], usermeta: json['usermeta'] as Map? ?? const {}, metadata: json['metadata'] as Map? ?? const {}, ); Map _$$SnAttachmentImplToJson(_$SnAttachmentImpl instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), 'deleted_at': instance.deletedAt?.toIso8601String(), 'rid': instance.rid, 'uuid': instance.uuid, 'size': instance.size, 'name': instance.name, 'alt': instance.alt, 'mimetype': instance.mimetype, 'hash': instance.hash, 'destination': instance.destination, 'ref_count': instance.refCount, 'content_rating': instance.contentRating, 'quality_rating': instance.qualityRating, 'cleaned_at': instance.cleanedAt?.toIso8601String(), 'is_analyzed': instance.isAnalyzed, 'is_self_ref': instance.isSelfRef, 'is_indexable': instance.isIndexable, 'ref': instance.ref?.toJson(), 'ref_id': instance.refId, 'pool': instance.pool?.toJson(), 'pool_id': instance.poolId, 'account_id': instance.accountId, 'thumbnail_id': instance.thumbnailId, 'thumbnail': instance.thumbnail?.toJson(), 'compressed_id': instance.compressedId, 'compressed': instance.compressed?.toJson(), 'boosts': instance.boosts.map((e) => e.toJson()).toList(), 'usermeta': instance.usermeta, 'metadata': instance.metadata, }; _$SnAttachmentFragmentImpl _$$SnAttachmentFragmentImplFromJson( Map json) => _$SnAttachmentFragmentImpl( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), deletedAt: json['deleted_at'] == null ? null : DateTime.parse(json['deleted_at'] as String), rid: json['rid'] as String, uuid: json['uuid'] as String, size: (json['size'] as num).toInt(), name: json['name'] as String, alt: json['alt'] as String, mimetype: json['mimetype'] as String, hash: json['hash'] as String, fingerprint: json['fingerprint'] as String?, fileChunks: (json['file_chunks'] as Map?)?.map( (k, e) => MapEntry(k, (e as num).toInt()), ) ?? const {}, fileChunksMissing: (json['file_chunks_missing'] as List?) ?.map((e) => e as String) .toList() ?? const [], ); Map _$$SnAttachmentFragmentImplToJson( _$SnAttachmentFragmentImpl instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), 'deleted_at': instance.deletedAt?.toIso8601String(), 'rid': instance.rid, 'uuid': instance.uuid, 'size': instance.size, 'name': instance.name, 'alt': instance.alt, 'mimetype': instance.mimetype, 'hash': instance.hash, 'fingerprint': instance.fingerprint, 'file_chunks': instance.fileChunks, 'file_chunks_missing': instance.fileChunksMissing, }; _$SnAttachmentPoolImpl _$$SnAttachmentPoolImplFromJson( Map json) => _$SnAttachmentPoolImpl( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), deletedAt: json['deleted_at'] == null ? null : DateTime.parse(json['deleted_at'] as String), alias: json['alias'] as String, name: json['name'] as String, description: json['description'] as String, config: json['config'] as Map, accountId: (json['account_id'] as num?)?.toInt(), ); Map _$$SnAttachmentPoolImplToJson( _$SnAttachmentPoolImpl instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), 'deleted_at': instance.deletedAt?.toIso8601String(), 'alias': instance.alias, 'name': instance.name, 'description': instance.description, 'config': instance.config, 'account_id': instance.accountId, }; _$SnAttachmentDestinationImpl _$$SnAttachmentDestinationImplFromJson( Map json) => _$SnAttachmentDestinationImpl( id: (json['id'] as num?)?.toInt() ?? 0, type: json['type'] as String, label: json['label'] as String, region: json['region'] as String, isBoost: json['is_boost'] as bool, ); Map _$$SnAttachmentDestinationImplToJson( _$SnAttachmentDestinationImpl instance) => { 'id': instance.id, 'type': instance.type, 'label': instance.label, 'region': instance.region, 'is_boost': instance.isBoost, }; _$SnAttachmentBoostImpl _$$SnAttachmentBoostImplFromJson( Map json) => _$SnAttachmentBoostImpl( id: (json['id'] as num).toInt(), createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), deletedAt: json['deleted_at'] == null ? null : DateTime.parse(json['deleted_at'] as String), status: (json['status'] as num).toInt(), destination: (json['destination'] as num).toInt(), attachmentId: (json['attachment_id'] as num).toInt(), attachment: SnAttachment.fromJson(json['attachment'] as Map), account: (json['account'] as num).toInt(), ); Map _$$SnAttachmentBoostImplToJson( _$SnAttachmentBoostImpl instance) => { 'id': instance.id, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), 'deleted_at': instance.deletedAt?.toIso8601String(), 'status': instance.status, 'destination': instance.destination, 'attachment_id': instance.attachmentId, 'attachment': instance.attachment.toJson(), 'account': instance.account, };