// 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 'processing_resource_state.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$ProcessingResourcesSnapshot { List get installs; Set get paused; Map get rates; bool get subtitleDownloading; bool get subtitlePaused; int get subtitleDownloadedBytes; int get subtitleTotalBytes; int get subtitleBytesPerSecond; /// Create a copy of ProcessingResourcesSnapshot /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ProcessingResourcesSnapshotCopyWith get copyWith => _$ProcessingResourcesSnapshotCopyWithImpl( this as ProcessingResourcesSnapshot, _$identity, ); @override bool operator ==(Object other) { final _this = this as ProcessingResourcesSnapshot; return identical(this, other) || (other.runtimeType == runtimeType && other is ProcessingResourcesSnapshot && const DeepCollectionEquality().equals( other.installs, _this.installs, ) && const DeepCollectionEquality().equals(other.paused, _this.paused) && const DeepCollectionEquality().equals(other.rates, _this.rates) && (identical(other.subtitleDownloading, _this.subtitleDownloading) || other.subtitleDownloading == _this.subtitleDownloading) && (identical(other.subtitlePaused, _this.subtitlePaused) || other.subtitlePaused == _this.subtitlePaused) && (identical( other.subtitleDownloadedBytes, _this.subtitleDownloadedBytes, ) || other.subtitleDownloadedBytes == _this.subtitleDownloadedBytes) && (identical(other.subtitleTotalBytes, _this.subtitleTotalBytes) || other.subtitleTotalBytes == _this.subtitleTotalBytes) && (identical( other.subtitleBytesPerSecond, _this.subtitleBytesPerSecond, ) || other.subtitleBytesPerSecond == _this.subtitleBytesPerSecond)); } @override int get hashCode { final _this = this as ProcessingResourcesSnapshot; return Object.hash( runtimeType, const DeepCollectionEquality().hash(_this.installs), const DeepCollectionEquality().hash(_this.paused), const DeepCollectionEquality().hash(_this.rates), _this.subtitleDownloading, _this.subtitlePaused, _this.subtitleDownloadedBytes, _this.subtitleTotalBytes, _this.subtitleBytesPerSecond, ); } @override String toString() { final _this = this as ProcessingResourcesSnapshot; return 'ProcessingResourcesSnapshot(installs: ${_this.installs}, paused: ${_this.paused}, rates: ${_this.rates}, subtitleDownloading: ${_this.subtitleDownloading}, subtitlePaused: ${_this.subtitlePaused}, subtitleDownloadedBytes: ${_this.subtitleDownloadedBytes}, subtitleTotalBytes: ${_this.subtitleTotalBytes}, subtitleBytesPerSecond: ${_this.subtitleBytesPerSecond})'; } } /// @nodoc abstract mixin class $ProcessingResourcesSnapshotCopyWith<$Res> { factory $ProcessingResourcesSnapshotCopyWith( ProcessingResourcesSnapshot value, $Res Function(ProcessingResourcesSnapshot) _then, ) = _$ProcessingResourcesSnapshotCopyWithImpl; @useResult $Res call({ List installs, Set paused, Map rates, bool subtitleDownloading, bool subtitlePaused, int subtitleDownloadedBytes, int subtitleTotalBytes, int subtitleBytesPerSecond, }); } /// @nodoc class _$ProcessingResourcesSnapshotCopyWithImpl<$Res> implements $ProcessingResourcesSnapshotCopyWith<$Res> { _$ProcessingResourcesSnapshotCopyWithImpl(this._self, this._then); final ProcessingResourcesSnapshot _self; final $Res Function(ProcessingResourcesSnapshot) _then; /// Create a copy of ProcessingResourcesSnapshot /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? installs = null, Object? paused = null, Object? rates = null, Object? subtitleDownloading = null, Object? subtitlePaused = null, Object? subtitleDownloadedBytes = null, Object? subtitleTotalBytes = null, Object? subtitleBytesPerSecond = null, }) { return _then( ProcessingResourcesSnapshot( installs: null == installs ? _self.installs : installs // ignore: cast_nullable_to_non_nullable as List, paused: null == paused ? _self.paused : paused // ignore: cast_nullable_to_non_nullable as Set, rates: null == rates ? _self.rates : rates // ignore: cast_nullable_to_non_nullable as Map, subtitleDownloading: null == subtitleDownloading ? _self.subtitleDownloading : subtitleDownloading // ignore: cast_nullable_to_non_nullable as bool, subtitlePaused: null == subtitlePaused ? _self.subtitlePaused : subtitlePaused // ignore: cast_nullable_to_non_nullable as bool, subtitleDownloadedBytes: null == subtitleDownloadedBytes ? _self.subtitleDownloadedBytes : subtitleDownloadedBytes // ignore: cast_nullable_to_non_nullable as int, subtitleTotalBytes: null == subtitleTotalBytes ? _self.subtitleTotalBytes : subtitleTotalBytes // ignore: cast_nullable_to_non_nullable as int, subtitleBytesPerSecond: null == subtitleBytesPerSecond ? _self.subtitleBytesPerSecond : subtitleBytesPerSecond // ignore: cast_nullable_to_non_nullable as int, ), ); } } /// Adds pattern-matching-related methods to [ProcessingResourcesSnapshot]. extension ProcessingResourcesSnapshotPatterns on ProcessingResourcesSnapshot { /// 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(_ProcessingResourcesSnapshot value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _ProcessingResourcesSnapshot() 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(_ProcessingResourcesSnapshot value) $default, ) { final _that = this; switch (_that) { case _ProcessingResourcesSnapshot(): 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(_ProcessingResourcesSnapshot value)? $default, ) { final _that = this; switch (_that) { case _ProcessingResourcesSnapshot() 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 installs, Set paused, Map rates, bool subtitleDownloading, bool subtitlePaused, int subtitleDownloadedBytes, int subtitleTotalBytes, int subtitleBytesPerSecond, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _ProcessingResourcesSnapshot() when $default != null: return $default( _that.installs, _that.paused, _that.rates, _that.subtitleDownloading, _that.subtitlePaused, _that.subtitleDownloadedBytes, _that.subtitleTotalBytes, _that.subtitleBytesPerSecond, ); 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 installs, Set paused, Map rates, bool subtitleDownloading, bool subtitlePaused, int subtitleDownloadedBytes, int subtitleTotalBytes, int subtitleBytesPerSecond, ) $default, ) { final _that = this; switch (_that) { case _ProcessingResourcesSnapshot(): return $default( _that.installs, _that.paused, _that.rates, _that.subtitleDownloading, _that.subtitlePaused, _that.subtitleDownloadedBytes, _that.subtitleTotalBytes, _that.subtitleBytesPerSecond, ); 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 installs, Set paused, Map rates, bool subtitleDownloading, bool subtitlePaused, int subtitleDownloadedBytes, int subtitleTotalBytes, int subtitleBytesPerSecond, )? $default, ) { final _that = this; switch (_that) { case _ProcessingResourcesSnapshot() when $default != null: return $default( _that.installs, _that.paused, _that.rates, _that.subtitleDownloading, _that.subtitlePaused, _that.subtitleDownloadedBytes, _that.subtitleTotalBytes, _that.subtitleBytesPerSecond, ); case _: return null; } } } /// @nodoc class _ProcessingResourcesSnapshot implements ProcessingResourcesSnapshot { const _ProcessingResourcesSnapshot({ List installs = const [], Set paused = const {}, Map rates = const {}, this.subtitleDownloading = false, this.subtitlePaused = false, this.subtitleDownloadedBytes = 0, this.subtitleTotalBytes = 0, this.subtitleBytesPerSecond = 0, }) : _installs = installs, _paused = paused, _rates = rates; final List _installs; @override @JsonKey() List get installs { if (_installs is EqualUnmodifiableListView) return _installs; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_installs); } final Set _paused; @override @JsonKey() Set get paused { if (_paused is EqualUnmodifiableSetView) return _paused; // ignore: implicit_dynamic_type return EqualUnmodifiableSetView(_paused); } final Map _rates; @override @JsonKey() Map get rates { if (_rates is EqualUnmodifiableMapView) return _rates; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(_rates); } @override @JsonKey() final bool subtitleDownloading; @override @JsonKey() final bool subtitlePaused; @override @JsonKey() final int subtitleDownloadedBytes; @override @JsonKey() final int subtitleTotalBytes; @override @JsonKey() final int subtitleBytesPerSecond; /// Create a copy of ProcessingResourcesSnapshot /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ProcessingResourcesSnapshotCopyWith<_ProcessingResourcesSnapshot> get copyWith => __$ProcessingResourcesSnapshotCopyWithImpl<_ProcessingResourcesSnapshot>( this, _$identity, ); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _ProcessingResourcesSnapshot && const DeepCollectionEquality().equals(other.installs, _installs) && const DeepCollectionEquality().equals(other.paused, _paused) && const DeepCollectionEquality().equals(other.rates, _rates) && (identical(other.subtitleDownloading, subtitleDownloading) || other.subtitleDownloading == subtitleDownloading) && (identical(other.subtitlePaused, subtitlePaused) || other.subtitlePaused == subtitlePaused) && (identical( other.subtitleDownloadedBytes, subtitleDownloadedBytes, ) || other.subtitleDownloadedBytes == subtitleDownloadedBytes) && (identical(other.subtitleTotalBytes, subtitleTotalBytes) || other.subtitleTotalBytes == subtitleTotalBytes) && (identical(other.subtitleBytesPerSecond, subtitleBytesPerSecond) || other.subtitleBytesPerSecond == subtitleBytesPerSecond)); } @override int get hashCode { return Object.hash( runtimeType, const DeepCollectionEquality().hash(_installs), const DeepCollectionEquality().hash(_paused), const DeepCollectionEquality().hash(_rates), subtitleDownloading, subtitlePaused, subtitleDownloadedBytes, subtitleTotalBytes, subtitleBytesPerSecond, ); } @override String toString() { return 'ProcessingResourcesSnapshot(installs: $installs, paused: $paused, rates: $rates, subtitleDownloading: $subtitleDownloading, subtitlePaused: $subtitlePaused, subtitleDownloadedBytes: $subtitleDownloadedBytes, subtitleTotalBytes: $subtitleTotalBytes, subtitleBytesPerSecond: $subtitleBytesPerSecond)'; } } /// @nodoc abstract mixin class _$ProcessingResourcesSnapshotCopyWith<$Res> implements $ProcessingResourcesSnapshotCopyWith<$Res> { factory _$ProcessingResourcesSnapshotCopyWith( _ProcessingResourcesSnapshot value, $Res Function(_ProcessingResourcesSnapshot) _then, ) = __$ProcessingResourcesSnapshotCopyWithImpl; @override @useResult $Res call({ List installs, Set paused, Map rates, bool subtitleDownloading, bool subtitlePaused, int subtitleDownloadedBytes, int subtitleTotalBytes, int subtitleBytesPerSecond, }); } /// @nodoc class __$ProcessingResourcesSnapshotCopyWithImpl<$Res> implements _$ProcessingResourcesSnapshotCopyWith<$Res> { __$ProcessingResourcesSnapshotCopyWithImpl(this._self, this._then); final _ProcessingResourcesSnapshot _self; final $Res Function(_ProcessingResourcesSnapshot) _then; /// Create a copy of ProcessingResourcesSnapshot /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? installs = null, Object? paused = null, Object? rates = null, Object? subtitleDownloading = null, Object? subtitlePaused = null, Object? subtitleDownloadedBytes = null, Object? subtitleTotalBytes = null, Object? subtitleBytesPerSecond = null, }) { return _then( _ProcessingResourcesSnapshot( installs: null == installs ? _self._installs : installs // ignore: cast_nullable_to_non_nullable as List, paused: null == paused ? _self._paused : paused // ignore: cast_nullable_to_non_nullable as Set, rates: null == rates ? _self._rates : rates // ignore: cast_nullable_to_non_nullable as Map, subtitleDownloading: null == subtitleDownloading ? _self.subtitleDownloading : subtitleDownloading // ignore: cast_nullable_to_non_nullable as bool, subtitlePaused: null == subtitlePaused ? _self.subtitlePaused : subtitlePaused // ignore: cast_nullable_to_non_nullable as bool, subtitleDownloadedBytes: null == subtitleDownloadedBytes ? _self.subtitleDownloadedBytes : subtitleDownloadedBytes // ignore: cast_nullable_to_non_nullable as int, subtitleTotalBytes: null == subtitleTotalBytes ? _self.subtitleTotalBytes : subtitleTotalBytes // ignore: cast_nullable_to_non_nullable as int, subtitleBytesPerSecond: null == subtitleBytesPerSecond ? _self.subtitleBytesPerSecond : subtitleBytesPerSecond // ignore: cast_nullable_to_non_nullable as int, ), ); } }