// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // 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 'backup.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$BackupBundle { int get version; String get exportedAt; List get servers; List get sessions;@JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) List get danmakuSources; List get scriptWidgets; List get scriptWidgetSubscriptions; /// Create a copy of BackupBundle /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $BackupBundleCopyWith get copyWith => _$BackupBundleCopyWithImpl(this as BackupBundle, _$identity); /// Serializes this BackupBundle to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is BackupBundle&&(identical(other.version, version) || other.version == version)&&(identical(other.exportedAt, exportedAt) || other.exportedAt == exportedAt)&&const DeepCollectionEquality().equals(other.servers, servers)&&const DeepCollectionEquality().equals(other.sessions, sessions)&&const DeepCollectionEquality().equals(other.danmakuSources, danmakuSources)&&const DeepCollectionEquality().equals(other.scriptWidgets, scriptWidgets)&&const DeepCollectionEquality().equals(other.scriptWidgetSubscriptions, scriptWidgetSubscriptions)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,version,exportedAt,const DeepCollectionEquality().hash(servers),const DeepCollectionEquality().hash(sessions),const DeepCollectionEquality().hash(danmakuSources),const DeepCollectionEquality().hash(scriptWidgets),const DeepCollectionEquality().hash(scriptWidgetSubscriptions)); @override String toString() { return 'BackupBundle(version: $version, exportedAt: $exportedAt, servers: $servers, sessions: $sessions, danmakuSources: $danmakuSources, scriptWidgets: $scriptWidgets, scriptWidgetSubscriptions: $scriptWidgetSubscriptions)'; } } /// @nodoc abstract mixin class $BackupBundleCopyWith<$Res> { factory $BackupBundleCopyWith(BackupBundle value, $Res Function(BackupBundle) _then) = _$BackupBundleCopyWithImpl; @useResult $Res call({ int version, String exportedAt, List servers, List sessions,@JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) List danmakuSources, List scriptWidgets, List scriptWidgetSubscriptions }); } /// @nodoc class _$BackupBundleCopyWithImpl<$Res> implements $BackupBundleCopyWith<$Res> { _$BackupBundleCopyWithImpl(this._self, this._then); final BackupBundle _self; final $Res Function(BackupBundle) _then; /// Create a copy of BackupBundle /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? version = null,Object? exportedAt = null,Object? servers = null,Object? sessions = null,Object? danmakuSources = null,Object? scriptWidgets = null,Object? scriptWidgetSubscriptions = null,}) { return _then(_self.copyWith( version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable as int,exportedAt: null == exportedAt ? _self.exportedAt : exportedAt // ignore: cast_nullable_to_non_nullable as String,servers: null == servers ? _self.servers : servers // ignore: cast_nullable_to_non_nullable as List,sessions: null == sessions ? _self.sessions : sessions // ignore: cast_nullable_to_non_nullable as List,danmakuSources: null == danmakuSources ? _self.danmakuSources : danmakuSources // ignore: cast_nullable_to_non_nullable as List,scriptWidgets: null == scriptWidgets ? _self.scriptWidgets : scriptWidgets // ignore: cast_nullable_to_non_nullable as List,scriptWidgetSubscriptions: null == scriptWidgetSubscriptions ? _self.scriptWidgetSubscriptions : scriptWidgetSubscriptions // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [BackupBundle]. extension BackupBundlePatterns on BackupBundle { /// 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( _BackupBundle value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _BackupBundle() 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( _BackupBundle value) $default,){ final _that = this; switch (_that) { case _BackupBundle(): 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( _BackupBundle value)? $default,){ final _that = this; switch (_that) { case _BackupBundle() 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( int version, String exportedAt, List servers, List sessions, @JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) List danmakuSources, List scriptWidgets, List scriptWidgetSubscriptions)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _BackupBundle() when $default != null: return $default(_that.version,_that.exportedAt,_that.servers,_that.sessions,_that.danmakuSources,_that.scriptWidgets,_that.scriptWidgetSubscriptions);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( int version, String exportedAt, List servers, List sessions, @JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) List danmakuSources, List scriptWidgets, List scriptWidgetSubscriptions) $default,) {final _that = this; switch (_that) { case _BackupBundle(): return $default(_that.version,_that.exportedAt,_that.servers,_that.sessions,_that.danmakuSources,_that.scriptWidgets,_that.scriptWidgetSubscriptions);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( int version, String exportedAt, List servers, List sessions, @JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) List danmakuSources, List scriptWidgets, List scriptWidgetSubscriptions)? $default,) {final _that = this; switch (_that) { case _BackupBundle() when $default != null: return $default(_that.version,_that.exportedAt,_that.servers,_that.sessions,_that.danmakuSources,_that.scriptWidgets,_that.scriptWidgetSubscriptions);case _: return null; } } } /// @nodoc @JsonSerializable() class _BackupBundle implements BackupBundle { const _BackupBundle({required this.version, required this.exportedAt, required final List servers, required final List sessions, @JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) final List danmakuSources = const [], final List scriptWidgets = const [], final List scriptWidgetSubscriptions = const []}): _servers = servers,_sessions = sessions,_danmakuSources = danmakuSources,_scriptWidgets = scriptWidgets,_scriptWidgetSubscriptions = scriptWidgetSubscriptions; factory _BackupBundle.fromJson(Map json) => _$BackupBundleFromJson(json); @override final int version; @override final String exportedAt; final List _servers; @override List get servers { if (_servers is EqualUnmodifiableListView) return _servers; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_servers); } final List _sessions; @override List get sessions { if (_sessions is EqualUnmodifiableListView) return _sessions; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_sessions); } final List _danmakuSources; @override@JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) List get danmakuSources { if (_danmakuSources is EqualUnmodifiableListView) return _danmakuSources; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_danmakuSources); } final List _scriptWidgets; @override@JsonKey() List get scriptWidgets { if (_scriptWidgets is EqualUnmodifiableListView) return _scriptWidgets; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_scriptWidgets); } final List _scriptWidgetSubscriptions; @override@JsonKey() List get scriptWidgetSubscriptions { if (_scriptWidgetSubscriptions is EqualUnmodifiableListView) return _scriptWidgetSubscriptions; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_scriptWidgetSubscriptions); } /// Create a copy of BackupBundle /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$BackupBundleCopyWith<_BackupBundle> get copyWith => __$BackupBundleCopyWithImpl<_BackupBundle>(this, _$identity); @override Map toJson() { return _$BackupBundleToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _BackupBundle&&(identical(other.version, version) || other.version == version)&&(identical(other.exportedAt, exportedAt) || other.exportedAt == exportedAt)&&const DeepCollectionEquality().equals(other._servers, _servers)&&const DeepCollectionEquality().equals(other._sessions, _sessions)&&const DeepCollectionEquality().equals(other._danmakuSources, _danmakuSources)&&const DeepCollectionEquality().equals(other._scriptWidgets, _scriptWidgets)&&const DeepCollectionEquality().equals(other._scriptWidgetSubscriptions, _scriptWidgetSubscriptions)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,version,exportedAt,const DeepCollectionEquality().hash(_servers),const DeepCollectionEquality().hash(_sessions),const DeepCollectionEquality().hash(_danmakuSources),const DeepCollectionEquality().hash(_scriptWidgets),const DeepCollectionEquality().hash(_scriptWidgetSubscriptions)); @override String toString() { return 'BackupBundle(version: $version, exportedAt: $exportedAt, servers: $servers, sessions: $sessions, danmakuSources: $danmakuSources, scriptWidgets: $scriptWidgets, scriptWidgetSubscriptions: $scriptWidgetSubscriptions)'; } } /// @nodoc abstract mixin class _$BackupBundleCopyWith<$Res> implements $BackupBundleCopyWith<$Res> { factory _$BackupBundleCopyWith(_BackupBundle value, $Res Function(_BackupBundle) _then) = __$BackupBundleCopyWithImpl; @override @useResult $Res call({ int version, String exportedAt, List servers, List sessions,@JsonKey(fromJson: _danmakuSourcesFromJson, toJson: _danmakuSourcesToJson) List danmakuSources, List scriptWidgets, List scriptWidgetSubscriptions }); } /// @nodoc class __$BackupBundleCopyWithImpl<$Res> implements _$BackupBundleCopyWith<$Res> { __$BackupBundleCopyWithImpl(this._self, this._then); final _BackupBundle _self; final $Res Function(_BackupBundle) _then; /// Create a copy of BackupBundle /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? version = null,Object? exportedAt = null,Object? servers = null,Object? sessions = null,Object? danmakuSources = null,Object? scriptWidgets = null,Object? scriptWidgetSubscriptions = null,}) { return _then(_BackupBundle( version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable as int,exportedAt: null == exportedAt ? _self.exportedAt : exportedAt // ignore: cast_nullable_to_non_nullable as String,servers: null == servers ? _self._servers : servers // ignore: cast_nullable_to_non_nullable as List,sessions: null == sessions ? _self._sessions : sessions // ignore: cast_nullable_to_non_nullable as List,danmakuSources: null == danmakuSources ? _self._danmakuSources : danmakuSources // ignore: cast_nullable_to_non_nullable as List,scriptWidgets: null == scriptWidgets ? _self._scriptWidgets : scriptWidgets // ignore: cast_nullable_to_non_nullable as List,scriptWidgetSubscriptions: null == scriptWidgetSubscriptions ? _self._scriptWidgetSubscriptions : scriptWidgetSubscriptions // ignore: cast_nullable_to_non_nullable as List, )); } } // dart format on