// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package // 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 'background_task_state.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$SubtitleTaskEntry { BackgroundTaskSession get owner; SubtitleBackgroundTask get job; TranscriptionStatus get status; bool get terminal; bool get followingUp; String get name; String get sourceLanguage; String get targetLanguage; bool get hasTranslation; bool get recognitionTerminal; bool get recognitionAvailable; bool get translationAvailable; List get recentCues; List get resultCues; int? get completed; int? get total; String? get error; int get recognizedCues; int get translatedCues; /// Create a copy of SubtitleTaskEntry /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SubtitleTaskEntryCopyWith get copyWith => _$SubtitleTaskEntryCopyWithImpl( this as SubtitleTaskEntry, _$identity, ); @override bool operator ==(Object other) { final _this = this as SubtitleTaskEntry; return identical(this, other) || (other.runtimeType == runtimeType && other is SubtitleTaskEntry && (identical(other.owner, _this.owner) || other.owner == _this.owner) && (identical(other.job, _this.job) || other.job == _this.job) && (identical(other.status, _this.status) || other.status == _this.status) && (identical(other.terminal, _this.terminal) || other.terminal == _this.terminal) && (identical(other.followingUp, _this.followingUp) || other.followingUp == _this.followingUp) && (identical(other.name, _this.name) || other.name == _this.name) && (identical(other.sourceLanguage, _this.sourceLanguage) || other.sourceLanguage == _this.sourceLanguage) && (identical(other.targetLanguage, _this.targetLanguage) || other.targetLanguage == _this.targetLanguage) && (identical(other.hasTranslation, _this.hasTranslation) || other.hasTranslation == _this.hasTranslation) && (identical(other.recognitionTerminal, _this.recognitionTerminal) || other.recognitionTerminal == _this.recognitionTerminal) && (identical( other.recognitionAvailable, _this.recognitionAvailable, ) || other.recognitionAvailable == _this.recognitionAvailable) && (identical( other.translationAvailable, _this.translationAvailable, ) || other.translationAvailable == _this.translationAvailable) && const DeepCollectionEquality().equals( other.recentCues, _this.recentCues, ) && const DeepCollectionEquality().equals( other.resultCues, _this.resultCues, ) && (identical(other.completed, _this.completed) || other.completed == _this.completed) && (identical(other.total, _this.total) || other.total == _this.total) && (identical(other.error, _this.error) || other.error == _this.error) && (identical(other.recognizedCues, _this.recognizedCues) || other.recognizedCues == _this.recognizedCues) && (identical(other.translatedCues, _this.translatedCues) || other.translatedCues == _this.translatedCues)); } @override int get hashCode { final _this = this as SubtitleTaskEntry; return Object.hashAll([ runtimeType, _this.owner, _this.job, _this.status, _this.terminal, _this.followingUp, _this.name, _this.sourceLanguage, _this.targetLanguage, _this.hasTranslation, _this.recognitionTerminal, _this.recognitionAvailable, _this.translationAvailable, const DeepCollectionEquality().hash(_this.recentCues), const DeepCollectionEquality().hash(_this.resultCues), _this.completed, _this.total, _this.error, _this.recognizedCues, _this.translatedCues, ]); } @override String toString() { final _this = this as SubtitleTaskEntry; return 'SubtitleTaskEntry(owner: ${_this.owner}, job: ${_this.job}, status: ${_this.status}, terminal: ${_this.terminal}, followingUp: ${_this.followingUp}, name: ${_this.name}, sourceLanguage: ${_this.sourceLanguage}, targetLanguage: ${_this.targetLanguage}, hasTranslation: ${_this.hasTranslation}, recognitionTerminal: ${_this.recognitionTerminal}, recognitionAvailable: ${_this.recognitionAvailable}, translationAvailable: ${_this.translationAvailable}, recentCues: ${_this.recentCues}, resultCues: ${_this.resultCues}, completed: ${_this.completed}, total: ${_this.total}, error: ${_this.error}, recognizedCues: ${_this.recognizedCues}, translatedCues: ${_this.translatedCues})'; } } /// @nodoc abstract mixin class $SubtitleTaskEntryCopyWith<$Res> { factory $SubtitleTaskEntryCopyWith( SubtitleTaskEntry value, $Res Function(SubtitleTaskEntry) _then, ) = _$SubtitleTaskEntryCopyWithImpl; @useResult $Res call({ BackgroundTaskSession owner, SubtitleBackgroundTask job, TranscriptionStatus status, bool terminal, bool followingUp, String name, String sourceLanguage, String targetLanguage, bool hasTranslation, bool recognitionTerminal, bool recognitionAvailable, bool translationAvailable, List recentCues, List resultCues, int? completed, int? total, String? error, int recognizedCues, int translatedCues, }); $BackgroundTaskSessionCopyWith<$Res> get owner; } /// @nodoc class _$SubtitleTaskEntryCopyWithImpl<$Res> implements $SubtitleTaskEntryCopyWith<$Res> { _$SubtitleTaskEntryCopyWithImpl(this._self, this._then); final SubtitleTaskEntry _self; final $Res Function(SubtitleTaskEntry) _then; /// Create a copy of SubtitleTaskEntry /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? owner = null, Object? job = null, Object? status = null, Object? terminal = null, Object? followingUp = null, Object? name = null, Object? sourceLanguage = null, Object? targetLanguage = null, Object? hasTranslation = null, Object? recognitionTerminal = null, Object? recognitionAvailable = null, Object? translationAvailable = null, Object? recentCues = null, Object? resultCues = null, Object? completed = freezed, Object? total = freezed, Object? error = freezed, Object? recognizedCues = null, Object? translatedCues = null, }) { return _then( SubtitleTaskEntry( owner: null == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable as BackgroundTaskSession, job: null == job ? _self.job : job // ignore: cast_nullable_to_non_nullable as SubtitleBackgroundTask, status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable as TranscriptionStatus, terminal: null == terminal ? _self.terminal : terminal // ignore: cast_nullable_to_non_nullable as bool, followingUp: null == followingUp ? _self.followingUp : followingUp // ignore: cast_nullable_to_non_nullable as bool, name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, sourceLanguage: null == sourceLanguage ? _self.sourceLanguage : sourceLanguage // ignore: cast_nullable_to_non_nullable as String, targetLanguage: null == targetLanguage ? _self.targetLanguage : targetLanguage // ignore: cast_nullable_to_non_nullable as String, hasTranslation: null == hasTranslation ? _self.hasTranslation : hasTranslation // ignore: cast_nullable_to_non_nullable as bool, recognitionTerminal: null == recognitionTerminal ? _self.recognitionTerminal : recognitionTerminal // ignore: cast_nullable_to_non_nullable as bool, recognitionAvailable: null == recognitionAvailable ? _self.recognitionAvailable : recognitionAvailable // ignore: cast_nullable_to_non_nullable as bool, translationAvailable: null == translationAvailable ? _self.translationAvailable : translationAvailable // ignore: cast_nullable_to_non_nullable as bool, recentCues: null == recentCues ? _self.recentCues : recentCues // ignore: cast_nullable_to_non_nullable as List, resultCues: null == resultCues ? _self.resultCues : resultCues // ignore: cast_nullable_to_non_nullable as List, completed: freezed == completed ? _self.completed : completed // ignore: cast_nullable_to_non_nullable as int?, total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable as int?, error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable as String?, recognizedCues: null == recognizedCues ? _self.recognizedCues : recognizedCues // ignore: cast_nullable_to_non_nullable as int, translatedCues: null == translatedCues ? _self.translatedCues : translatedCues // ignore: cast_nullable_to_non_nullable as int, ), ); } /// Create a copy of SubtitleTaskEntry /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BackgroundTaskSessionCopyWith<$Res> get owner { return $BackgroundTaskSessionCopyWith<$Res>(_self.owner, (value) { return _then(_self.copyWith(owner: value)); }); } } /// Adds pattern-matching-related methods to [SubtitleTaskEntry]. extension SubtitleTaskEntryPatterns on SubtitleTaskEntry { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap( TResult Function(_SubtitleTaskEntry value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _SubtitleTaskEntry() when $default != null: return $default(_that); case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map( TResult Function(_SubtitleTaskEntry value) $default, ) { final _that = this; switch (_that) { case _SubtitleTaskEntry(): return $default(_that); case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull( TResult? Function(_SubtitleTaskEntry value)? $default, ) { final _that = this; switch (_that) { case _SubtitleTaskEntry() when $default != null: return $default(_that); case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen( TResult Function( BackgroundTaskSession owner, SubtitleBackgroundTask job, TranscriptionStatus status, bool terminal, bool followingUp, String name, String sourceLanguage, String targetLanguage, bool hasTranslation, bool recognitionTerminal, bool recognitionAvailable, bool translationAvailable, List recentCues, List resultCues, int? completed, int? total, String? error, int recognizedCues, int translatedCues, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _SubtitleTaskEntry() when $default != null: return $default( _that.owner, _that.job, _that.status, _that.terminal, _that.followingUp, _that.name, _that.sourceLanguage, _that.targetLanguage, _that.hasTranslation, _that.recognitionTerminal, _that.recognitionAvailable, _that.translationAvailable, _that.recentCues, _that.resultCues, _that.completed, _that.total, _that.error, _that.recognizedCues, _that.translatedCues, ); case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when( TResult Function( BackgroundTaskSession owner, SubtitleBackgroundTask job, TranscriptionStatus status, bool terminal, bool followingUp, String name, String sourceLanguage, String targetLanguage, bool hasTranslation, bool recognitionTerminal, bool recognitionAvailable, bool translationAvailable, List recentCues, List resultCues, int? completed, int? total, String? error, int recognizedCues, int translatedCues, ) $default, ) { final _that = this; switch (_that) { case _SubtitleTaskEntry(): return $default( _that.owner, _that.job, _that.status, _that.terminal, _that.followingUp, _that.name, _that.sourceLanguage, _that.targetLanguage, _that.hasTranslation, _that.recognitionTerminal, _that.recognitionAvailable, _that.translationAvailable, _that.recentCues, _that.resultCues, _that.completed, _that.total, _that.error, _that.recognizedCues, _that.translatedCues, ); case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull( TResult? Function( BackgroundTaskSession owner, SubtitleBackgroundTask job, TranscriptionStatus status, bool terminal, bool followingUp, String name, String sourceLanguage, String targetLanguage, bool hasTranslation, bool recognitionTerminal, bool recognitionAvailable, bool translationAvailable, List recentCues, List resultCues, int? completed, int? total, String? error, int recognizedCues, int translatedCues, )? $default, ) { final _that = this; switch (_that) { case _SubtitleTaskEntry() when $default != null: return $default( _that.owner, _that.job, _that.status, _that.terminal, _that.followingUp, _that.name, _that.sourceLanguage, _that.targetLanguage, _that.hasTranslation, _that.recognitionTerminal, _that.recognitionAvailable, _that.translationAvailable, _that.recentCues, _that.resultCues, _that.completed, _that.total, _that.error, _that.recognizedCues, _that.translatedCues, ); case _: return null; } } } /// @nodoc class _SubtitleTaskEntry implements SubtitleTaskEntry { const _SubtitleTaskEntry({ required this.owner, required this.job, required this.status, required this.terminal, required this.followingUp, required this.name, required this.sourceLanguage, required this.targetLanguage, required this.hasTranslation, required this.recognitionTerminal, required this.recognitionAvailable, required this.translationAvailable, List recentCues = const [], List resultCues = const [], this.completed, this.total, this.error, this.recognizedCues = 0, this.translatedCues = 0, }) : _recentCues = recentCues, _resultCues = resultCues; @override final BackgroundTaskSession owner; @override final SubtitleBackgroundTask job; @override final TranscriptionStatus status; @override final bool terminal; @override final bool followingUp; @override final String name; @override final String sourceLanguage; @override final String targetLanguage; @override final bool hasTranslation; @override final bool recognitionTerminal; @override final bool recognitionAvailable; @override final bool translationAvailable; final List _recentCues; @override @JsonKey() List get recentCues { if (_recentCues is EqualUnmodifiableListView) return _recentCues; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_recentCues); } final List _resultCues; @override @JsonKey() List get resultCues { if (_resultCues is EqualUnmodifiableListView) return _resultCues; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_resultCues); } @override final int? completed; @override final int? total; @override final String? error; @override @JsonKey() final int recognizedCues; @override @JsonKey() final int translatedCues; /// Create a copy of SubtitleTaskEntry /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SubtitleTaskEntryCopyWith<_SubtitleTaskEntry> get copyWith => __$SubtitleTaskEntryCopyWithImpl<_SubtitleTaskEntry>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _SubtitleTaskEntry && (identical(other.owner, owner) || other.owner == owner) && (identical(other.job, job) || other.job == job) && (identical(other.status, status) || other.status == status) && (identical(other.terminal, terminal) || other.terminal == terminal) && (identical(other.followingUp, followingUp) || other.followingUp == followingUp) && (identical(other.name, name) || other.name == name) && (identical(other.sourceLanguage, sourceLanguage) || other.sourceLanguage == sourceLanguage) && (identical(other.targetLanguage, targetLanguage) || other.targetLanguage == targetLanguage) && (identical(other.hasTranslation, hasTranslation) || other.hasTranslation == hasTranslation) && (identical(other.recognitionTerminal, recognitionTerminal) || other.recognitionTerminal == recognitionTerminal) && (identical(other.recognitionAvailable, recognitionAvailable) || other.recognitionAvailable == recognitionAvailable) && (identical(other.translationAvailable, translationAvailable) || other.translationAvailable == translationAvailable) && const DeepCollectionEquality().equals( other.recentCues, _recentCues, ) && const DeepCollectionEquality().equals( other.resultCues, _resultCues, ) && (identical(other.completed, completed) || other.completed == completed) && (identical(other.total, total) || other.total == total) && (identical(other.error, error) || other.error == error) && (identical(other.recognizedCues, recognizedCues) || other.recognizedCues == recognizedCues) && (identical(other.translatedCues, translatedCues) || other.translatedCues == translatedCues)); } @override int get hashCode { return Object.hashAll([ runtimeType, owner, job, status, terminal, followingUp, name, sourceLanguage, targetLanguage, hasTranslation, recognitionTerminal, recognitionAvailable, translationAvailable, const DeepCollectionEquality().hash(_recentCues), const DeepCollectionEquality().hash(_resultCues), completed, total, error, recognizedCues, translatedCues, ]); } @override String toString() { return 'SubtitleTaskEntry(owner: $owner, job: $job, status: $status, terminal: $terminal, followingUp: $followingUp, name: $name, sourceLanguage: $sourceLanguage, targetLanguage: $targetLanguage, hasTranslation: $hasTranslation, recognitionTerminal: $recognitionTerminal, recognitionAvailable: $recognitionAvailable, translationAvailable: $translationAvailable, recentCues: $recentCues, resultCues: $resultCues, completed: $completed, total: $total, error: $error, recognizedCues: $recognizedCues, translatedCues: $translatedCues)'; } } /// @nodoc abstract mixin class _$SubtitleTaskEntryCopyWith<$Res> implements $SubtitleTaskEntryCopyWith<$Res> { factory _$SubtitleTaskEntryCopyWith( _SubtitleTaskEntry value, $Res Function(_SubtitleTaskEntry) _then, ) = __$SubtitleTaskEntryCopyWithImpl; @override @useResult $Res call({ BackgroundTaskSession owner, SubtitleBackgroundTask job, TranscriptionStatus status, bool terminal, bool followingUp, String name, String sourceLanguage, String targetLanguage, bool hasTranslation, bool recognitionTerminal, bool recognitionAvailable, bool translationAvailable, List recentCues, List resultCues, int? completed, int? total, String? error, int recognizedCues, int translatedCues, }); @override $BackgroundTaskSessionCopyWith<$Res> get owner; } /// @nodoc class __$SubtitleTaskEntryCopyWithImpl<$Res> implements _$SubtitleTaskEntryCopyWith<$Res> { __$SubtitleTaskEntryCopyWithImpl(this._self, this._then); final _SubtitleTaskEntry _self; final $Res Function(_SubtitleTaskEntry) _then; /// Create a copy of SubtitleTaskEntry /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? owner = null, Object? job = null, Object? status = null, Object? terminal = null, Object? followingUp = null, Object? name = null, Object? sourceLanguage = null, Object? targetLanguage = null, Object? hasTranslation = null, Object? recognitionTerminal = null, Object? recognitionAvailable = null, Object? translationAvailable = null, Object? recentCues = null, Object? resultCues = null, Object? completed = freezed, Object? total = freezed, Object? error = freezed, Object? recognizedCues = null, Object? translatedCues = null, }) { return _then( _SubtitleTaskEntry( owner: null == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable as BackgroundTaskSession, job: null == job ? _self.job : job // ignore: cast_nullable_to_non_nullable as SubtitleBackgroundTask, status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable as TranscriptionStatus, terminal: null == terminal ? _self.terminal : terminal // ignore: cast_nullable_to_non_nullable as bool, followingUp: null == followingUp ? _self.followingUp : followingUp // ignore: cast_nullable_to_non_nullable as bool, name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, sourceLanguage: null == sourceLanguage ? _self.sourceLanguage : sourceLanguage // ignore: cast_nullable_to_non_nullable as String, targetLanguage: null == targetLanguage ? _self.targetLanguage : targetLanguage // ignore: cast_nullable_to_non_nullable as String, hasTranslation: null == hasTranslation ? _self.hasTranslation : hasTranslation // ignore: cast_nullable_to_non_nullable as bool, recognitionTerminal: null == recognitionTerminal ? _self.recognitionTerminal : recognitionTerminal // ignore: cast_nullable_to_non_nullable as bool, recognitionAvailable: null == recognitionAvailable ? _self.recognitionAvailable : recognitionAvailable // ignore: cast_nullable_to_non_nullable as bool, translationAvailable: null == translationAvailable ? _self.translationAvailable : translationAvailable // ignore: cast_nullable_to_non_nullable as bool, recentCues: null == recentCues ? _self._recentCues : recentCues // ignore: cast_nullable_to_non_nullable as List, resultCues: null == resultCues ? _self._resultCues : resultCues // ignore: cast_nullable_to_non_nullable as List, completed: freezed == completed ? _self.completed : completed // ignore: cast_nullable_to_non_nullable as int?, total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable as int?, error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable as String?, recognizedCues: null == recognizedCues ? _self.recognizedCues : recognizedCues // ignore: cast_nullable_to_non_nullable as int, translatedCues: null == translatedCues ? _self.translatedCues : translatedCues // ignore: cast_nullable_to_non_nullable as int, ), ); } /// Create a copy of SubtitleTaskEntry /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BackgroundTaskSessionCopyWith<$Res> get owner { return $BackgroundTaskSessionCopyWith<$Res>(_self.owner, (value) { return _then(_self.copyWith(owner: value)); }); } } /// @nodoc mixin _$RemovalTaskEntry { BackgroundTaskSession get owner; BackgroundRemovalTask get task; BackgroundRemovalStatus get status; String get name; bool get terminal; int? get completed; int? get total; String? get error; /// Create a copy of RemovalTaskEntry /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $RemovalTaskEntryCopyWith get copyWith => _$RemovalTaskEntryCopyWithImpl( this as RemovalTaskEntry, _$identity, ); @override bool operator ==(Object other) { final _this = this as RemovalTaskEntry; return identical(this, other) || (other.runtimeType == runtimeType && other is RemovalTaskEntry && (identical(other.owner, _this.owner) || other.owner == _this.owner) && (identical(other.task, _this.task) || other.task == _this.task) && (identical(other.status, _this.status) || other.status == _this.status) && (identical(other.name, _this.name) || other.name == _this.name) && (identical(other.terminal, _this.terminal) || other.terminal == _this.terminal) && (identical(other.completed, _this.completed) || other.completed == _this.completed) && (identical(other.total, _this.total) || other.total == _this.total) && (identical(other.error, _this.error) || other.error == _this.error)); } @override int get hashCode { final _this = this as RemovalTaskEntry; return Object.hash( runtimeType, _this.owner, _this.task, _this.status, _this.name, _this.terminal, _this.completed, _this.total, _this.error, ); } @override String toString() { final _this = this as RemovalTaskEntry; return 'RemovalTaskEntry(owner: ${_this.owner}, task: ${_this.task}, status: ${_this.status}, name: ${_this.name}, terminal: ${_this.terminal}, completed: ${_this.completed}, total: ${_this.total}, error: ${_this.error})'; } } /// @nodoc abstract mixin class $RemovalTaskEntryCopyWith<$Res> { factory $RemovalTaskEntryCopyWith( RemovalTaskEntry value, $Res Function(RemovalTaskEntry) _then, ) = _$RemovalTaskEntryCopyWithImpl; @useResult $Res call({ BackgroundTaskSession owner, BackgroundRemovalTask task, BackgroundRemovalStatus status, String name, bool terminal, int? completed, int? total, String? error, }); $BackgroundTaskSessionCopyWith<$Res> get owner; } /// @nodoc class _$RemovalTaskEntryCopyWithImpl<$Res> implements $RemovalTaskEntryCopyWith<$Res> { _$RemovalTaskEntryCopyWithImpl(this._self, this._then); final RemovalTaskEntry _self; final $Res Function(RemovalTaskEntry) _then; /// Create a copy of RemovalTaskEntry /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? owner = null, Object? task = null, Object? status = null, Object? name = null, Object? terminal = null, Object? completed = freezed, Object? total = freezed, Object? error = freezed, }) { return _then( RemovalTaskEntry( owner: null == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable as BackgroundTaskSession, task: null == task ? _self.task : task // ignore: cast_nullable_to_non_nullable as BackgroundRemovalTask, status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable as BackgroundRemovalStatus, name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, terminal: null == terminal ? _self.terminal : terminal // ignore: cast_nullable_to_non_nullable as bool, completed: freezed == completed ? _self.completed : completed // ignore: cast_nullable_to_non_nullable as int?, total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable as int?, error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable as String?, ), ); } /// Create a copy of RemovalTaskEntry /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BackgroundTaskSessionCopyWith<$Res> get owner { return $BackgroundTaskSessionCopyWith<$Res>(_self.owner, (value) { return _then(_self.copyWith(owner: value)); }); } } /// Adds pattern-matching-related methods to [RemovalTaskEntry]. extension RemovalTaskEntryPatterns on RemovalTaskEntry { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap( TResult Function(_RemovalTaskEntry value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _RemovalTaskEntry() when $default != null: return $default(_that); case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map( TResult Function(_RemovalTaskEntry value) $default, ) { final _that = this; switch (_that) { case _RemovalTaskEntry(): return $default(_that); case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull( TResult? Function(_RemovalTaskEntry value)? $default, ) { final _that = this; switch (_that) { case _RemovalTaskEntry() when $default != null: return $default(_that); case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen( TResult Function( BackgroundTaskSession owner, BackgroundRemovalTask task, BackgroundRemovalStatus status, String name, bool terminal, int? completed, int? total, String? error, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _RemovalTaskEntry() when $default != null: return $default( _that.owner, _that.task, _that.status, _that.name, _that.terminal, _that.completed, _that.total, _that.error, ); case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when( TResult Function( BackgroundTaskSession owner, BackgroundRemovalTask task, BackgroundRemovalStatus status, String name, bool terminal, int? completed, int? total, String? error, ) $default, ) { final _that = this; switch (_that) { case _RemovalTaskEntry(): return $default( _that.owner, _that.task, _that.status, _that.name, _that.terminal, _that.completed, _that.total, _that.error, ); case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull( TResult? Function( BackgroundTaskSession owner, BackgroundRemovalTask task, BackgroundRemovalStatus status, String name, bool terminal, int? completed, int? total, String? error, )? $default, ) { final _that = this; switch (_that) { case _RemovalTaskEntry() when $default != null: return $default( _that.owner, _that.task, _that.status, _that.name, _that.terminal, _that.completed, _that.total, _that.error, ); case _: return null; } } } /// @nodoc class _RemovalTaskEntry implements RemovalTaskEntry { const _RemovalTaskEntry({ required this.owner, required this.task, required this.status, required this.name, required this.terminal, this.completed, this.total, this.error, }); @override final BackgroundTaskSession owner; @override final BackgroundRemovalTask task; @override final BackgroundRemovalStatus status; @override final String name; @override final bool terminal; @override final int? completed; @override final int? total; @override final String? error; /// Create a copy of RemovalTaskEntry /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$RemovalTaskEntryCopyWith<_RemovalTaskEntry> get copyWith => __$RemovalTaskEntryCopyWithImpl<_RemovalTaskEntry>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _RemovalTaskEntry && (identical(other.owner, owner) || other.owner == owner) && (identical(other.task, task) || other.task == task) && (identical(other.status, status) || other.status == status) && (identical(other.name, name) || other.name == name) && (identical(other.terminal, terminal) || other.terminal == terminal) && (identical(other.completed, completed) || other.completed == completed) && (identical(other.total, total) || other.total == total) && (identical(other.error, error) || other.error == error)); } @override int get hashCode { return Object.hash( runtimeType, owner, task, status, name, terminal, completed, total, error, ); } @override String toString() { return 'RemovalTaskEntry(owner: $owner, task: $task, status: $status, name: $name, terminal: $terminal, completed: $completed, total: $total, error: $error)'; } } /// @nodoc abstract mixin class _$RemovalTaskEntryCopyWith<$Res> implements $RemovalTaskEntryCopyWith<$Res> { factory _$RemovalTaskEntryCopyWith( _RemovalTaskEntry value, $Res Function(_RemovalTaskEntry) _then, ) = __$RemovalTaskEntryCopyWithImpl; @override @useResult $Res call({ BackgroundTaskSession owner, BackgroundRemovalTask task, BackgroundRemovalStatus status, String name, bool terminal, int? completed, int? total, String? error, }); @override $BackgroundTaskSessionCopyWith<$Res> get owner; } /// @nodoc class __$RemovalTaskEntryCopyWithImpl<$Res> implements _$RemovalTaskEntryCopyWith<$Res> { __$RemovalTaskEntryCopyWithImpl(this._self, this._then); final _RemovalTaskEntry _self; final $Res Function(_RemovalTaskEntry) _then; /// Create a copy of RemovalTaskEntry /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? owner = null, Object? task = null, Object? status = null, Object? name = null, Object? terminal = null, Object? completed = freezed, Object? total = freezed, Object? error = freezed, }) { return _then( _RemovalTaskEntry( owner: null == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable as BackgroundTaskSession, task: null == task ? _self.task : task // ignore: cast_nullable_to_non_nullable as BackgroundRemovalTask, status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable as BackgroundRemovalStatus, name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, terminal: null == terminal ? _self.terminal : terminal // ignore: cast_nullable_to_non_nullable as bool, completed: freezed == completed ? _self.completed : completed // ignore: cast_nullable_to_non_nullable as int?, total: freezed == total ? _self.total : total // ignore: cast_nullable_to_non_nullable as int?, error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable as String?, ), ); } /// Create a copy of RemovalTaskEntry /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BackgroundTaskSessionCopyWith<$Res> get owner { return $BackgroundTaskSessionCopyWith<$Res>(_self.owner, (value) { return _then(_self.copyWith(owner: value)); }); } } /// @nodoc mixin _$BackgroundTasksSnapshot { List get subtitles; List get removals; int get runningCount; /// Create a copy of BackgroundTasksSnapshot /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $BackgroundTasksSnapshotCopyWith get copyWith => _$BackgroundTasksSnapshotCopyWithImpl( this as BackgroundTasksSnapshot, _$identity, ); @override bool operator ==(Object other) { final _this = this as BackgroundTasksSnapshot; return identical(this, other) || (other.runtimeType == runtimeType && other is BackgroundTasksSnapshot && const DeepCollectionEquality().equals( other.subtitles, _this.subtitles, ) && const DeepCollectionEquality().equals( other.removals, _this.removals, ) && (identical(other.runningCount, _this.runningCount) || other.runningCount == _this.runningCount)); } @override int get hashCode { final _this = this as BackgroundTasksSnapshot; return Object.hash( runtimeType, const DeepCollectionEquality().hash(_this.subtitles), const DeepCollectionEquality().hash(_this.removals), _this.runningCount, ); } @override String toString() { final _this = this as BackgroundTasksSnapshot; return 'BackgroundTasksSnapshot(subtitles: ${_this.subtitles}, removals: ${_this.removals}, runningCount: ${_this.runningCount})'; } } /// @nodoc abstract mixin class $BackgroundTasksSnapshotCopyWith<$Res> { factory $BackgroundTasksSnapshotCopyWith( BackgroundTasksSnapshot value, $Res Function(BackgroundTasksSnapshot) _then, ) = _$BackgroundTasksSnapshotCopyWithImpl; @useResult $Res call({ List subtitles, List removals, int runningCount, }); } /// @nodoc class _$BackgroundTasksSnapshotCopyWithImpl<$Res> implements $BackgroundTasksSnapshotCopyWith<$Res> { _$BackgroundTasksSnapshotCopyWithImpl(this._self, this._then); final BackgroundTasksSnapshot _self; final $Res Function(BackgroundTasksSnapshot) _then; /// Create a copy of BackgroundTasksSnapshot /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? subtitles = null, Object? removals = null, Object? runningCount = null, }) { return _then( BackgroundTasksSnapshot( subtitles: null == subtitles ? _self.subtitles : subtitles // ignore: cast_nullable_to_non_nullable as List, removals: null == removals ? _self.removals : removals // ignore: cast_nullable_to_non_nullable as List, runningCount: null == runningCount ? _self.runningCount : runningCount // ignore: cast_nullable_to_non_nullable as int, ), ); } } /// Adds pattern-matching-related methods to [BackgroundTasksSnapshot]. extension BackgroundTasksSnapshotPatterns on BackgroundTasksSnapshot { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap( TResult Function(_BackgroundTasksSnapshot value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _BackgroundTasksSnapshot() when $default != null: return $default(_that); case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map( TResult Function(_BackgroundTasksSnapshot value) $default, ) { final _that = this; switch (_that) { case _BackgroundTasksSnapshot(): return $default(_that); case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull( TResult? Function(_BackgroundTasksSnapshot value)? $default, ) { final _that = this; switch (_that) { case _BackgroundTasksSnapshot() when $default != null: return $default(_that); case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen( TResult Function( List subtitles, List removals, int runningCount, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _BackgroundTasksSnapshot() when $default != null: return $default(_that.subtitles, _that.removals, _that.runningCount); case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when( TResult Function( List subtitles, List removals, int runningCount, ) $default, ) { final _that = this; switch (_that) { case _BackgroundTasksSnapshot(): return $default(_that.subtitles, _that.removals, _that.runningCount); case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull( TResult? Function( List subtitles, List removals, int runningCount, )? $default, ) { final _that = this; switch (_that) { case _BackgroundTasksSnapshot() when $default != null: return $default(_that.subtitles, _that.removals, _that.runningCount); case _: return null; } } } /// @nodoc class _BackgroundTasksSnapshot implements BackgroundTasksSnapshot { const _BackgroundTasksSnapshot({ List subtitles = const [], List removals = const [], this.runningCount = 0, }) : _subtitles = subtitles, _removals = removals; final List _subtitles; @override @JsonKey() List get subtitles { if (_subtitles is EqualUnmodifiableListView) return _subtitles; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_subtitles); } final List _removals; @override @JsonKey() List get removals { if (_removals is EqualUnmodifiableListView) return _removals; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_removals); } @override @JsonKey() final int runningCount; /// Create a copy of BackgroundTasksSnapshot /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$BackgroundTasksSnapshotCopyWith<_BackgroundTasksSnapshot> get copyWith => __$BackgroundTasksSnapshotCopyWithImpl<_BackgroundTasksSnapshot>( this, _$identity, ); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _BackgroundTasksSnapshot && const DeepCollectionEquality().equals( other.subtitles, _subtitles, ) && const DeepCollectionEquality().equals(other.removals, _removals) && (identical(other.runningCount, runningCount) || other.runningCount == runningCount)); } @override int get hashCode { return Object.hash( runtimeType, const DeepCollectionEquality().hash(_subtitles), const DeepCollectionEquality().hash(_removals), runningCount, ); } @override String toString() { return 'BackgroundTasksSnapshot(subtitles: $subtitles, removals: $removals, runningCount: $runningCount)'; } } /// @nodoc abstract mixin class _$BackgroundTasksSnapshotCopyWith<$Res> implements $BackgroundTasksSnapshotCopyWith<$Res> { factory _$BackgroundTasksSnapshotCopyWith( _BackgroundTasksSnapshot value, $Res Function(_BackgroundTasksSnapshot) _then, ) = __$BackgroundTasksSnapshotCopyWithImpl; @override @useResult $Res call({ List subtitles, List removals, int runningCount, }); } /// @nodoc class __$BackgroundTasksSnapshotCopyWithImpl<$Res> implements _$BackgroundTasksSnapshotCopyWith<$Res> { __$BackgroundTasksSnapshotCopyWithImpl(this._self, this._then); final _BackgroundTasksSnapshot _self; final $Res Function(_BackgroundTasksSnapshot) _then; /// Create a copy of BackgroundTasksSnapshot /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? subtitles = null, Object? removals = null, Object? runningCount = null, }) { return _then( _BackgroundTasksSnapshot( subtitles: null == subtitles ? _self._subtitles : subtitles // ignore: cast_nullable_to_non_nullable as List, removals: null == removals ? _self._removals : removals // ignore: cast_nullable_to_non_nullable as List, runningCount: null == runningCount ? _self.runningCount : runningCount // ignore: cast_nullable_to_non_nullable as int, ), ); } }