veilidchat/lib/notifications/models/notifications_preference.freezed.dart
2024-07-26 16:51:03 -04:00

359 lines
14 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 'notifications_preference.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');
NotificationsPreference _$NotificationsPreferenceFromJson(
Map<String, dynamic> json) {
return _NotificationsPreference.fromJson(json);
}
/// @nodoc
mixin _$NotificationsPreference {
bool get displayBetaWarning => throw _privateConstructorUsedError;
bool get enableBadge => throw _privateConstructorUsedError;
bool get enableNotifications => throw _privateConstructorUsedError;
MessageNotificationContent get messageNotificationContent =>
throw _privateConstructorUsedError;
NotificationMode get onInvitationAcceptedMode =>
throw _privateConstructorUsedError;
SoundEffect get onInvitationAcceptedSound =>
throw _privateConstructorUsedError;
NotificationMode get onMessageReceivedMode =>
throw _privateConstructorUsedError;
SoundEffect get onMessageReceivedSound => throw _privateConstructorUsedError;
SoundEffect get onMessageSentSound => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$NotificationsPreferenceCopyWith<NotificationsPreference> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $NotificationsPreferenceCopyWith<$Res> {
factory $NotificationsPreferenceCopyWith(NotificationsPreference value,
$Res Function(NotificationsPreference) then) =
_$NotificationsPreferenceCopyWithImpl<$Res, NotificationsPreference>;
@useResult
$Res call(
{bool displayBetaWarning,
bool enableBadge,
bool enableNotifications,
MessageNotificationContent messageNotificationContent,
NotificationMode onInvitationAcceptedMode,
SoundEffect onInvitationAcceptedSound,
NotificationMode onMessageReceivedMode,
SoundEffect onMessageReceivedSound,
SoundEffect onMessageSentSound});
}
/// @nodoc
class _$NotificationsPreferenceCopyWithImpl<$Res,
$Val extends NotificationsPreference>
implements $NotificationsPreferenceCopyWith<$Res> {
_$NotificationsPreferenceCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? displayBetaWarning = null,
Object? enableBadge = null,
Object? enableNotifications = null,
Object? messageNotificationContent = null,
Object? onInvitationAcceptedMode = null,
Object? onInvitationAcceptedSound = null,
Object? onMessageReceivedMode = null,
Object? onMessageReceivedSound = null,
Object? onMessageSentSound = null,
}) {
return _then(_value.copyWith(
displayBetaWarning: null == displayBetaWarning
? _value.displayBetaWarning
: displayBetaWarning // ignore: cast_nullable_to_non_nullable
as bool,
enableBadge: null == enableBadge
? _value.enableBadge
: enableBadge // ignore: cast_nullable_to_non_nullable
as bool,
enableNotifications: null == enableNotifications
? _value.enableNotifications
: enableNotifications // ignore: cast_nullable_to_non_nullable
as bool,
messageNotificationContent: null == messageNotificationContent
? _value.messageNotificationContent
: messageNotificationContent // ignore: cast_nullable_to_non_nullable
as MessageNotificationContent,
onInvitationAcceptedMode: null == onInvitationAcceptedMode
? _value.onInvitationAcceptedMode
: onInvitationAcceptedMode // ignore: cast_nullable_to_non_nullable
as NotificationMode,
onInvitationAcceptedSound: null == onInvitationAcceptedSound
? _value.onInvitationAcceptedSound
: onInvitationAcceptedSound // ignore: cast_nullable_to_non_nullable
as SoundEffect,
onMessageReceivedMode: null == onMessageReceivedMode
? _value.onMessageReceivedMode
: onMessageReceivedMode // ignore: cast_nullable_to_non_nullable
as NotificationMode,
onMessageReceivedSound: null == onMessageReceivedSound
? _value.onMessageReceivedSound
: onMessageReceivedSound // ignore: cast_nullable_to_non_nullable
as SoundEffect,
onMessageSentSound: null == onMessageSentSound
? _value.onMessageSentSound
: onMessageSentSound // ignore: cast_nullable_to_non_nullable
as SoundEffect,
) as $Val);
}
}
/// @nodoc
abstract class _$$NotificationsPreferenceImplCopyWith<$Res>
implements $NotificationsPreferenceCopyWith<$Res> {
factory _$$NotificationsPreferenceImplCopyWith(
_$NotificationsPreferenceImpl value,
$Res Function(_$NotificationsPreferenceImpl) then) =
__$$NotificationsPreferenceImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{bool displayBetaWarning,
bool enableBadge,
bool enableNotifications,
MessageNotificationContent messageNotificationContent,
NotificationMode onInvitationAcceptedMode,
SoundEffect onInvitationAcceptedSound,
NotificationMode onMessageReceivedMode,
SoundEffect onMessageReceivedSound,
SoundEffect onMessageSentSound});
}
/// @nodoc
class __$$NotificationsPreferenceImplCopyWithImpl<$Res>
extends _$NotificationsPreferenceCopyWithImpl<$Res,
_$NotificationsPreferenceImpl>
implements _$$NotificationsPreferenceImplCopyWith<$Res> {
__$$NotificationsPreferenceImplCopyWithImpl(
_$NotificationsPreferenceImpl _value,
$Res Function(_$NotificationsPreferenceImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? displayBetaWarning = null,
Object? enableBadge = null,
Object? enableNotifications = null,
Object? messageNotificationContent = null,
Object? onInvitationAcceptedMode = null,
Object? onInvitationAcceptedSound = null,
Object? onMessageReceivedMode = null,
Object? onMessageReceivedSound = null,
Object? onMessageSentSound = null,
}) {
return _then(_$NotificationsPreferenceImpl(
displayBetaWarning: null == displayBetaWarning
? _value.displayBetaWarning
: displayBetaWarning // ignore: cast_nullable_to_non_nullable
as bool,
enableBadge: null == enableBadge
? _value.enableBadge
: enableBadge // ignore: cast_nullable_to_non_nullable
as bool,
enableNotifications: null == enableNotifications
? _value.enableNotifications
: enableNotifications // ignore: cast_nullable_to_non_nullable
as bool,
messageNotificationContent: null == messageNotificationContent
? _value.messageNotificationContent
: messageNotificationContent // ignore: cast_nullable_to_non_nullable
as MessageNotificationContent,
onInvitationAcceptedMode: null == onInvitationAcceptedMode
? _value.onInvitationAcceptedMode
: onInvitationAcceptedMode // ignore: cast_nullable_to_non_nullable
as NotificationMode,
onInvitationAcceptedSound: null == onInvitationAcceptedSound
? _value.onInvitationAcceptedSound
: onInvitationAcceptedSound // ignore: cast_nullable_to_non_nullable
as SoundEffect,
onMessageReceivedMode: null == onMessageReceivedMode
? _value.onMessageReceivedMode
: onMessageReceivedMode // ignore: cast_nullable_to_non_nullable
as NotificationMode,
onMessageReceivedSound: null == onMessageReceivedSound
? _value.onMessageReceivedSound
: onMessageReceivedSound // ignore: cast_nullable_to_non_nullable
as SoundEffect,
onMessageSentSound: null == onMessageSentSound
? _value.onMessageSentSound
: onMessageSentSound // ignore: cast_nullable_to_non_nullable
as SoundEffect,
));
}
}
/// @nodoc
@JsonSerializable()
class _$NotificationsPreferenceImpl implements _NotificationsPreference {
const _$NotificationsPreferenceImpl(
{this.displayBetaWarning = true,
this.enableBadge = true,
this.enableNotifications = true,
this.messageNotificationContent =
MessageNotificationContent.nameAndContent,
this.onInvitationAcceptedMode = NotificationMode.inAppOrPush,
this.onInvitationAcceptedSound = SoundEffect.beepBaDeep,
this.onMessageReceivedMode = NotificationMode.inAppOrPush,
this.onMessageReceivedSound = SoundEffect.boop,
this.onMessageSentSound = SoundEffect.bonk});
factory _$NotificationsPreferenceImpl.fromJson(Map<String, dynamic> json) =>
_$$NotificationsPreferenceImplFromJson(json);
@override
@JsonKey()
final bool displayBetaWarning;
@override
@JsonKey()
final bool enableBadge;
@override
@JsonKey()
final bool enableNotifications;
@override
@JsonKey()
final MessageNotificationContent messageNotificationContent;
@override
@JsonKey()
final NotificationMode onInvitationAcceptedMode;
@override
@JsonKey()
final SoundEffect onInvitationAcceptedSound;
@override
@JsonKey()
final NotificationMode onMessageReceivedMode;
@override
@JsonKey()
final SoundEffect onMessageReceivedSound;
@override
@JsonKey()
final SoundEffect onMessageSentSound;
@override
String toString() {
return 'NotificationsPreference(displayBetaWarning: $displayBetaWarning, enableBadge: $enableBadge, enableNotifications: $enableNotifications, messageNotificationContent: $messageNotificationContent, onInvitationAcceptedMode: $onInvitationAcceptedMode, onInvitationAcceptedSound: $onInvitationAcceptedSound, onMessageReceivedMode: $onMessageReceivedMode, onMessageReceivedSound: $onMessageReceivedSound, onMessageSentSound: $onMessageSentSound)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NotificationsPreferenceImpl &&
(identical(other.displayBetaWarning, displayBetaWarning) ||
other.displayBetaWarning == displayBetaWarning) &&
(identical(other.enableBadge, enableBadge) ||
other.enableBadge == enableBadge) &&
(identical(other.enableNotifications, enableNotifications) ||
other.enableNotifications == enableNotifications) &&
(identical(other.messageNotificationContent,
messageNotificationContent) ||
other.messageNotificationContent ==
messageNotificationContent) &&
(identical(
other.onInvitationAcceptedMode, onInvitationAcceptedMode) ||
other.onInvitationAcceptedMode == onInvitationAcceptedMode) &&
(identical(other.onInvitationAcceptedSound,
onInvitationAcceptedSound) ||
other.onInvitationAcceptedSound == onInvitationAcceptedSound) &&
(identical(other.onMessageReceivedMode, onMessageReceivedMode) ||
other.onMessageReceivedMode == onMessageReceivedMode) &&
(identical(other.onMessageReceivedSound, onMessageReceivedSound) ||
other.onMessageReceivedSound == onMessageReceivedSound) &&
(identical(other.onMessageSentSound, onMessageSentSound) ||
other.onMessageSentSound == onMessageSentSound));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
displayBetaWarning,
enableBadge,
enableNotifications,
messageNotificationContent,
onInvitationAcceptedMode,
onInvitationAcceptedSound,
onMessageReceivedMode,
onMessageReceivedSound,
onMessageSentSound);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$NotificationsPreferenceImplCopyWith<_$NotificationsPreferenceImpl>
get copyWith => __$$NotificationsPreferenceImplCopyWithImpl<
_$NotificationsPreferenceImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$NotificationsPreferenceImplToJson(
this,
);
}
}
abstract class _NotificationsPreference implements NotificationsPreference {
const factory _NotificationsPreference(
{final bool displayBetaWarning,
final bool enableBadge,
final bool enableNotifications,
final MessageNotificationContent messageNotificationContent,
final NotificationMode onInvitationAcceptedMode,
final SoundEffect onInvitationAcceptedSound,
final NotificationMode onMessageReceivedMode,
final SoundEffect onMessageReceivedSound,
final SoundEffect onMessageSentSound}) = _$NotificationsPreferenceImpl;
factory _NotificationsPreference.fromJson(Map<String, dynamic> json) =
_$NotificationsPreferenceImpl.fromJson;
@override
bool get displayBetaWarning;
@override
bool get enableBadge;
@override
bool get enableNotifications;
@override
MessageNotificationContent get messageNotificationContent;
@override
NotificationMode get onInvitationAcceptedMode;
@override
SoundEffect get onInvitationAcceptedSound;
@override
NotificationMode get onMessageReceivedMode;
@override
SoundEffect get onMessageReceivedSound;
@override
SoundEffect get onMessageSentSound;
@override
@JsonKey(ignore: true)
_$$NotificationsPreferenceImplCopyWith<_$NotificationsPreferenceImpl>
get copyWith => throw _privateConstructorUsedError;
}