worldhopper/lib/models/opds_server.freezed.dart
Felipe M. 71651a6b21
All checks were successful
ci/woodpecker/pr/pr Pipeline was successful
feat: koreader sync
2026-02-15 13:00:48 +01:00

452 lines
15 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;
/// Whether KOReader sync is enabled for this server
bool get koreaderSyncEnabled => throw _privateConstructorUsedError;
/// KOReader sync server URL (e.g., https://sync.example.com)
String? get koreaderSyncUrl => throw _privateConstructorUsedError;
/// KOReader sync username
String? get koreaderSyncUsername => throw _privateConstructorUsedError;
/// KOReader sync password
String? get koreaderSyncPassword => 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,
bool koreaderSyncEnabled,
String? koreaderSyncUrl,
String? koreaderSyncUsername,
String? koreaderSyncPassword});
}
/// @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,
Object? koreaderSyncEnabled = null,
Object? koreaderSyncUrl = freezed,
Object? koreaderSyncUsername = freezed,
Object? koreaderSyncPassword = 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?,
koreaderSyncEnabled: null == koreaderSyncEnabled
? _value.koreaderSyncEnabled
: koreaderSyncEnabled // ignore: cast_nullable_to_non_nullable
as bool,
koreaderSyncUrl: freezed == koreaderSyncUrl
? _value.koreaderSyncUrl
: koreaderSyncUrl // ignore: cast_nullable_to_non_nullable
as String?,
koreaderSyncUsername: freezed == koreaderSyncUsername
? _value.koreaderSyncUsername
: koreaderSyncUsername // ignore: cast_nullable_to_non_nullable
as String?,
koreaderSyncPassword: freezed == koreaderSyncPassword
? _value.koreaderSyncPassword
: koreaderSyncPassword // ignore: cast_nullable_to_non_nullable
as String?,
) 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,
bool koreaderSyncEnabled,
String? koreaderSyncUrl,
String? koreaderSyncUsername,
String? koreaderSyncPassword});
}
/// @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,
Object? koreaderSyncEnabled = null,
Object? koreaderSyncUrl = freezed,
Object? koreaderSyncUsername = freezed,
Object? koreaderSyncPassword = 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?,
koreaderSyncEnabled: null == koreaderSyncEnabled
? _value.koreaderSyncEnabled
: koreaderSyncEnabled // ignore: cast_nullable_to_non_nullable
as bool,
koreaderSyncUrl: freezed == koreaderSyncUrl
? _value.koreaderSyncUrl
: koreaderSyncUrl // ignore: cast_nullable_to_non_nullable
as String?,
koreaderSyncUsername: freezed == koreaderSyncUsername
? _value.koreaderSyncUsername
: koreaderSyncUsername // ignore: cast_nullable_to_non_nullable
as String?,
koreaderSyncPassword: freezed == koreaderSyncPassword
? _value.koreaderSyncPassword
: koreaderSyncPassword // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @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,
this.koreaderSyncEnabled = false,
this.koreaderSyncUrl,
this.koreaderSyncUsername,
this.koreaderSyncPassword});
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;
/// Whether KOReader sync is enabled for this server
@override
@JsonKey()
final bool koreaderSyncEnabled;
/// KOReader sync server URL (e.g., https://sync.example.com)
@override
final String? koreaderSyncUrl;
/// KOReader sync username
@override
final String? koreaderSyncUsername;
/// KOReader sync password
@override
final String? koreaderSyncPassword;
@override
String toString() {
return 'OPDSServer(id: $id, name: $name, url: $url, username: $username, password: $password, createdAt: $createdAt, lastSyncedAt: $lastSyncedAt, koreaderSyncEnabled: $koreaderSyncEnabled, koreaderSyncUrl: $koreaderSyncUrl, koreaderSyncUsername: $koreaderSyncUsername, koreaderSyncPassword: $koreaderSyncPassword)';
}
@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) &&
(identical(other.koreaderSyncEnabled, koreaderSyncEnabled) ||
other.koreaderSyncEnabled == koreaderSyncEnabled) &&
(identical(other.koreaderSyncUrl, koreaderSyncUrl) ||
other.koreaderSyncUrl == koreaderSyncUrl) &&
(identical(other.koreaderSyncUsername, koreaderSyncUsername) ||
other.koreaderSyncUsername == koreaderSyncUsername) &&
(identical(other.koreaderSyncPassword, koreaderSyncPassword) ||
other.koreaderSyncPassword == koreaderSyncPassword));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
url,
username,
password,
createdAt,
lastSyncedAt,
koreaderSyncEnabled,
koreaderSyncUrl,
koreaderSyncUsername,
koreaderSyncPassword);
/// 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,
final bool koreaderSyncEnabled,
final String? koreaderSyncUrl,
final String? koreaderSyncUsername,
final String? koreaderSyncPassword}) = _$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;
/// Whether KOReader sync is enabled for this server
@override
bool get koreaderSyncEnabled;
/// KOReader sync server URL (e.g., https://sync.example.com)
@override
String? get koreaderSyncUrl;
/// KOReader sync username
@override
String? get koreaderSyncUsername;
/// KOReader sync password
@override
String? get koreaderSyncPassword;
/// 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;
}