831 lines
30 KiB
Dart
831 lines
30 KiB
Dart
|
|
// 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 'danmaku.dart';
|
||
|
|
|
||
|
|
// **************************************************************************
|
||
|
|
// FreezedGenerator
|
||
|
|
// **************************************************************************
|
||
|
|
|
||
|
|
// dart format off
|
||
|
|
T _$identity<T>(T value) => value;
|
||
|
|
/// @nodoc
|
||
|
|
mixin _$DanmakuMatchContext {
|
||
|
|
|
||
|
|
String get itemId; String get name; String? get type; String? get seriesName; int? get season; int? get episode; int get durationSec;
|
||
|
|
/// Create a copy of DanmakuMatchContext
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
$DanmakuMatchContextCopyWith<DanmakuMatchContext> get copyWith => _$DanmakuMatchContextCopyWithImpl<DanmakuMatchContext>(this as DanmakuMatchContext, _$identity);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is DanmakuMatchContext&&(identical(other.itemId, itemId) || other.itemId == itemId)&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&(identical(other.seriesName, seriesName) || other.seriesName == seriesName)&&(identical(other.season, season) || other.season == season)&&(identical(other.episode, episode) || other.episode == episode)&&(identical(other.durationSec, durationSec) || other.durationSec == durationSec));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hash(runtimeType,itemId,name,type,seriesName,season,episode,durationSec);
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'DanmakuMatchContext(itemId: $itemId, name: $name, type: $type, seriesName: $seriesName, season: $season, episode: $episode, durationSec: $durationSec)';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract mixin class $DanmakuMatchContextCopyWith<$Res> {
|
||
|
|
factory $DanmakuMatchContextCopyWith(DanmakuMatchContext value, $Res Function(DanmakuMatchContext) _then) = _$DanmakuMatchContextCopyWithImpl;
|
||
|
|
@useResult
|
||
|
|
$Res call({
|
||
|
|
String itemId, String name, String? type, String? seriesName, int? season, int? episode, int durationSec
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
/// @nodoc
|
||
|
|
class _$DanmakuMatchContextCopyWithImpl<$Res>
|
||
|
|
implements $DanmakuMatchContextCopyWith<$Res> {
|
||
|
|
_$DanmakuMatchContextCopyWithImpl(this._self, this._then);
|
||
|
|
|
||
|
|
final DanmakuMatchContext _self;
|
||
|
|
final $Res Function(DanmakuMatchContext) _then;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuMatchContext
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? itemId = null,Object? name = null,Object? type = freezed,Object? seriesName = freezed,Object? season = freezed,Object? episode = freezed,Object? durationSec = null,}) {
|
||
|
|
return _then(_self.copyWith(
|
||
|
|
itemId: null == itemId ? _self.itemId : itemId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,seriesName: freezed == seriesName ? _self.seriesName : seriesName // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,season: freezed == season ? _self.season : season // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,episode: freezed == episode ? _self.episode : episode // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,durationSec: null == durationSec ? _self.durationSec : durationSec // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,
|
||
|
|
));
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// Adds pattern-matching-related methods to [DanmakuMatchContext].
|
||
|
|
extension DanmakuMatchContextPatterns on DanmakuMatchContext {
|
||
|
|
/// 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 extends Object?>(TResult Function( _DanmakuMatchContext value)? $default,{required TResult orElse(),}){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatchContext() 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 extends Object?>(TResult Function( _DanmakuMatchContext value) $default,){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatchContext():
|
||
|
|
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 extends Object?>(TResult? Function( _DanmakuMatchContext value)? $default,){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatchContext() 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 extends Object?>(TResult Function( String itemId, String name, String? type, String? seriesName, int? season, int? episode, int durationSec)? $default,{required TResult orElse(),}) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatchContext() when $default != null:
|
||
|
|
return $default(_that.itemId,_that.name,_that.type,_that.seriesName,_that.season,_that.episode,_that.durationSec);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 extends Object?>(TResult Function( String itemId, String name, String? type, String? seriesName, int? season, int? episode, int durationSec) $default,) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatchContext():
|
||
|
|
return $default(_that.itemId,_that.name,_that.type,_that.seriesName,_that.season,_that.episode,_that.durationSec);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 extends Object?>(TResult? Function( String itemId, String name, String? type, String? seriesName, int? season, int? episode, int durationSec)? $default,) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatchContext() when $default != null:
|
||
|
|
return $default(_that.itemId,_that.name,_that.type,_that.seriesName,_that.season,_that.episode,_that.durationSec);case _:
|
||
|
|
return null;
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
|
||
|
|
|
||
|
|
class _DanmakuMatchContext implements DanmakuMatchContext {
|
||
|
|
const _DanmakuMatchContext({required this.itemId, required this.name, required this.type, required this.seriesName, required this.season, required this.episode, required this.durationSec});
|
||
|
|
|
||
|
|
|
||
|
|
@override final String itemId;
|
||
|
|
@override final String name;
|
||
|
|
@override final String? type;
|
||
|
|
@override final String? seriesName;
|
||
|
|
@override final int? season;
|
||
|
|
@override final int? episode;
|
||
|
|
@override final int durationSec;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuMatchContext
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
_$DanmakuMatchContextCopyWith<_DanmakuMatchContext> get copyWith => __$DanmakuMatchContextCopyWithImpl<_DanmakuMatchContext>(this, _$identity);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DanmakuMatchContext&&(identical(other.itemId, itemId) || other.itemId == itemId)&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&(identical(other.seriesName, seriesName) || other.seriesName == seriesName)&&(identical(other.season, season) || other.season == season)&&(identical(other.episode, episode) || other.episode == episode)&&(identical(other.durationSec, durationSec) || other.durationSec == durationSec));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hash(runtimeType,itemId,name,type,seriesName,season,episode,durationSec);
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'DanmakuMatchContext(itemId: $itemId, name: $name, type: $type, seriesName: $seriesName, season: $season, episode: $episode, durationSec: $durationSec)';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract mixin class _$DanmakuMatchContextCopyWith<$Res> implements $DanmakuMatchContextCopyWith<$Res> {
|
||
|
|
factory _$DanmakuMatchContextCopyWith(_DanmakuMatchContext value, $Res Function(_DanmakuMatchContext) _then) = __$DanmakuMatchContextCopyWithImpl;
|
||
|
|
@override @useResult
|
||
|
|
$Res call({
|
||
|
|
String itemId, String name, String? type, String? seriesName, int? season, int? episode, int durationSec
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
/// @nodoc
|
||
|
|
class __$DanmakuMatchContextCopyWithImpl<$Res>
|
||
|
|
implements _$DanmakuMatchContextCopyWith<$Res> {
|
||
|
|
__$DanmakuMatchContextCopyWithImpl(this._self, this._then);
|
||
|
|
|
||
|
|
final _DanmakuMatchContext _self;
|
||
|
|
final $Res Function(_DanmakuMatchContext) _then;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuMatchContext
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? itemId = null,Object? name = null,Object? type = freezed,Object? seriesName = freezed,Object? season = freezed,Object? episode = freezed,Object? durationSec = null,}) {
|
||
|
|
return _then(_DanmakuMatchContext(
|
||
|
|
itemId: null == itemId ? _self.itemId : itemId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,seriesName: freezed == seriesName ? _self.seriesName : seriesName // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,season: freezed == season ? _self.season : season // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,episode: freezed == episode ? _self.episode : episode // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,durationSec: null == durationSec ? _self.durationSec : durationSec // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,
|
||
|
|
));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
mixin _$DanmakuMatch {
|
||
|
|
|
||
|
|
@JsonKey(fromJson: _intRequired) int get episodeId;@JsonKey(fromJson: _intOrZero) int get animeId; String get animeTitle; String get episodeTitle;
|
||
|
|
/// Create a copy of DanmakuMatch
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
$DanmakuMatchCopyWith<DanmakuMatch> get copyWith => _$DanmakuMatchCopyWithImpl<DanmakuMatch>(this as DanmakuMatch, _$identity);
|
||
|
|
|
||
|
|
/// Serializes this DanmakuMatch to a JSON map.
|
||
|
|
Map<String, dynamic> toJson();
|
||
|
|
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is DanmakuMatch&&(identical(other.episodeId, episodeId) || other.episodeId == episodeId)&&(identical(other.animeId, animeId) || other.animeId == animeId)&&(identical(other.animeTitle, animeTitle) || other.animeTitle == animeTitle)&&(identical(other.episodeTitle, episodeTitle) || other.episodeTitle == episodeTitle));
|
||
|
|
}
|
||
|
|
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hash(runtimeType,episodeId,animeId,animeTitle,episodeTitle);
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'DanmakuMatch(episodeId: $episodeId, animeId: $animeId, animeTitle: $animeTitle, episodeTitle: $episodeTitle)';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract mixin class $DanmakuMatchCopyWith<$Res> {
|
||
|
|
factory $DanmakuMatchCopyWith(DanmakuMatch value, $Res Function(DanmakuMatch) _then) = _$DanmakuMatchCopyWithImpl;
|
||
|
|
@useResult
|
||
|
|
$Res call({
|
||
|
|
@JsonKey(fromJson: _intRequired) int episodeId,@JsonKey(fromJson: _intOrZero) int animeId, String animeTitle, String episodeTitle
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
/// @nodoc
|
||
|
|
class _$DanmakuMatchCopyWithImpl<$Res>
|
||
|
|
implements $DanmakuMatchCopyWith<$Res> {
|
||
|
|
_$DanmakuMatchCopyWithImpl(this._self, this._then);
|
||
|
|
|
||
|
|
final DanmakuMatch _self;
|
||
|
|
final $Res Function(DanmakuMatch) _then;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuMatch
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? episodeId = null,Object? animeId = null,Object? animeTitle = null,Object? episodeTitle = null,}) {
|
||
|
|
return _then(_self.copyWith(
|
||
|
|
episodeId: null == episodeId ? _self.episodeId : episodeId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,animeId: null == animeId ? _self.animeId : animeId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,animeTitle: null == animeTitle ? _self.animeTitle : animeTitle // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,episodeTitle: null == episodeTitle ? _self.episodeTitle : episodeTitle // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,
|
||
|
|
));
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// Adds pattern-matching-related methods to [DanmakuMatch].
|
||
|
|
extension DanmakuMatchPatterns on DanmakuMatch {
|
||
|
|
/// 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 extends Object?>(TResult Function( _DanmakuMatch value)? $default,{required TResult orElse(),}){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatch() 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 extends Object?>(TResult Function( _DanmakuMatch value) $default,){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatch():
|
||
|
|
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 extends Object?>(TResult? Function( _DanmakuMatch value)? $default,){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatch() 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 extends Object?>(TResult Function(@JsonKey(fromJson: _intRequired) int episodeId, @JsonKey(fromJson: _intOrZero) int animeId, String animeTitle, String episodeTitle)? $default,{required TResult orElse(),}) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatch() when $default != null:
|
||
|
|
return $default(_that.episodeId,_that.animeId,_that.animeTitle,_that.episodeTitle);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 extends Object?>(TResult Function(@JsonKey(fromJson: _intRequired) int episodeId, @JsonKey(fromJson: _intOrZero) int animeId, String animeTitle, String episodeTitle) $default,) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatch():
|
||
|
|
return $default(_that.episodeId,_that.animeId,_that.animeTitle,_that.episodeTitle);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 extends Object?>(TResult? Function(@JsonKey(fromJson: _intRequired) int episodeId, @JsonKey(fromJson: _intOrZero) int animeId, String animeTitle, String episodeTitle)? $default,) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuMatch() when $default != null:
|
||
|
|
return $default(_that.episodeId,_that.animeId,_that.animeTitle,_that.episodeTitle);case _:
|
||
|
|
return null;
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
@JsonSerializable()
|
||
|
|
|
||
|
|
class _DanmakuMatch implements DanmakuMatch {
|
||
|
|
const _DanmakuMatch({@JsonKey(fromJson: _intRequired) required this.episodeId, @JsonKey(fromJson: _intOrZero) this.animeId = 0, this.animeTitle = '', this.episodeTitle = ''});
|
||
|
|
factory _DanmakuMatch.fromJson(Map<String, dynamic> json) => _$DanmakuMatchFromJson(json);
|
||
|
|
|
||
|
|
@override@JsonKey(fromJson: _intRequired) final int episodeId;
|
||
|
|
@override@JsonKey(fromJson: _intOrZero) final int animeId;
|
||
|
|
@override@JsonKey() final String animeTitle;
|
||
|
|
@override@JsonKey() final String episodeTitle;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuMatch
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
_$DanmakuMatchCopyWith<_DanmakuMatch> get copyWith => __$DanmakuMatchCopyWithImpl<_DanmakuMatch>(this, _$identity);
|
||
|
|
|
||
|
|
@override
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
return _$DanmakuMatchToJson(this, );
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DanmakuMatch&&(identical(other.episodeId, episodeId) || other.episodeId == episodeId)&&(identical(other.animeId, animeId) || other.animeId == animeId)&&(identical(other.animeTitle, animeTitle) || other.animeTitle == animeTitle)&&(identical(other.episodeTitle, episodeTitle) || other.episodeTitle == episodeTitle));
|
||
|
|
}
|
||
|
|
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hash(runtimeType,episodeId,animeId,animeTitle,episodeTitle);
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'DanmakuMatch(episodeId: $episodeId, animeId: $animeId, animeTitle: $animeTitle, episodeTitle: $episodeTitle)';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract mixin class _$DanmakuMatchCopyWith<$Res> implements $DanmakuMatchCopyWith<$Res> {
|
||
|
|
factory _$DanmakuMatchCopyWith(_DanmakuMatch value, $Res Function(_DanmakuMatch) _then) = __$DanmakuMatchCopyWithImpl;
|
||
|
|
@override @useResult
|
||
|
|
$Res call({
|
||
|
|
@JsonKey(fromJson: _intRequired) int episodeId,@JsonKey(fromJson: _intOrZero) int animeId, String animeTitle, String episodeTitle
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
/// @nodoc
|
||
|
|
class __$DanmakuMatchCopyWithImpl<$Res>
|
||
|
|
implements _$DanmakuMatchCopyWith<$Res> {
|
||
|
|
__$DanmakuMatchCopyWithImpl(this._self, this._then);
|
||
|
|
|
||
|
|
final _DanmakuMatch _self;
|
||
|
|
final $Res Function(_DanmakuMatch) _then;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuMatch
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? episodeId = null,Object? animeId = null,Object? animeTitle = null,Object? episodeTitle = null,}) {
|
||
|
|
return _then(_DanmakuMatch(
|
||
|
|
episodeId: null == episodeId ? _self.episodeId : episodeId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,animeId: null == animeId ? _self.animeId : animeId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,animeTitle: null == animeTitle ? _self.animeTitle : animeTitle // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,episodeTitle: null == episodeTitle ? _self.episodeTitle : episodeTitle // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,
|
||
|
|
));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
mixin _$DanmakuBangumiEpisode {
|
||
|
|
|
||
|
|
@JsonKey(fromJson: _intRequired) int get episodeId; String get episodeTitle;@JsonKey(fromJson: _stringFromAny) String get episodeNumber;
|
||
|
|
/// Create a copy of DanmakuBangumiEpisode
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
$DanmakuBangumiEpisodeCopyWith<DanmakuBangumiEpisode> get copyWith => _$DanmakuBangumiEpisodeCopyWithImpl<DanmakuBangumiEpisode>(this as DanmakuBangumiEpisode, _$identity);
|
||
|
|
|
||
|
|
/// Serializes this DanmakuBangumiEpisode to a JSON map.
|
||
|
|
Map<String, dynamic> toJson();
|
||
|
|
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is DanmakuBangumiEpisode&&(identical(other.episodeId, episodeId) || other.episodeId == episodeId)&&(identical(other.episodeTitle, episodeTitle) || other.episodeTitle == episodeTitle)&&(identical(other.episodeNumber, episodeNumber) || other.episodeNumber == episodeNumber));
|
||
|
|
}
|
||
|
|
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hash(runtimeType,episodeId,episodeTitle,episodeNumber);
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'DanmakuBangumiEpisode(episodeId: $episodeId, episodeTitle: $episodeTitle, episodeNumber: $episodeNumber)';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract mixin class $DanmakuBangumiEpisodeCopyWith<$Res> {
|
||
|
|
factory $DanmakuBangumiEpisodeCopyWith(DanmakuBangumiEpisode value, $Res Function(DanmakuBangumiEpisode) _then) = _$DanmakuBangumiEpisodeCopyWithImpl;
|
||
|
|
@useResult
|
||
|
|
$Res call({
|
||
|
|
@JsonKey(fromJson: _intRequired) int episodeId, String episodeTitle,@JsonKey(fromJson: _stringFromAny) String episodeNumber
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
/// @nodoc
|
||
|
|
class _$DanmakuBangumiEpisodeCopyWithImpl<$Res>
|
||
|
|
implements $DanmakuBangumiEpisodeCopyWith<$Res> {
|
||
|
|
_$DanmakuBangumiEpisodeCopyWithImpl(this._self, this._then);
|
||
|
|
|
||
|
|
final DanmakuBangumiEpisode _self;
|
||
|
|
final $Res Function(DanmakuBangumiEpisode) _then;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuBangumiEpisode
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? episodeId = null,Object? episodeTitle = null,Object? episodeNumber = null,}) {
|
||
|
|
return _then(_self.copyWith(
|
||
|
|
episodeId: null == episodeId ? _self.episodeId : episodeId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,episodeTitle: null == episodeTitle ? _self.episodeTitle : episodeTitle // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,episodeNumber: null == episodeNumber ? _self.episodeNumber : episodeNumber // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,
|
||
|
|
));
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// Adds pattern-matching-related methods to [DanmakuBangumiEpisode].
|
||
|
|
extension DanmakuBangumiEpisodePatterns on DanmakuBangumiEpisode {
|
||
|
|
/// 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 extends Object?>(TResult Function( _DanmakuBangumiEpisode value)? $default,{required TResult orElse(),}){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuBangumiEpisode() 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 extends Object?>(TResult Function( _DanmakuBangumiEpisode value) $default,){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuBangumiEpisode():
|
||
|
|
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 extends Object?>(TResult? Function( _DanmakuBangumiEpisode value)? $default,){
|
||
|
|
final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuBangumiEpisode() 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 extends Object?>(TResult Function(@JsonKey(fromJson: _intRequired) int episodeId, String episodeTitle, @JsonKey(fromJson: _stringFromAny) String episodeNumber)? $default,{required TResult orElse(),}) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuBangumiEpisode() when $default != null:
|
||
|
|
return $default(_that.episodeId,_that.episodeTitle,_that.episodeNumber);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 extends Object?>(TResult Function(@JsonKey(fromJson: _intRequired) int episodeId, String episodeTitle, @JsonKey(fromJson: _stringFromAny) String episodeNumber) $default,) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuBangumiEpisode():
|
||
|
|
return $default(_that.episodeId,_that.episodeTitle,_that.episodeNumber);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 extends Object?>(TResult? Function(@JsonKey(fromJson: _intRequired) int episodeId, String episodeTitle, @JsonKey(fromJson: _stringFromAny) String episodeNumber)? $default,) {final _that = this;
|
||
|
|
switch (_that) {
|
||
|
|
case _DanmakuBangumiEpisode() when $default != null:
|
||
|
|
return $default(_that.episodeId,_that.episodeTitle,_that.episodeNumber);case _:
|
||
|
|
return null;
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
@JsonSerializable()
|
||
|
|
|
||
|
|
class _DanmakuBangumiEpisode implements DanmakuBangumiEpisode {
|
||
|
|
const _DanmakuBangumiEpisode({@JsonKey(fromJson: _intRequired) required this.episodeId, this.episodeTitle = '', @JsonKey(fromJson: _stringFromAny) this.episodeNumber = ''});
|
||
|
|
factory _DanmakuBangumiEpisode.fromJson(Map<String, dynamic> json) => _$DanmakuBangumiEpisodeFromJson(json);
|
||
|
|
|
||
|
|
@override@JsonKey(fromJson: _intRequired) final int episodeId;
|
||
|
|
@override@JsonKey() final String episodeTitle;
|
||
|
|
@override@JsonKey(fromJson: _stringFromAny) final String episodeNumber;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuBangumiEpisode
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
_$DanmakuBangumiEpisodeCopyWith<_DanmakuBangumiEpisode> get copyWith => __$DanmakuBangumiEpisodeCopyWithImpl<_DanmakuBangumiEpisode>(this, _$identity);
|
||
|
|
|
||
|
|
@override
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
return _$DanmakuBangumiEpisodeToJson(this, );
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DanmakuBangumiEpisode&&(identical(other.episodeId, episodeId) || other.episodeId == episodeId)&&(identical(other.episodeTitle, episodeTitle) || other.episodeTitle == episodeTitle)&&(identical(other.episodeNumber, episodeNumber) || other.episodeNumber == episodeNumber));
|
||
|
|
}
|
||
|
|
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hash(runtimeType,episodeId,episodeTitle,episodeNumber);
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'DanmakuBangumiEpisode(episodeId: $episodeId, episodeTitle: $episodeTitle, episodeNumber: $episodeNumber)';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract mixin class _$DanmakuBangumiEpisodeCopyWith<$Res> implements $DanmakuBangumiEpisodeCopyWith<$Res> {
|
||
|
|
factory _$DanmakuBangumiEpisodeCopyWith(_DanmakuBangumiEpisode value, $Res Function(_DanmakuBangumiEpisode) _then) = __$DanmakuBangumiEpisodeCopyWithImpl;
|
||
|
|
@override @useResult
|
||
|
|
$Res call({
|
||
|
|
@JsonKey(fromJson: _intRequired) int episodeId, String episodeTitle,@JsonKey(fromJson: _stringFromAny) String episodeNumber
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
/// @nodoc
|
||
|
|
class __$DanmakuBangumiEpisodeCopyWithImpl<$Res>
|
||
|
|
implements _$DanmakuBangumiEpisodeCopyWith<$Res> {
|
||
|
|
__$DanmakuBangumiEpisodeCopyWithImpl(this._self, this._then);
|
||
|
|
|
||
|
|
final _DanmakuBangumiEpisode _self;
|
||
|
|
final $Res Function(_DanmakuBangumiEpisode) _then;
|
||
|
|
|
||
|
|
/// Create a copy of DanmakuBangumiEpisode
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? episodeId = null,Object? episodeTitle = null,Object? episodeNumber = null,}) {
|
||
|
|
return _then(_DanmakuBangumiEpisode(
|
||
|
|
episodeId: null == episodeId ? _self.episodeId : episodeId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int,episodeTitle: null == episodeTitle ? _self.episodeTitle : episodeTitle // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,episodeNumber: null == episodeNumber ? _self.episodeNumber : episodeNumber // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String,
|
||
|
|
));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
// dart format on
|