worldhopper/lib/models/opds_server.freezed.dart

332 lines
10 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_server.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');
OPDSServer _$OPDSServerFromJson(Map<String, dynamic> json) {
return _OPDSServer.fromJson(json);
}
/// @nodoc
mixin _$OPDSServer {
/// Unique identifier for the server
String get id => throw _privateConstructorUsedError;
/// Display name for the server
String get name => throw _privateConstructorUsedError;
/// Root URL of the OPDS server
String get url => throw _privateConstructorUsedError;
/// Optional username for HTTP Basic Auth
String? get username => throw _privateConstructorUsedError;
/// Optional password for HTTP Basic Auth (stored encrypted in database)
String? get password => throw _privateConstructorUsedError;
/// Timestamp when the server was added
DateTime get createdAt => throw _privateConstructorUsedError;
/// Timestamp of the last successful sync
DateTime? get lastSyncedAt => throw _privateConstructorUsedError;
/// Serializes this OPDSServer to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of OPDSServer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$OPDSServerCopyWith<OPDSServer> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OPDSServerCopyWith<$Res> {
factory $OPDSServerCopyWith(
OPDSServer value, $Res Function(OPDSServer) then) =
_$OPDSServerCopyWithImpl<$Res, OPDSServer>;
@useResult
$Res call(
{String id,
String name,
String url,
String? username,
String? password,
DateTime createdAt,
DateTime? lastSyncedAt});
}
/// @nodoc
class _$OPDSServerCopyWithImpl<$Res, $Val extends OPDSServer>
implements $OPDSServerCopyWith<$Res> {
_$OPDSServerCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of OPDSServer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? url = null,
Object? username = freezed,
Object? password = freezed,
Object? createdAt = null,
Object? lastSyncedAt = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
url: null == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String,
username: freezed == username
? _value.username
: username // ignore: cast_nullable_to_non_nullable
as String?,
password: freezed == password
? _value.password
: password // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
lastSyncedAt: freezed == lastSyncedAt
? _value.lastSyncedAt
: lastSyncedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
) as $Val);
}
}
/// @nodoc
abstract class _$$OPDSServerImplCopyWith<$Res>
implements $OPDSServerCopyWith<$Res> {
factory _$$OPDSServerImplCopyWith(
_$OPDSServerImpl value, $Res Function(_$OPDSServerImpl) then) =
__$$OPDSServerImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String id,
String name,
String url,
String? username,
String? password,
DateTime createdAt,
DateTime? lastSyncedAt});
}
/// @nodoc
class __$$OPDSServerImplCopyWithImpl<$Res>
extends _$OPDSServerCopyWithImpl<$Res, _$OPDSServerImpl>
implements _$$OPDSServerImplCopyWith<$Res> {
__$$OPDSServerImplCopyWithImpl(
_$OPDSServerImpl _value, $Res Function(_$OPDSServerImpl) _then)
: super(_value, _then);
/// Create a copy of OPDSServer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? url = null,
Object? username = freezed,
Object? password = freezed,
Object? createdAt = null,
Object? lastSyncedAt = freezed,
}) {
return _then(_$OPDSServerImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
url: null == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String,
username: freezed == username
? _value.username
: username // ignore: cast_nullable_to_non_nullable
as String?,
password: freezed == password
? _value.password
: password // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
lastSyncedAt: freezed == lastSyncedAt
? _value.lastSyncedAt
: lastSyncedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$OPDSServerImpl implements _OPDSServer {
const _$OPDSServerImpl(
{required this.id,
required this.name,
required this.url,
this.username,
this.password,
required this.createdAt,
this.lastSyncedAt});
factory _$OPDSServerImpl.fromJson(Map<String, dynamic> json) =>
_$$OPDSServerImplFromJson(json);
/// Unique identifier for the server
@override
final String id;
/// Display name for the server
@override
final String name;
/// Root URL of the OPDS server
@override
final String url;
/// Optional username for HTTP Basic Auth
@override
final String? username;
/// Optional password for HTTP Basic Auth (stored encrypted in database)
@override
final String? password;
/// Timestamp when the server was added
@override
final DateTime createdAt;
/// Timestamp of the last successful sync
@override
final DateTime? lastSyncedAt;
@override
String toString() {
return 'OPDSServer(id: $id, name: $name, url: $url, username: $username, password: $password, createdAt: $createdAt, lastSyncedAt: $lastSyncedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$OPDSServerImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.url, url) || other.url == url) &&
(identical(other.username, username) ||
other.username == username) &&
(identical(other.password, password) ||
other.password == password) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.lastSyncedAt, lastSyncedAt) ||
other.lastSyncedAt == lastSyncedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, id, name, url, username, password, createdAt, lastSyncedAt);
/// Create a copy of OPDSServer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OPDSServerImplCopyWith<_$OPDSServerImpl> get copyWith =>
__$$OPDSServerImplCopyWithImpl<_$OPDSServerImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$OPDSServerImplToJson(
this,
);
}
}
abstract class _OPDSServer implements OPDSServer {
const factory _OPDSServer(
{required final String id,
required final String name,
required final String url,
final String? username,
final String? password,
required final DateTime createdAt,
final DateTime? lastSyncedAt}) = _$OPDSServerImpl;
factory _OPDSServer.fromJson(Map<String, dynamic> json) =
_$OPDSServerImpl.fromJson;
/// Unique identifier for the server
@override
String get id;
/// Display name for the server
@override
String get name;
/// Root URL of the OPDS server
@override
String get url;
/// Optional username for HTTP Basic Auth
@override
String? get username;
/// Optional password for HTTP Basic Auth (stored encrypted in database)
@override
String? get password;
/// Timestamp when the server was added
@override
DateTime get createdAt;
/// Timestamp of the last successful sync
@override
DateTime? get lastSyncedAt;
/// Create a copy of OPDSServer
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OPDSServerImplCopyWith<_$OPDSServerImpl> get copyWith =>
throw _privateConstructorUsedError;
}