310 lines
11 KiB
Dart
310 lines
11 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'feed_article.dart';
|
|
|
|
// **************************************************************************
|
|
// CopyWithGenerator
|
|
// **************************************************************************
|
|
|
|
abstract class _$FeedArticleCWProxy {
|
|
FeedArticle id(String id);
|
|
|
|
FeedArticle feedId(Uri feedId);
|
|
|
|
FeedArticle fetched(DateTime fetched);
|
|
|
|
FeedArticle created(DateTime? created);
|
|
|
|
FeedArticle updated(DateTime? updated);
|
|
|
|
FeedArticle lastRead(DateTime? lastRead);
|
|
|
|
FeedArticle title(String? title);
|
|
|
|
FeedArticle authors(List<FeedAuthor>? authors);
|
|
|
|
FeedArticle tags(List<FeedCategory>? tags);
|
|
|
|
FeedArticle links(List<FeedLink>? links);
|
|
|
|
FeedArticle summaryHtml(String? summaryHtml);
|
|
|
|
FeedArticle summaryMarkdown(String? summaryMarkdown);
|
|
|
|
FeedArticle summaryPlain(String? summaryPlain);
|
|
|
|
FeedArticle contentHtml(String? contentHtml);
|
|
|
|
FeedArticle contentMarkdown(String? contentMarkdown);
|
|
|
|
FeedArticle contentPlain(String? contentPlain);
|
|
|
|
FeedArticle icon(Uri? icon);
|
|
|
|
FeedArticle siteLink(Uri? siteLink);
|
|
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `FeedArticle(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// FeedArticle(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
FeedArticle call({
|
|
String id,
|
|
Uri feedId,
|
|
DateTime fetched,
|
|
DateTime? created,
|
|
DateTime? updated,
|
|
DateTime? lastRead,
|
|
String? title,
|
|
List<FeedAuthor>? authors,
|
|
List<FeedCategory>? tags,
|
|
List<FeedLink>? links,
|
|
String? summaryHtml,
|
|
String? summaryMarkdown,
|
|
String? summaryPlain,
|
|
String? contentHtml,
|
|
String? contentMarkdown,
|
|
String? contentPlain,
|
|
Uri? icon,
|
|
Uri? siteLink,
|
|
});
|
|
}
|
|
|
|
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfFeedArticle.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfFeedArticle.copyWith.fieldName(...)`
|
|
class _$FeedArticleCWProxyImpl implements _$FeedArticleCWProxy {
|
|
const _$FeedArticleCWProxyImpl(this._value);
|
|
|
|
final FeedArticle _value;
|
|
|
|
@override
|
|
FeedArticle id(String id) => this(id: id);
|
|
|
|
@override
|
|
FeedArticle feedId(Uri feedId) => this(feedId: feedId);
|
|
|
|
@override
|
|
FeedArticle fetched(DateTime fetched) => this(fetched: fetched);
|
|
|
|
@override
|
|
FeedArticle created(DateTime? created) => this(created: created);
|
|
|
|
@override
|
|
FeedArticle updated(DateTime? updated) => this(updated: updated);
|
|
|
|
@override
|
|
FeedArticle lastRead(DateTime? lastRead) => this(lastRead: lastRead);
|
|
|
|
@override
|
|
FeedArticle title(String? title) => this(title: title);
|
|
|
|
@override
|
|
FeedArticle authors(List<FeedAuthor>? authors) => this(authors: authors);
|
|
|
|
@override
|
|
FeedArticle tags(List<FeedCategory>? tags) => this(tags: tags);
|
|
|
|
@override
|
|
FeedArticle links(List<FeedLink>? links) => this(links: links);
|
|
|
|
@override
|
|
FeedArticle summaryHtml(String? summaryHtml) =>
|
|
this(summaryHtml: summaryHtml);
|
|
|
|
@override
|
|
FeedArticle summaryMarkdown(String? summaryMarkdown) =>
|
|
this(summaryMarkdown: summaryMarkdown);
|
|
|
|
@override
|
|
FeedArticle summaryPlain(String? summaryPlain) =>
|
|
this(summaryPlain: summaryPlain);
|
|
|
|
@override
|
|
FeedArticle contentHtml(String? contentHtml) =>
|
|
this(contentHtml: contentHtml);
|
|
|
|
@override
|
|
FeedArticle contentMarkdown(String? contentMarkdown) =>
|
|
this(contentMarkdown: contentMarkdown);
|
|
|
|
@override
|
|
FeedArticle contentPlain(String? contentPlain) =>
|
|
this(contentPlain: contentPlain);
|
|
|
|
@override
|
|
FeedArticle icon(Uri? icon) => this(icon: icon);
|
|
|
|
@override
|
|
FeedArticle siteLink(Uri? siteLink) => this(siteLink: siteLink);
|
|
|
|
@override
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `FeedArticle(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// FeedArticle(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
FeedArticle call({
|
|
Object? id = const $CopyWithPlaceholder(),
|
|
Object? feedId = const $CopyWithPlaceholder(),
|
|
Object? fetched = const $CopyWithPlaceholder(),
|
|
Object? created = const $CopyWithPlaceholder(),
|
|
Object? updated = const $CopyWithPlaceholder(),
|
|
Object? lastRead = const $CopyWithPlaceholder(),
|
|
Object? title = const $CopyWithPlaceholder(),
|
|
Object? authors = const $CopyWithPlaceholder(),
|
|
Object? tags = const $CopyWithPlaceholder(),
|
|
Object? links = const $CopyWithPlaceholder(),
|
|
Object? summaryHtml = const $CopyWithPlaceholder(),
|
|
Object? summaryMarkdown = const $CopyWithPlaceholder(),
|
|
Object? summaryPlain = const $CopyWithPlaceholder(),
|
|
Object? contentHtml = const $CopyWithPlaceholder(),
|
|
Object? contentMarkdown = const $CopyWithPlaceholder(),
|
|
Object? contentPlain = const $CopyWithPlaceholder(),
|
|
Object? icon = const $CopyWithPlaceholder(),
|
|
Object? siteLink = const $CopyWithPlaceholder(),
|
|
}) {
|
|
return FeedArticle(
|
|
id: id == const $CopyWithPlaceholder()
|
|
? _value.id
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: id as String,
|
|
feedId: feedId == const $CopyWithPlaceholder()
|
|
? _value.feedId
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: feedId as Uri,
|
|
fetched: fetched == const $CopyWithPlaceholder()
|
|
? _value.fetched
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: fetched as DateTime,
|
|
created: created == const $CopyWithPlaceholder()
|
|
? _value.created
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: created as DateTime?,
|
|
updated: updated == const $CopyWithPlaceholder()
|
|
? _value.updated
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: updated as DateTime?,
|
|
lastRead: lastRead == const $CopyWithPlaceholder()
|
|
? _value.lastRead
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: lastRead as DateTime?,
|
|
title: title == const $CopyWithPlaceholder()
|
|
? _value.title
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: title as String?,
|
|
authors: authors == const $CopyWithPlaceholder()
|
|
? _value.authors
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: authors as List<FeedAuthor>?,
|
|
tags: tags == const $CopyWithPlaceholder()
|
|
? _value.tags
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: tags as List<FeedCategory>?,
|
|
links: links == const $CopyWithPlaceholder()
|
|
? _value.links
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: links as List<FeedLink>?,
|
|
summaryHtml: summaryHtml == const $CopyWithPlaceholder()
|
|
? _value.summaryHtml
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: summaryHtml as String?,
|
|
summaryMarkdown: summaryMarkdown == const $CopyWithPlaceholder()
|
|
? _value.summaryMarkdown
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: summaryMarkdown as String?,
|
|
summaryPlain: summaryPlain == const $CopyWithPlaceholder()
|
|
? _value.summaryPlain
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: summaryPlain as String?,
|
|
contentHtml: contentHtml == const $CopyWithPlaceholder()
|
|
? _value.contentHtml
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: contentHtml as String?,
|
|
contentMarkdown: contentMarkdown == const $CopyWithPlaceholder()
|
|
? _value.contentMarkdown
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: contentMarkdown as String?,
|
|
contentPlain: contentPlain == const $CopyWithPlaceholder()
|
|
? _value.contentPlain
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: contentPlain as String?,
|
|
icon: icon == const $CopyWithPlaceholder()
|
|
? _value.icon
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: icon as Uri?,
|
|
siteLink: siteLink == const $CopyWithPlaceholder()
|
|
? _value.siteLink
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: siteLink as Uri?,
|
|
);
|
|
}
|
|
}
|
|
|
|
extension $FeedArticleCopyWith on FeedArticle {
|
|
/// Returns a callable class that can be used as follows: `instanceOfFeedArticle.copyWith(...)` or like so:`instanceOfFeedArticle.copyWith.fieldName(...)`.
|
|
// ignore: library_private_types_in_public_api
|
|
_$FeedArticleCWProxy get copyWith => _$FeedArticleCWProxyImpl(this);
|
|
}
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
FeedArticle _$FeedArticleFromJson(Map<String, dynamic> json) => FeedArticle(
|
|
id: json['id'] as String,
|
|
feedId: Uri.parse(json['feedId'] as String),
|
|
fetched: DateTime.parse(json['fetched'] as String),
|
|
created: json['created'] == null
|
|
? null
|
|
: DateTime.parse(json['created'] as String),
|
|
updated: json['updated'] == null
|
|
? null
|
|
: DateTime.parse(json['updated'] as String),
|
|
lastRead: json['lastRead'] == null
|
|
? null
|
|
: DateTime.parse(json['lastRead'] as String),
|
|
title: json['title'] as String?,
|
|
authors: (json['authors'] as List<dynamic>?)
|
|
?.map((e) => FeedAuthor.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
tags: (json['tags'] as List<dynamic>?)
|
|
?.map((e) => FeedCategory.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
links: (json['links'] as List<dynamic>?)
|
|
?.map((e) => FeedLink.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
summaryHtml: json['summaryHtml'] as String?,
|
|
summaryMarkdown: json['summaryMarkdown'] as String?,
|
|
summaryPlain: json['summaryPlain'] as String?,
|
|
contentHtml: json['contentHtml'] as String?,
|
|
contentMarkdown: json['contentMarkdown'] as String?,
|
|
contentPlain: json['contentPlain'] as String?,
|
|
icon: json['icon'] == null ? null : Uri.parse(json['icon'] as String),
|
|
siteLink: json['siteLink'] == null
|
|
? null
|
|
: Uri.parse(json['siteLink'] as String),
|
|
);
|
|
|
|
Map<String, dynamic> _$FeedArticleToJson(FeedArticle instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'feedId': instance.feedId.toString(),
|
|
'fetched': instance.fetched.toIso8601String(),
|
|
'created': instance.created?.toIso8601String(),
|
|
'updated': instance.updated?.toIso8601String(),
|
|
'lastRead': instance.lastRead?.toIso8601String(),
|
|
'title': instance.title,
|
|
'authors': instance.authors?.map((e) => e.toJson()).toList(),
|
|
'tags': instance.tags?.map((e) => e.toJson()).toList(),
|
|
'links': instance.links?.map((e) => e.toJson()).toList(),
|
|
'summaryHtml': instance.summaryHtml,
|
|
'summaryMarkdown': instance.summaryMarkdown,
|
|
'summaryPlain': instance.summaryPlain,
|
|
'contentHtml': instance.contentHtml,
|
|
'contentMarkdown': instance.contentMarkdown,
|
|
'contentPlain': instance.contentPlain,
|
|
'icon': instance.icon?.toString(),
|
|
'siteLink': instance.siteLink?.toString(),
|
|
};
|