worldhopper/lib/models/opds_entry.freezed.dart

522 lines
16 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'opds_entry.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
OPDSEntry _$OPDSEntryFromJson(Map<String, dynamic> json) {
return _OPDSEntry.fromJson(json);
}
/// @nodoc
mixin _$OPDSEntry {
/// Unique identifier for the entry
String get id => throw _privateConstructorUsedError;
/// Entry title
String get title => throw _privateConstructorUsedError;
/// Entry summary/description
String? get summary => throw _privateConstructorUsedError;
/// Entry content (HTML description)
String? get content => throw _privateConstructorUsedError;
/// Publication date
DateTime? get published => throw _privateConstructorUsedError;
/// Last update date
DateTime? get updated => throw _privateConstructorUsedError;
/// Authors
List<String> get authors => throw _privateConstructorUsedError;
/// Categories/tags
List<String> get categories => throw _privateConstructorUsedError;
/// All links associated with this entry
List<OPDSLink> get links => throw _privateConstructorUsedError;
/// PSE stream link (if available)
OPDSStreamLink? get streamLink => throw _privateConstructorUsedError;
/// Cover image URL
String? get coverUrl => throw _privateConstructorUsedError;
/// Thumbnail image URL
String? get thumbnailUrl => throw _privateConstructorUsedError;
/// Serializes this OPDSEntry to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of OPDSEntry
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$OPDSEntryCopyWith<OPDSEntry> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OPDSEntryCopyWith<$Res> {
factory $OPDSEntryCopyWith(OPDSEntry value, $Res Function(OPDSEntry) then) =
_$OPDSEntryCopyWithImpl<$Res, OPDSEntry>;
@useResult
$Res call(
{String id,
String title,
String? summary,
String? content,
DateTime? published,
DateTime? updated,
List<String> authors,
List<String> categories,
List<OPDSLink> links,
OPDSStreamLink? streamLink,
String? coverUrl,
String? thumbnailUrl});
$OPDSStreamLinkCopyWith<$Res>? get streamLink;
}
/// @nodoc
class _$OPDSEntryCopyWithImpl<$Res, $Val extends OPDSEntry>
implements $OPDSEntryCopyWith<$Res> {
_$OPDSEntryCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of OPDSEntry
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? summary = freezed,
Object? content = freezed,
Object? published = freezed,
Object? updated = freezed,
Object? authors = null,
Object? categories = null,
Object? links = null,
Object? streamLink = freezed,
Object? coverUrl = freezed,
Object? thumbnailUrl = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
summary: freezed == summary
? _value.summary
: summary // ignore: cast_nullable_to_non_nullable
as String?,
content: freezed == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as String?,
published: freezed == published
? _value.published
: published // ignore: cast_nullable_to_non_nullable
as DateTime?,
updated: freezed == updated
? _value.updated
: updated // ignore: cast_nullable_to_non_nullable
as DateTime?,
authors: null == authors
? _value.authors
: authors // ignore: cast_nullable_to_non_nullable
as List<String>,
categories: null == categories
? _value.categories
: categories // ignore: cast_nullable_to_non_nullable
as List<String>,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as List<OPDSLink>,
streamLink: freezed == streamLink
? _value.streamLink
: streamLink // ignore: cast_nullable_to_non_nullable
as OPDSStreamLink?,
coverUrl: freezed == coverUrl
? _value.coverUrl
: coverUrl // ignore: cast_nullable_to_non_nullable
as String?,
thumbnailUrl: freezed == thumbnailUrl
? _value.thumbnailUrl
: thumbnailUrl // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
/// Create a copy of OPDSEntry
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$OPDSStreamLinkCopyWith<$Res>? get streamLink {
if (_value.streamLink == null) {
return null;
}
return $OPDSStreamLinkCopyWith<$Res>(_value.streamLink!, (value) {
return _then(_value.copyWith(streamLink: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$OPDSEntryImplCopyWith<$Res>
implements $OPDSEntryCopyWith<$Res> {
factory _$$OPDSEntryImplCopyWith(
_$OPDSEntryImpl value, $Res Function(_$OPDSEntryImpl) then) =
__$$OPDSEntryImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String id,
String title,
String? summary,
String? content,
DateTime? published,
DateTime? updated,
List<String> authors,
List<String> categories,
List<OPDSLink> links,
OPDSStreamLink? streamLink,
String? coverUrl,
String? thumbnailUrl});
@override
$OPDSStreamLinkCopyWith<$Res>? get streamLink;
}
/// @nodoc
class __$$OPDSEntryImplCopyWithImpl<$Res>
extends _$OPDSEntryCopyWithImpl<$Res, _$OPDSEntryImpl>
implements _$$OPDSEntryImplCopyWith<$Res> {
__$$OPDSEntryImplCopyWithImpl(
_$OPDSEntryImpl _value, $Res Function(_$OPDSEntryImpl) _then)
: super(_value, _then);
/// Create a copy of OPDSEntry
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? summary = freezed,
Object? content = freezed,
Object? published = freezed,
Object? updated = freezed,
Object? authors = null,
Object? categories = null,
Object? links = null,
Object? streamLink = freezed,
Object? coverUrl = freezed,
Object? thumbnailUrl = freezed,
}) {
return _then(_$OPDSEntryImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
summary: freezed == summary
? _value.summary
: summary // ignore: cast_nullable_to_non_nullable
as String?,
content: freezed == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as String?,
published: freezed == published
? _value.published
: published // ignore: cast_nullable_to_non_nullable
as DateTime?,
updated: freezed == updated
? _value.updated
: updated // ignore: cast_nullable_to_non_nullable
as DateTime?,
authors: null == authors
? _value._authors
: authors // ignore: cast_nullable_to_non_nullable
as List<String>,
categories: null == categories
? _value._categories
: categories // ignore: cast_nullable_to_non_nullable
as List<String>,
links: null == links
? _value._links
: links // ignore: cast_nullable_to_non_nullable
as List<OPDSLink>,
streamLink: freezed == streamLink
? _value.streamLink
: streamLink // ignore: cast_nullable_to_non_nullable
as OPDSStreamLink?,
coverUrl: freezed == coverUrl
? _value.coverUrl
: coverUrl // ignore: cast_nullable_to_non_nullable
as String?,
thumbnailUrl: freezed == thumbnailUrl
? _value.thumbnailUrl
: thumbnailUrl // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$OPDSEntryImpl extends _OPDSEntry {
const _$OPDSEntryImpl(
{required this.id,
required this.title,
this.summary,
this.content,
this.published,
this.updated,
final List<String> authors = const [],
final List<String> categories = const [],
final List<OPDSLink> links = const [],
this.streamLink,
this.coverUrl,
this.thumbnailUrl})
: _authors = authors,
_categories = categories,
_links = links,
super._();
factory _$OPDSEntryImpl.fromJson(Map<String, dynamic> json) =>
_$$OPDSEntryImplFromJson(json);
/// Unique identifier for the entry
@override
final String id;
/// Entry title
@override
final String title;
/// Entry summary/description
@override
final String? summary;
/// Entry content (HTML description)
@override
final String? content;
/// Publication date
@override
final DateTime? published;
/// Last update date
@override
final DateTime? updated;
/// Authors
final List<String> _authors;
/// Authors
@override
@JsonKey()
List<String> get authors {
if (_authors is EqualUnmodifiableListView) return _authors;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_authors);
}
/// Categories/tags
final List<String> _categories;
/// Categories/tags
@override
@JsonKey()
List<String> get categories {
if (_categories is EqualUnmodifiableListView) return _categories;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_categories);
}
/// All links associated with this entry
final List<OPDSLink> _links;
/// All links associated with this entry
@override
@JsonKey()
List<OPDSLink> get links {
if (_links is EqualUnmodifiableListView) return _links;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_links);
}
/// PSE stream link (if available)
@override
final OPDSStreamLink? streamLink;
/// Cover image URL
@override
final String? coverUrl;
/// Thumbnail image URL
@override
final String? thumbnailUrl;
@override
String toString() {
return 'OPDSEntry(id: $id, title: $title, summary: $summary, content: $content, published: $published, updated: $updated, authors: $authors, categories: $categories, links: $links, streamLink: $streamLink, coverUrl: $coverUrl, thumbnailUrl: $thumbnailUrl)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$OPDSEntryImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.summary, summary) || other.summary == summary) &&
(identical(other.content, content) || other.content == content) &&
(identical(other.published, published) ||
other.published == published) &&
(identical(other.updated, updated) || other.updated == updated) &&
const DeepCollectionEquality().equals(other._authors, _authors) &&
const DeepCollectionEquality()
.equals(other._categories, _categories) &&
const DeepCollectionEquality().equals(other._links, _links) &&
(identical(other.streamLink, streamLink) ||
other.streamLink == streamLink) &&
(identical(other.coverUrl, coverUrl) ||
other.coverUrl == coverUrl) &&
(identical(other.thumbnailUrl, thumbnailUrl) ||
other.thumbnailUrl == thumbnailUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
title,
summary,
content,
published,
updated,
const DeepCollectionEquality().hash(_authors),
const DeepCollectionEquality().hash(_categories),
const DeepCollectionEquality().hash(_links),
streamLink,
coverUrl,
thumbnailUrl);
/// Create a copy of OPDSEntry
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OPDSEntryImplCopyWith<_$OPDSEntryImpl> get copyWith =>
__$$OPDSEntryImplCopyWithImpl<_$OPDSEntryImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$OPDSEntryImplToJson(
this,
);
}
}
abstract class _OPDSEntry extends OPDSEntry {
const factory _OPDSEntry(
{required final String id,
required final String title,
final String? summary,
final String? content,
final DateTime? published,
final DateTime? updated,
final List<String> authors,
final List<String> categories,
final List<OPDSLink> links,
final OPDSStreamLink? streamLink,
final String? coverUrl,
final String? thumbnailUrl}) = _$OPDSEntryImpl;
const _OPDSEntry._() : super._();
factory _OPDSEntry.fromJson(Map<String, dynamic> json) =
_$OPDSEntryImpl.fromJson;
/// Unique identifier for the entry
@override
String get id;
/// Entry title
@override
String get title;
/// Entry summary/description
@override
String? get summary;
/// Entry content (HTML description)
@override
String? get content;
/// Publication date
@override
DateTime? get published;
/// Last update date
@override
DateTime? get updated;
/// Authors
@override
List<String> get authors;
/// Categories/tags
@override
List<String> get categories;
/// All links associated with this entry
@override
List<OPDSLink> get links;
/// PSE stream link (if available)
@override
OPDSStreamLink? get streamLink;
/// Cover image URL
@override
String? get coverUrl;
/// Thumbnail image URL
@override
String? get thumbnailUrl;
/// Create a copy of OPDSEntry
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OPDSEntryImplCopyWith<_$OPDSEntryImpl> get copyWith =>
throw _privateConstructorUsedError;
}