worldhopper/lib/models/opds_link.freezed.dart

237 lines
7.2 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_link.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');
OPDSLink _$OPDSLinkFromJson(Map<String, dynamic> json) {
return _OPDSLink.fromJson(json);
}
/// @nodoc
mixin _$OPDSLink {
/// Link relation type (e.g., 'self', 'start', 'subsection', 'http://opds-spec.org/acquisition')
String get rel => throw _privateConstructorUsedError;
/// Link URL
String get href => throw _privateConstructorUsedError;
/// MIME type of the linked resource
String? get type => throw _privateConstructorUsedError;
/// Link title
String? get title => throw _privateConstructorUsedError;
/// Serializes this OPDSLink to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of OPDSLink
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$OPDSLinkCopyWith<OPDSLink> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OPDSLinkCopyWith<$Res> {
factory $OPDSLinkCopyWith(OPDSLink value, $Res Function(OPDSLink) then) =
_$OPDSLinkCopyWithImpl<$Res, OPDSLink>;
@useResult
$Res call({String rel, String href, String? type, String? title});
}
/// @nodoc
class _$OPDSLinkCopyWithImpl<$Res, $Val extends OPDSLink>
implements $OPDSLinkCopyWith<$Res> {
_$OPDSLinkCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of OPDSLink
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? rel = null,
Object? href = null,
Object? type = freezed,
Object? title = freezed,
}) {
return _then(_value.copyWith(
rel: null == rel
? _value.rel
: rel // ignore: cast_nullable_to_non_nullable
as String,
href: null == href
? _value.href
: href // ignore: cast_nullable_to_non_nullable
as String,
type: freezed == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
title: freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$OPDSLinkImplCopyWith<$Res>
implements $OPDSLinkCopyWith<$Res> {
factory _$$OPDSLinkImplCopyWith(
_$OPDSLinkImpl value, $Res Function(_$OPDSLinkImpl) then) =
__$$OPDSLinkImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String rel, String href, String? type, String? title});
}
/// @nodoc
class __$$OPDSLinkImplCopyWithImpl<$Res>
extends _$OPDSLinkCopyWithImpl<$Res, _$OPDSLinkImpl>
implements _$$OPDSLinkImplCopyWith<$Res> {
__$$OPDSLinkImplCopyWithImpl(
_$OPDSLinkImpl _value, $Res Function(_$OPDSLinkImpl) _then)
: super(_value, _then);
/// Create a copy of OPDSLink
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? rel = null,
Object? href = null,
Object? type = freezed,
Object? title = freezed,
}) {
return _then(_$OPDSLinkImpl(
rel: null == rel
? _value.rel
: rel // ignore: cast_nullable_to_non_nullable
as String,
href: null == href
? _value.href
: href // ignore: cast_nullable_to_non_nullable
as String,
type: freezed == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
title: freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$OPDSLinkImpl implements _OPDSLink {
const _$OPDSLinkImpl(
{required this.rel, required this.href, this.type, this.title});
factory _$OPDSLinkImpl.fromJson(Map<String, dynamic> json) =>
_$$OPDSLinkImplFromJson(json);
/// Link relation type (e.g., 'self', 'start', 'subsection', 'http://opds-spec.org/acquisition')
@override
final String rel;
/// Link URL
@override
final String href;
/// MIME type of the linked resource
@override
final String? type;
/// Link title
@override
final String? title;
@override
String toString() {
return 'OPDSLink(rel: $rel, href: $href, type: $type, title: $title)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$OPDSLinkImpl &&
(identical(other.rel, rel) || other.rel == rel) &&
(identical(other.href, href) || other.href == href) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.title, title) || other.title == title));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, rel, href, type, title);
/// Create a copy of OPDSLink
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OPDSLinkImplCopyWith<_$OPDSLinkImpl> get copyWith =>
__$$OPDSLinkImplCopyWithImpl<_$OPDSLinkImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$OPDSLinkImplToJson(
this,
);
}
}
abstract class _OPDSLink implements OPDSLink {
const factory _OPDSLink(
{required final String rel,
required final String href,
final String? type,
final String? title}) = _$OPDSLinkImpl;
factory _OPDSLink.fromJson(Map<String, dynamic> json) =
_$OPDSLinkImpl.fromJson;
/// Link relation type (e.g., 'self', 'start', 'subsection', 'http://opds-spec.org/acquisition')
@override
String get rel;
/// Link URL
@override
String get href;
/// MIME type of the linked resource
@override
String? get type;
/// Link title
@override
String? get title;
/// Create a copy of OPDSLink
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OPDSLinkImplCopyWith<_$OPDSLinkImpl> get copyWith =>
throw _privateConstructorUsedError;
}