5163 lines
196 KiB
Dart
Generated
5163 lines
196 KiB
Dart
Generated
// 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 'tmdb.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbCastMember {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id;@JsonKey(fromJson: _strOrEmpty) String get name; String? get character;@JsonKey(name: 'profile_path') String? get profilePath;@JsonKey(fromJson: _intOrZero) int get order;
|
|
/// Create a copy of TmdbCastMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbCastMemberCopyWith<TmdbCastMember> get copyWith => _$TmdbCastMemberCopyWithImpl<TmdbCastMember>(this as TmdbCastMember, _$identity);
|
|
|
|
/// Serializes this TmdbCastMember to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbCastMember&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.character, character) || other.character == character)&&(identical(other.profilePath, profilePath) || other.profilePath == profilePath)&&(identical(other.order, order) || other.order == order));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,character,profilePath,order);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbCastMember(id: $id, name: $name, character: $character, profilePath: $profilePath, order: $order)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbCastMemberCopyWith<$Res> {
|
|
factory $TmdbCastMemberCopyWith(TmdbCastMember value, $Res Function(TmdbCastMember) _then) = _$TmdbCastMemberCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name, String? character,@JsonKey(name: 'profile_path') String? profilePath,@JsonKey(fromJson: _intOrZero) int order
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbCastMemberCopyWithImpl<$Res>
|
|
implements $TmdbCastMemberCopyWith<$Res> {
|
|
_$TmdbCastMemberCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbCastMember _self;
|
|
final $Res Function(TmdbCastMember) _then;
|
|
|
|
/// Create a copy of TmdbCastMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? character = freezed,Object? profilePath = freezed,Object? order = null,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,character: freezed == character ? _self.character : character // ignore: cast_nullable_to_non_nullable
|
|
as String?,profilePath: freezed == profilePath ? _self.profilePath : profilePath // ignore: cast_nullable_to_non_nullable
|
|
as String?,order: null == order ? _self.order : order // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbCastMember].
|
|
extension TmdbCastMemberPatterns on TmdbCastMember {
|
|
/// 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( _TmdbCastMember value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCastMember() 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( _TmdbCastMember value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCastMember():
|
|
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( _TmdbCastMember value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCastMember() 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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? character, @JsonKey(name: 'profile_path') String? profilePath, @JsonKey(fromJson: _intOrZero) int order)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCastMember() when $default != null:
|
|
return $default(_that.id,_that.name,_that.character,_that.profilePath,_that.order);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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? character, @JsonKey(name: 'profile_path') String? profilePath, @JsonKey(fromJson: _intOrZero) int order) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCastMember():
|
|
return $default(_that.id,_that.name,_that.character,_that.profilePath,_that.order);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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? character, @JsonKey(name: 'profile_path') String? profilePath, @JsonKey(fromJson: _intOrZero) int order)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCastMember() when $default != null:
|
|
return $default(_that.id,_that.name,_that.character,_that.profilePath,_that.order);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbCastMember implements TmdbCastMember {
|
|
const _TmdbCastMember({@JsonKey(fromJson: _intRequired) required this.id, @JsonKey(fromJson: _strOrEmpty) this.name = '', this.character, @JsonKey(name: 'profile_path') this.profilePath, @JsonKey(fromJson: _intOrZero) this.order = 0});
|
|
factory _TmdbCastMember.fromJson(Map<String, dynamic> json) => _$TmdbCastMemberFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
@override final String? character;
|
|
@override@JsonKey(name: 'profile_path') final String? profilePath;
|
|
@override@JsonKey(fromJson: _intOrZero) final int order;
|
|
|
|
/// Create a copy of TmdbCastMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbCastMemberCopyWith<_TmdbCastMember> get copyWith => __$TmdbCastMemberCopyWithImpl<_TmdbCastMember>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbCastMemberToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbCastMember&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.character, character) || other.character == character)&&(identical(other.profilePath, profilePath) || other.profilePath == profilePath)&&(identical(other.order, order) || other.order == order));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,character,profilePath,order);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbCastMember(id: $id, name: $name, character: $character, profilePath: $profilePath, order: $order)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbCastMemberCopyWith<$Res> implements $TmdbCastMemberCopyWith<$Res> {
|
|
factory _$TmdbCastMemberCopyWith(_TmdbCastMember value, $Res Function(_TmdbCastMember) _then) = __$TmdbCastMemberCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name, String? character,@JsonKey(name: 'profile_path') String? profilePath,@JsonKey(fromJson: _intOrZero) int order
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbCastMemberCopyWithImpl<$Res>
|
|
implements _$TmdbCastMemberCopyWith<$Res> {
|
|
__$TmdbCastMemberCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbCastMember _self;
|
|
final $Res Function(_TmdbCastMember) _then;
|
|
|
|
/// Create a copy of TmdbCastMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? character = freezed,Object? profilePath = freezed,Object? order = null,}) {
|
|
return _then(_TmdbCastMember(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,character: freezed == character ? _self.character : character // ignore: cast_nullable_to_non_nullable
|
|
as String?,profilePath: freezed == profilePath ? _self.profilePath : profilePath // ignore: cast_nullable_to_non_nullable
|
|
as String?,order: null == order ? _self.order : order // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbCrewMember {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id;@JsonKey(fromJson: _strOrEmpty) String get name; String? get job; String? get department;@JsonKey(name: 'profile_path') String? get profilePath;
|
|
/// Create a copy of TmdbCrewMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbCrewMemberCopyWith<TmdbCrewMember> get copyWith => _$TmdbCrewMemberCopyWithImpl<TmdbCrewMember>(this as TmdbCrewMember, _$identity);
|
|
|
|
/// Serializes this TmdbCrewMember to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbCrewMember&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.job, job) || other.job == job)&&(identical(other.department, department) || other.department == department)&&(identical(other.profilePath, profilePath) || other.profilePath == profilePath));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,job,department,profilePath);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbCrewMember(id: $id, name: $name, job: $job, department: $department, profilePath: $profilePath)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbCrewMemberCopyWith<$Res> {
|
|
factory $TmdbCrewMemberCopyWith(TmdbCrewMember value, $Res Function(TmdbCrewMember) _then) = _$TmdbCrewMemberCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name, String? job, String? department,@JsonKey(name: 'profile_path') String? profilePath
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbCrewMemberCopyWithImpl<$Res>
|
|
implements $TmdbCrewMemberCopyWith<$Res> {
|
|
_$TmdbCrewMemberCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbCrewMember _self;
|
|
final $Res Function(TmdbCrewMember) _then;
|
|
|
|
/// Create a copy of TmdbCrewMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? job = freezed,Object? department = freezed,Object? profilePath = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,job: freezed == job ? _self.job : job // ignore: cast_nullable_to_non_nullable
|
|
as String?,department: freezed == department ? _self.department : department // ignore: cast_nullable_to_non_nullable
|
|
as String?,profilePath: freezed == profilePath ? _self.profilePath : profilePath // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbCrewMember].
|
|
extension TmdbCrewMemberPatterns on TmdbCrewMember {
|
|
/// 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( _TmdbCrewMember value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCrewMember() 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( _TmdbCrewMember value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCrewMember():
|
|
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( _TmdbCrewMember value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCrewMember() 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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? job, String? department, @JsonKey(name: 'profile_path') String? profilePath)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCrewMember() when $default != null:
|
|
return $default(_that.id,_that.name,_that.job,_that.department,_that.profilePath);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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? job, String? department, @JsonKey(name: 'profile_path') String? profilePath) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCrewMember():
|
|
return $default(_that.id,_that.name,_that.job,_that.department,_that.profilePath);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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? job, String? department, @JsonKey(name: 'profile_path') String? profilePath)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCrewMember() when $default != null:
|
|
return $default(_that.id,_that.name,_that.job,_that.department,_that.profilePath);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbCrewMember implements TmdbCrewMember {
|
|
const _TmdbCrewMember({@JsonKey(fromJson: _intRequired) required this.id, @JsonKey(fromJson: _strOrEmpty) this.name = '', this.job, this.department, @JsonKey(name: 'profile_path') this.profilePath});
|
|
factory _TmdbCrewMember.fromJson(Map<String, dynamic> json) => _$TmdbCrewMemberFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
@override final String? job;
|
|
@override final String? department;
|
|
@override@JsonKey(name: 'profile_path') final String? profilePath;
|
|
|
|
/// Create a copy of TmdbCrewMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbCrewMemberCopyWith<_TmdbCrewMember> get copyWith => __$TmdbCrewMemberCopyWithImpl<_TmdbCrewMember>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbCrewMemberToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbCrewMember&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.job, job) || other.job == job)&&(identical(other.department, department) || other.department == department)&&(identical(other.profilePath, profilePath) || other.profilePath == profilePath));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,job,department,profilePath);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbCrewMember(id: $id, name: $name, job: $job, department: $department, profilePath: $profilePath)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbCrewMemberCopyWith<$Res> implements $TmdbCrewMemberCopyWith<$Res> {
|
|
factory _$TmdbCrewMemberCopyWith(_TmdbCrewMember value, $Res Function(_TmdbCrewMember) _then) = __$TmdbCrewMemberCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name, String? job, String? department,@JsonKey(name: 'profile_path') String? profilePath
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbCrewMemberCopyWithImpl<$Res>
|
|
implements _$TmdbCrewMemberCopyWith<$Res> {
|
|
__$TmdbCrewMemberCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbCrewMember _self;
|
|
final $Res Function(_TmdbCrewMember) _then;
|
|
|
|
/// Create a copy of TmdbCrewMember
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? job = freezed,Object? department = freezed,Object? profilePath = freezed,}) {
|
|
return _then(_TmdbCrewMember(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,job: freezed == job ? _self.job : job // ignore: cast_nullable_to_non_nullable
|
|
as String?,department: freezed == department ? _self.department : department // ignore: cast_nullable_to_non_nullable
|
|
as String?,profilePath: freezed == profilePath ? _self.profilePath : profilePath // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbCreditsRes {
|
|
|
|
List<TmdbCastMember> get cast; List<TmdbCrewMember> get crew;
|
|
/// Create a copy of TmdbCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbCreditsResCopyWith<TmdbCreditsRes> get copyWith => _$TmdbCreditsResCopyWithImpl<TmdbCreditsRes>(this as TmdbCreditsRes, _$identity);
|
|
|
|
/// Serializes this TmdbCreditsRes to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbCreditsRes&&const DeepCollectionEquality().equals(other.cast, cast)&&const DeepCollectionEquality().equals(other.crew, crew));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(cast),const DeepCollectionEquality().hash(crew));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbCreditsRes(cast: $cast, crew: $crew)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbCreditsResCopyWith<$Res> {
|
|
factory $TmdbCreditsResCopyWith(TmdbCreditsRes value, $Res Function(TmdbCreditsRes) _then) = _$TmdbCreditsResCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
List<TmdbCastMember> cast, List<TmdbCrewMember> crew
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbCreditsResCopyWithImpl<$Res>
|
|
implements $TmdbCreditsResCopyWith<$Res> {
|
|
_$TmdbCreditsResCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbCreditsRes _self;
|
|
final $Res Function(TmdbCreditsRes) _then;
|
|
|
|
/// Create a copy of TmdbCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? cast = null,Object? crew = null,}) {
|
|
return _then(_self.copyWith(
|
|
cast: null == cast ? _self.cast : cast // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbCastMember>,crew: null == crew ? _self.crew : crew // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbCrewMember>,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbCreditsRes].
|
|
extension TmdbCreditsResPatterns on TmdbCreditsRes {
|
|
/// 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( _TmdbCreditsRes value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCreditsRes() 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( _TmdbCreditsRes value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCreditsRes():
|
|
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( _TmdbCreditsRes value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCreditsRes() 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( List<TmdbCastMember> cast, List<TmdbCrewMember> crew)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCreditsRes() when $default != null:
|
|
return $default(_that.cast,_that.crew);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( List<TmdbCastMember> cast, List<TmdbCrewMember> crew) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCreditsRes():
|
|
return $default(_that.cast,_that.crew);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( List<TmdbCastMember> cast, List<TmdbCrewMember> crew)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbCreditsRes() when $default != null:
|
|
return $default(_that.cast,_that.crew);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbCreditsRes implements TmdbCreditsRes {
|
|
const _TmdbCreditsRes({final List<TmdbCastMember> cast = const <TmdbCastMember>[], final List<TmdbCrewMember> crew = const <TmdbCrewMember>[]}): _cast = cast,_crew = crew;
|
|
factory _TmdbCreditsRes.fromJson(Map<String, dynamic> json) => _$TmdbCreditsResFromJson(json);
|
|
|
|
final List<TmdbCastMember> _cast;
|
|
@override@JsonKey() List<TmdbCastMember> get cast {
|
|
if (_cast is EqualUnmodifiableListView) return _cast;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_cast);
|
|
}
|
|
|
|
final List<TmdbCrewMember> _crew;
|
|
@override@JsonKey() List<TmdbCrewMember> get crew {
|
|
if (_crew is EqualUnmodifiableListView) return _crew;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_crew);
|
|
}
|
|
|
|
|
|
/// Create a copy of TmdbCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbCreditsResCopyWith<_TmdbCreditsRes> get copyWith => __$TmdbCreditsResCopyWithImpl<_TmdbCreditsRes>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbCreditsResToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbCreditsRes&&const DeepCollectionEquality().equals(other._cast, _cast)&&const DeepCollectionEquality().equals(other._crew, _crew));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_cast),const DeepCollectionEquality().hash(_crew));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbCreditsRes(cast: $cast, crew: $crew)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbCreditsResCopyWith<$Res> implements $TmdbCreditsResCopyWith<$Res> {
|
|
factory _$TmdbCreditsResCopyWith(_TmdbCreditsRes value, $Res Function(_TmdbCreditsRes) _then) = __$TmdbCreditsResCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
List<TmdbCastMember> cast, List<TmdbCrewMember> crew
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbCreditsResCopyWithImpl<$Res>
|
|
implements _$TmdbCreditsResCopyWith<$Res> {
|
|
__$TmdbCreditsResCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbCreditsRes _self;
|
|
final $Res Function(_TmdbCreditsRes) _then;
|
|
|
|
/// Create a copy of TmdbCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? cast = null,Object? crew = null,}) {
|
|
return _then(_TmdbCreditsRes(
|
|
cast: null == cast ? _self._cast : cast // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbCastMember>,crew: null == crew ? _self._crew : crew // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbCrewMember>,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbRecommendation {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id; String get title;@JsonKey(name: 'poster_path') String? get posterPath;@JsonKey(name: 'backdrop_path') String? get backdropPath; String? get overview;@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? get voteAverage;@JsonKey(name: 'media_type') String? get mediaType;
|
|
/// Create a copy of TmdbRecommendation
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbRecommendationCopyWith<TmdbRecommendation> get copyWith => _$TmdbRecommendationCopyWithImpl<TmdbRecommendation>(this as TmdbRecommendation, _$identity);
|
|
|
|
/// Serializes this TmdbRecommendation to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbRecommendation&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.backdropPath, backdropPath) || other.backdropPath == backdropPath)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.mediaType, mediaType) || other.mediaType == mediaType));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,title,posterPath,backdropPath,overview,voteAverage,mediaType);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbRecommendation(id: $id, title: $title, posterPath: $posterPath, backdropPath: $backdropPath, overview: $overview, voteAverage: $voteAverage, mediaType: $mediaType)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbRecommendationCopyWith<$Res> {
|
|
factory $TmdbRecommendationCopyWith(TmdbRecommendation value, $Res Function(TmdbRecommendation) _then) = _$TmdbRecommendationCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id, String title,@JsonKey(name: 'poster_path') String? posterPath,@JsonKey(name: 'backdrop_path') String? backdropPath, String? overview,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'media_type') String? mediaType
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbRecommendationCopyWithImpl<$Res>
|
|
implements $TmdbRecommendationCopyWith<$Res> {
|
|
_$TmdbRecommendationCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbRecommendation _self;
|
|
final $Res Function(TmdbRecommendation) _then;
|
|
|
|
/// Create a copy of TmdbRecommendation
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? posterPath = freezed,Object? backdropPath = freezed,Object? overview = freezed,Object? voteAverage = freezed,Object? mediaType = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
|
as String,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,backdropPath: freezed == backdropPath ? _self.backdropPath : backdropPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,mediaType: freezed == mediaType ? _self.mediaType : mediaType // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbRecommendation].
|
|
extension TmdbRecommendationPatterns on TmdbRecommendation {
|
|
/// 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( _TmdbRecommendation value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendation() 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( _TmdbRecommendation value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendation():
|
|
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( _TmdbRecommendation value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendation() 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 id, String title, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'backdrop_path') String? backdropPath, String? overview, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'media_type') String? mediaType)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendation() when $default != null:
|
|
return $default(_that.id,_that.title,_that.posterPath,_that.backdropPath,_that.overview,_that.voteAverage,_that.mediaType);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 id, String title, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'backdrop_path') String? backdropPath, String? overview, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'media_type') String? mediaType) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendation():
|
|
return $default(_that.id,_that.title,_that.posterPath,_that.backdropPath,_that.overview,_that.voteAverage,_that.mediaType);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 id, String title, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'backdrop_path') String? backdropPath, String? overview, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'media_type') String? mediaType)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendation() when $default != null:
|
|
return $default(_that.id,_that.title,_that.posterPath,_that.backdropPath,_that.overview,_that.voteAverage,_that.mediaType);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbRecommendation implements TmdbRecommendation {
|
|
const _TmdbRecommendation({@JsonKey(fromJson: _intRequired) required this.id, required this.title, @JsonKey(name: 'poster_path') this.posterPath, @JsonKey(name: 'backdrop_path') this.backdropPath, this.overview, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) this.voteAverage, @JsonKey(name: 'media_type') this.mediaType});
|
|
factory _TmdbRecommendation.fromJson(Map<String, dynamic> json) => _$TmdbRecommendationFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override final String title;
|
|
@override@JsonKey(name: 'poster_path') final String? posterPath;
|
|
@override@JsonKey(name: 'backdrop_path') final String? backdropPath;
|
|
@override final String? overview;
|
|
@override@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) final double? voteAverage;
|
|
@override@JsonKey(name: 'media_type') final String? mediaType;
|
|
|
|
/// Create a copy of TmdbRecommendation
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbRecommendationCopyWith<_TmdbRecommendation> get copyWith => __$TmdbRecommendationCopyWithImpl<_TmdbRecommendation>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbRecommendationToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbRecommendation&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.backdropPath, backdropPath) || other.backdropPath == backdropPath)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.mediaType, mediaType) || other.mediaType == mediaType));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,title,posterPath,backdropPath,overview,voteAverage,mediaType);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbRecommendation(id: $id, title: $title, posterPath: $posterPath, backdropPath: $backdropPath, overview: $overview, voteAverage: $voteAverage, mediaType: $mediaType)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbRecommendationCopyWith<$Res> implements $TmdbRecommendationCopyWith<$Res> {
|
|
factory _$TmdbRecommendationCopyWith(_TmdbRecommendation value, $Res Function(_TmdbRecommendation) _then) = __$TmdbRecommendationCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id, String title,@JsonKey(name: 'poster_path') String? posterPath,@JsonKey(name: 'backdrop_path') String? backdropPath, String? overview,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'media_type') String? mediaType
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbRecommendationCopyWithImpl<$Res>
|
|
implements _$TmdbRecommendationCopyWith<$Res> {
|
|
__$TmdbRecommendationCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbRecommendation _self;
|
|
final $Res Function(_TmdbRecommendation) _then;
|
|
|
|
/// Create a copy of TmdbRecommendation
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? posterPath = freezed,Object? backdropPath = freezed,Object? overview = freezed,Object? voteAverage = freezed,Object? mediaType = freezed,}) {
|
|
return _then(_TmdbRecommendation(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
|
as String,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,backdropPath: freezed == backdropPath ? _self.backdropPath : backdropPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,mediaType: freezed == mediaType ? _self.mediaType : mediaType // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbRecommendationsRes {
|
|
|
|
List<TmdbRecommendation> get results;@JsonKey(name: 'total_results', fromJson: _intOrZero) int get totalResults;
|
|
/// Create a copy of TmdbRecommendationsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbRecommendationsResCopyWith<TmdbRecommendationsRes> get copyWith => _$TmdbRecommendationsResCopyWithImpl<TmdbRecommendationsRes>(this as TmdbRecommendationsRes, _$identity);
|
|
|
|
/// Serializes this TmdbRecommendationsRes to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbRecommendationsRes&&const DeepCollectionEquality().equals(other.results, results)&&(identical(other.totalResults, totalResults) || other.totalResults == totalResults));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(results),totalResults);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbRecommendationsRes(results: $results, totalResults: $totalResults)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbRecommendationsResCopyWith<$Res> {
|
|
factory $TmdbRecommendationsResCopyWith(TmdbRecommendationsRes value, $Res Function(TmdbRecommendationsRes) _then) = _$TmdbRecommendationsResCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
List<TmdbRecommendation> results,@JsonKey(name: 'total_results', fromJson: _intOrZero) int totalResults
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbRecommendationsResCopyWithImpl<$Res>
|
|
implements $TmdbRecommendationsResCopyWith<$Res> {
|
|
_$TmdbRecommendationsResCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbRecommendationsRes _self;
|
|
final $Res Function(TmdbRecommendationsRes) _then;
|
|
|
|
/// Create a copy of TmdbRecommendationsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? results = null,Object? totalResults = null,}) {
|
|
return _then(_self.copyWith(
|
|
results: null == results ? _self.results : results // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbRecommendation>,totalResults: null == totalResults ? _self.totalResults : totalResults // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbRecommendationsRes].
|
|
extension TmdbRecommendationsResPatterns on TmdbRecommendationsRes {
|
|
/// 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( _TmdbRecommendationsRes value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendationsRes() 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( _TmdbRecommendationsRes value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendationsRes():
|
|
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( _TmdbRecommendationsRes value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendationsRes() 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( List<TmdbRecommendation> results, @JsonKey(name: 'total_results', fromJson: _intOrZero) int totalResults)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendationsRes() when $default != null:
|
|
return $default(_that.results,_that.totalResults);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( List<TmdbRecommendation> results, @JsonKey(name: 'total_results', fromJson: _intOrZero) int totalResults) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendationsRes():
|
|
return $default(_that.results,_that.totalResults);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( List<TmdbRecommendation> results, @JsonKey(name: 'total_results', fromJson: _intOrZero) int totalResults)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbRecommendationsRes() when $default != null:
|
|
return $default(_that.results,_that.totalResults);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbRecommendationsRes implements TmdbRecommendationsRes {
|
|
const _TmdbRecommendationsRes({final List<TmdbRecommendation> results = const <TmdbRecommendation>[], @JsonKey(name: 'total_results', fromJson: _intOrZero) this.totalResults = 0}): _results = results;
|
|
factory _TmdbRecommendationsRes.fromJson(Map<String, dynamic> json) => _$TmdbRecommendationsResFromJson(json);
|
|
|
|
final List<TmdbRecommendation> _results;
|
|
@override@JsonKey() List<TmdbRecommendation> get results {
|
|
if (_results is EqualUnmodifiableListView) return _results;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_results);
|
|
}
|
|
|
|
@override@JsonKey(name: 'total_results', fromJson: _intOrZero) final int totalResults;
|
|
|
|
/// Create a copy of TmdbRecommendationsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbRecommendationsResCopyWith<_TmdbRecommendationsRes> get copyWith => __$TmdbRecommendationsResCopyWithImpl<_TmdbRecommendationsRes>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbRecommendationsResToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbRecommendationsRes&&const DeepCollectionEquality().equals(other._results, _results)&&(identical(other.totalResults, totalResults) || other.totalResults == totalResults));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_results),totalResults);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbRecommendationsRes(results: $results, totalResults: $totalResults)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbRecommendationsResCopyWith<$Res> implements $TmdbRecommendationsResCopyWith<$Res> {
|
|
factory _$TmdbRecommendationsResCopyWith(_TmdbRecommendationsRes value, $Res Function(_TmdbRecommendationsRes) _then) = __$TmdbRecommendationsResCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
List<TmdbRecommendation> results,@JsonKey(name: 'total_results', fromJson: _intOrZero) int totalResults
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbRecommendationsResCopyWithImpl<$Res>
|
|
implements _$TmdbRecommendationsResCopyWith<$Res> {
|
|
__$TmdbRecommendationsResCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbRecommendationsRes _self;
|
|
final $Res Function(_TmdbRecommendationsRes) _then;
|
|
|
|
/// Create a copy of TmdbRecommendationsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? results = null,Object? totalResults = null,}) {
|
|
return _then(_TmdbRecommendationsRes(
|
|
results: null == results ? _self._results : results // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbRecommendation>,totalResults: null == totalResults ? _self.totalResults : totalResults // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbEpisode {
|
|
|
|
@JsonKey(name: 'episode_number', fromJson: _intRequired) int get episodeNumber;@JsonKey(fromJson: _strOrEmpty) String get name; String? get overview;@JsonKey(name: 'still_path') String? get stillPath;@JsonKey(name: 'air_date') String? get airDate;@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? get voteAverage;@JsonKey(fromJson: _intOrNull) int? get runtime;
|
|
/// Create a copy of TmdbEpisode
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbEpisodeCopyWith<TmdbEpisode> get copyWith => _$TmdbEpisodeCopyWithImpl<TmdbEpisode>(this as TmdbEpisode, _$identity);
|
|
|
|
/// Serializes this TmdbEpisode to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbEpisode&&(identical(other.episodeNumber, episodeNumber) || other.episodeNumber == episodeNumber)&&(identical(other.name, name) || other.name == name)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.stillPath, stillPath) || other.stillPath == stillPath)&&(identical(other.airDate, airDate) || other.airDate == airDate)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.runtime, runtime) || other.runtime == runtime));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,episodeNumber,name,overview,stillPath,airDate,voteAverage,runtime);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbEpisode(episodeNumber: $episodeNumber, name: $name, overview: $overview, stillPath: $stillPath, airDate: $airDate, voteAverage: $voteAverage, runtime: $runtime)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbEpisodeCopyWith<$Res> {
|
|
factory $TmdbEpisodeCopyWith(TmdbEpisode value, $Res Function(TmdbEpisode) _then) = _$TmdbEpisodeCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: 'episode_number', fromJson: _intRequired) int episodeNumber,@JsonKey(fromJson: _strOrEmpty) String name, String? overview,@JsonKey(name: 'still_path') String? stillPath,@JsonKey(name: 'air_date') String? airDate,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(fromJson: _intOrNull) int? runtime
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbEpisodeCopyWithImpl<$Res>
|
|
implements $TmdbEpisodeCopyWith<$Res> {
|
|
_$TmdbEpisodeCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbEpisode _self;
|
|
final $Res Function(TmdbEpisode) _then;
|
|
|
|
/// Create a copy of TmdbEpisode
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? episodeNumber = null,Object? name = null,Object? overview = freezed,Object? stillPath = freezed,Object? airDate = freezed,Object? voteAverage = freezed,Object? runtime = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
episodeNumber: null == episodeNumber ? _self.episodeNumber : episodeNumber // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,stillPath: freezed == stillPath ? _self.stillPath : stillPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,airDate: freezed == airDate ? _self.airDate : airDate // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,runtime: freezed == runtime ? _self.runtime : runtime // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbEpisode].
|
|
extension TmdbEpisodePatterns on TmdbEpisode {
|
|
/// 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( _TmdbEpisode value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEpisode() 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( _TmdbEpisode value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEpisode():
|
|
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( _TmdbEpisode value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEpisode() 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(name: 'episode_number', fromJson: _intRequired) int episodeNumber, @JsonKey(fromJson: _strOrEmpty) String name, String? overview, @JsonKey(name: 'still_path') String? stillPath, @JsonKey(name: 'air_date') String? airDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(fromJson: _intOrNull) int? runtime)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEpisode() when $default != null:
|
|
return $default(_that.episodeNumber,_that.name,_that.overview,_that.stillPath,_that.airDate,_that.voteAverage,_that.runtime);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(name: 'episode_number', fromJson: _intRequired) int episodeNumber, @JsonKey(fromJson: _strOrEmpty) String name, String? overview, @JsonKey(name: 'still_path') String? stillPath, @JsonKey(name: 'air_date') String? airDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(fromJson: _intOrNull) int? runtime) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEpisode():
|
|
return $default(_that.episodeNumber,_that.name,_that.overview,_that.stillPath,_that.airDate,_that.voteAverage,_that.runtime);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(name: 'episode_number', fromJson: _intRequired) int episodeNumber, @JsonKey(fromJson: _strOrEmpty) String name, String? overview, @JsonKey(name: 'still_path') String? stillPath, @JsonKey(name: 'air_date') String? airDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(fromJson: _intOrNull) int? runtime)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEpisode() when $default != null:
|
|
return $default(_that.episodeNumber,_that.name,_that.overview,_that.stillPath,_that.airDate,_that.voteAverage,_that.runtime);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbEpisode implements TmdbEpisode {
|
|
const _TmdbEpisode({@JsonKey(name: 'episode_number', fromJson: _intRequired) required this.episodeNumber, @JsonKey(fromJson: _strOrEmpty) this.name = '', this.overview, @JsonKey(name: 'still_path') this.stillPath, @JsonKey(name: 'air_date') this.airDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) this.voteAverage, @JsonKey(fromJson: _intOrNull) this.runtime});
|
|
factory _TmdbEpisode.fromJson(Map<String, dynamic> json) => _$TmdbEpisodeFromJson(json);
|
|
|
|
@override@JsonKey(name: 'episode_number', fromJson: _intRequired) final int episodeNumber;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
@override final String? overview;
|
|
@override@JsonKey(name: 'still_path') final String? stillPath;
|
|
@override@JsonKey(name: 'air_date') final String? airDate;
|
|
@override@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) final double? voteAverage;
|
|
@override@JsonKey(fromJson: _intOrNull) final int? runtime;
|
|
|
|
/// Create a copy of TmdbEpisode
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbEpisodeCopyWith<_TmdbEpisode> get copyWith => __$TmdbEpisodeCopyWithImpl<_TmdbEpisode>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbEpisodeToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbEpisode&&(identical(other.episodeNumber, episodeNumber) || other.episodeNumber == episodeNumber)&&(identical(other.name, name) || other.name == name)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.stillPath, stillPath) || other.stillPath == stillPath)&&(identical(other.airDate, airDate) || other.airDate == airDate)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.runtime, runtime) || other.runtime == runtime));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,episodeNumber,name,overview,stillPath,airDate,voteAverage,runtime);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbEpisode(episodeNumber: $episodeNumber, name: $name, overview: $overview, stillPath: $stillPath, airDate: $airDate, voteAverage: $voteAverage, runtime: $runtime)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbEpisodeCopyWith<$Res> implements $TmdbEpisodeCopyWith<$Res> {
|
|
factory _$TmdbEpisodeCopyWith(_TmdbEpisode value, $Res Function(_TmdbEpisode) _then) = __$TmdbEpisodeCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(name: 'episode_number', fromJson: _intRequired) int episodeNumber,@JsonKey(fromJson: _strOrEmpty) String name, String? overview,@JsonKey(name: 'still_path') String? stillPath,@JsonKey(name: 'air_date') String? airDate,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(fromJson: _intOrNull) int? runtime
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbEpisodeCopyWithImpl<$Res>
|
|
implements _$TmdbEpisodeCopyWith<$Res> {
|
|
__$TmdbEpisodeCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbEpisode _self;
|
|
final $Res Function(_TmdbEpisode) _then;
|
|
|
|
/// Create a copy of TmdbEpisode
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? episodeNumber = null,Object? name = null,Object? overview = freezed,Object? stillPath = freezed,Object? airDate = freezed,Object? voteAverage = freezed,Object? runtime = freezed,}) {
|
|
return _then(_TmdbEpisode(
|
|
episodeNumber: null == episodeNumber ? _self.episodeNumber : episodeNumber // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,stillPath: freezed == stillPath ? _self.stillPath : stillPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,airDate: freezed == airDate ? _self.airDate : airDate // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,runtime: freezed == runtime ? _self.runtime : runtime // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbSeasonDetail {
|
|
|
|
@JsonKey(name: 'season_number', fromJson: _intRequired) int get seasonNumber;@JsonKey(fromJson: _strOrEmpty) String get name; String? get overview;@JsonKey(name: 'poster_path') String? get posterPath; List<TmdbEpisode> get episodes;
|
|
/// Create a copy of TmdbSeasonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbSeasonDetailCopyWith<TmdbSeasonDetail> get copyWith => _$TmdbSeasonDetailCopyWithImpl<TmdbSeasonDetail>(this as TmdbSeasonDetail, _$identity);
|
|
|
|
/// Serializes this TmdbSeasonDetail to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbSeasonDetail&&(identical(other.seasonNumber, seasonNumber) || other.seasonNumber == seasonNumber)&&(identical(other.name, name) || other.name == name)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&const DeepCollectionEquality().equals(other.episodes, episodes));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,seasonNumber,name,overview,posterPath,const DeepCollectionEquality().hash(episodes));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbSeasonDetail(seasonNumber: $seasonNumber, name: $name, overview: $overview, posterPath: $posterPath, episodes: $episodes)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbSeasonDetailCopyWith<$Res> {
|
|
factory $TmdbSeasonDetailCopyWith(TmdbSeasonDetail value, $Res Function(TmdbSeasonDetail) _then) = _$TmdbSeasonDetailCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: 'season_number', fromJson: _intRequired) int seasonNumber,@JsonKey(fromJson: _strOrEmpty) String name, String? overview,@JsonKey(name: 'poster_path') String? posterPath, List<TmdbEpisode> episodes
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbSeasonDetailCopyWithImpl<$Res>
|
|
implements $TmdbSeasonDetailCopyWith<$Res> {
|
|
_$TmdbSeasonDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbSeasonDetail _self;
|
|
final $Res Function(TmdbSeasonDetail) _then;
|
|
|
|
/// Create a copy of TmdbSeasonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? seasonNumber = null,Object? name = null,Object? overview = freezed,Object? posterPath = freezed,Object? episodes = null,}) {
|
|
return _then(_self.copyWith(
|
|
seasonNumber: null == seasonNumber ? _self.seasonNumber : seasonNumber // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,episodes: null == episodes ? _self.episodes : episodes // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbEpisode>,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbSeasonDetail].
|
|
extension TmdbSeasonDetailPatterns on TmdbSeasonDetail {
|
|
/// 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( _TmdbSeasonDetail value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbSeasonDetail() 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( _TmdbSeasonDetail value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbSeasonDetail():
|
|
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( _TmdbSeasonDetail value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbSeasonDetail() 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(name: 'season_number', fromJson: _intRequired) int seasonNumber, @JsonKey(fromJson: _strOrEmpty) String name, String? overview, @JsonKey(name: 'poster_path') String? posterPath, List<TmdbEpisode> episodes)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbSeasonDetail() when $default != null:
|
|
return $default(_that.seasonNumber,_that.name,_that.overview,_that.posterPath,_that.episodes);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(name: 'season_number', fromJson: _intRequired) int seasonNumber, @JsonKey(fromJson: _strOrEmpty) String name, String? overview, @JsonKey(name: 'poster_path') String? posterPath, List<TmdbEpisode> episodes) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbSeasonDetail():
|
|
return $default(_that.seasonNumber,_that.name,_that.overview,_that.posterPath,_that.episodes);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(name: 'season_number', fromJson: _intRequired) int seasonNumber, @JsonKey(fromJson: _strOrEmpty) String name, String? overview, @JsonKey(name: 'poster_path') String? posterPath, List<TmdbEpisode> episodes)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbSeasonDetail() when $default != null:
|
|
return $default(_that.seasonNumber,_that.name,_that.overview,_that.posterPath,_that.episodes);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbSeasonDetail implements TmdbSeasonDetail {
|
|
const _TmdbSeasonDetail({@JsonKey(name: 'season_number', fromJson: _intRequired) required this.seasonNumber, @JsonKey(fromJson: _strOrEmpty) this.name = '', this.overview, @JsonKey(name: 'poster_path') this.posterPath, final List<TmdbEpisode> episodes = const <TmdbEpisode>[]}): _episodes = episodes;
|
|
factory _TmdbSeasonDetail.fromJson(Map<String, dynamic> json) => _$TmdbSeasonDetailFromJson(json);
|
|
|
|
@override@JsonKey(name: 'season_number', fromJson: _intRequired) final int seasonNumber;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
@override final String? overview;
|
|
@override@JsonKey(name: 'poster_path') final String? posterPath;
|
|
final List<TmdbEpisode> _episodes;
|
|
@override@JsonKey() List<TmdbEpisode> get episodes {
|
|
if (_episodes is EqualUnmodifiableListView) return _episodes;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_episodes);
|
|
}
|
|
|
|
|
|
/// Create a copy of TmdbSeasonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbSeasonDetailCopyWith<_TmdbSeasonDetail> get copyWith => __$TmdbSeasonDetailCopyWithImpl<_TmdbSeasonDetail>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbSeasonDetailToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbSeasonDetail&&(identical(other.seasonNumber, seasonNumber) || other.seasonNumber == seasonNumber)&&(identical(other.name, name) || other.name == name)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&const DeepCollectionEquality().equals(other._episodes, _episodes));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,seasonNumber,name,overview,posterPath,const DeepCollectionEquality().hash(_episodes));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbSeasonDetail(seasonNumber: $seasonNumber, name: $name, overview: $overview, posterPath: $posterPath, episodes: $episodes)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbSeasonDetailCopyWith<$Res> implements $TmdbSeasonDetailCopyWith<$Res> {
|
|
factory _$TmdbSeasonDetailCopyWith(_TmdbSeasonDetail value, $Res Function(_TmdbSeasonDetail) _then) = __$TmdbSeasonDetailCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(name: 'season_number', fromJson: _intRequired) int seasonNumber,@JsonKey(fromJson: _strOrEmpty) String name, String? overview,@JsonKey(name: 'poster_path') String? posterPath, List<TmdbEpisode> episodes
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbSeasonDetailCopyWithImpl<$Res>
|
|
implements _$TmdbSeasonDetailCopyWith<$Res> {
|
|
__$TmdbSeasonDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbSeasonDetail _self;
|
|
final $Res Function(_TmdbSeasonDetail) _then;
|
|
|
|
/// Create a copy of TmdbSeasonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? seasonNumber = null,Object? name = null,Object? overview = freezed,Object? posterPath = freezed,Object? episodes = null,}) {
|
|
return _then(_TmdbSeasonDetail(
|
|
seasonNumber: null == seasonNumber ? _self.seasonNumber : seasonNumber // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,episodes: null == episodes ? _self._episodes : episodes // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbEpisode>,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbVideo {
|
|
|
|
@JsonKey(fromJson: _strOrEmpty) String get id;@JsonKey(fromJson: _strOrEmpty) String get key;@JsonKey(fromJson: _strOrEmpty) String get name;@JsonKey(fromJson: _strOrEmpty) String get site;@JsonKey(fromJson: _strOrEmpty) String get type;@JsonKey(fromJson: _intOrZero) int get size;@JsonKey(fromJson: _boolOrFalse) bool get official;
|
|
/// Create a copy of TmdbVideo
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbVideoCopyWith<TmdbVideo> get copyWith => _$TmdbVideoCopyWithImpl<TmdbVideo>(this as TmdbVideo, _$identity);
|
|
|
|
/// Serializes this TmdbVideo to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbVideo&&(identical(other.id, id) || other.id == id)&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)&&(identical(other.site, site) || other.site == site)&&(identical(other.type, type) || other.type == type)&&(identical(other.size, size) || other.size == size)&&(identical(other.official, official) || other.official == official));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,key,name,site,type,size,official);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbVideo(id: $id, key: $key, name: $name, site: $site, type: $type, size: $size, official: $official)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbVideoCopyWith<$Res> {
|
|
factory $TmdbVideoCopyWith(TmdbVideo value, $Res Function(TmdbVideo) _then) = _$TmdbVideoCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _strOrEmpty) String id,@JsonKey(fromJson: _strOrEmpty) String key,@JsonKey(fromJson: _strOrEmpty) String name,@JsonKey(fromJson: _strOrEmpty) String site,@JsonKey(fromJson: _strOrEmpty) String type,@JsonKey(fromJson: _intOrZero) int size,@JsonKey(fromJson: _boolOrFalse) bool official
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbVideoCopyWithImpl<$Res>
|
|
implements $TmdbVideoCopyWith<$Res> {
|
|
_$TmdbVideoCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbVideo _self;
|
|
final $Res Function(TmdbVideo) _then;
|
|
|
|
/// Create a copy of TmdbVideo
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? key = null,Object? name = null,Object? site = null,Object? type = null,Object? size = null,Object? official = null,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,site: null == site ? _self.site : site // ignore: cast_nullable_to_non_nullable
|
|
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
|
as String,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
|
as int,official: null == official ? _self.official : official // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbVideo].
|
|
extension TmdbVideoPatterns on TmdbVideo {
|
|
/// 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( _TmdbVideo value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideo() 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( _TmdbVideo value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideo():
|
|
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( _TmdbVideo value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideo() 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: _strOrEmpty) String id, @JsonKey(fromJson: _strOrEmpty) String key, @JsonKey(fromJson: _strOrEmpty) String name, @JsonKey(fromJson: _strOrEmpty) String site, @JsonKey(fromJson: _strOrEmpty) String type, @JsonKey(fromJson: _intOrZero) int size, @JsonKey(fromJson: _boolOrFalse) bool official)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideo() when $default != null:
|
|
return $default(_that.id,_that.key,_that.name,_that.site,_that.type,_that.size,_that.official);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: _strOrEmpty) String id, @JsonKey(fromJson: _strOrEmpty) String key, @JsonKey(fromJson: _strOrEmpty) String name, @JsonKey(fromJson: _strOrEmpty) String site, @JsonKey(fromJson: _strOrEmpty) String type, @JsonKey(fromJson: _intOrZero) int size, @JsonKey(fromJson: _boolOrFalse) bool official) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideo():
|
|
return $default(_that.id,_that.key,_that.name,_that.site,_that.type,_that.size,_that.official);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: _strOrEmpty) String id, @JsonKey(fromJson: _strOrEmpty) String key, @JsonKey(fromJson: _strOrEmpty) String name, @JsonKey(fromJson: _strOrEmpty) String site, @JsonKey(fromJson: _strOrEmpty) String type, @JsonKey(fromJson: _intOrZero) int size, @JsonKey(fromJson: _boolOrFalse) bool official)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideo() when $default != null:
|
|
return $default(_that.id,_that.key,_that.name,_that.site,_that.type,_that.size,_that.official);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbVideo extends TmdbVideo {
|
|
const _TmdbVideo({@JsonKey(fromJson: _strOrEmpty) this.id = '', @JsonKey(fromJson: _strOrEmpty) this.key = '', @JsonKey(fromJson: _strOrEmpty) this.name = '', @JsonKey(fromJson: _strOrEmpty) this.site = '', @JsonKey(fromJson: _strOrEmpty) this.type = '', @JsonKey(fromJson: _intOrZero) this.size = 0, @JsonKey(fromJson: _boolOrFalse) this.official = false}): super._();
|
|
factory _TmdbVideo.fromJson(Map<String, dynamic> json) => _$TmdbVideoFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String id;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String key;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String site;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String type;
|
|
@override@JsonKey(fromJson: _intOrZero) final int size;
|
|
@override@JsonKey(fromJson: _boolOrFalse) final bool official;
|
|
|
|
/// Create a copy of TmdbVideo
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbVideoCopyWith<_TmdbVideo> get copyWith => __$TmdbVideoCopyWithImpl<_TmdbVideo>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbVideoToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbVideo&&(identical(other.id, id) || other.id == id)&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)&&(identical(other.site, site) || other.site == site)&&(identical(other.type, type) || other.type == type)&&(identical(other.size, size) || other.size == size)&&(identical(other.official, official) || other.official == official));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,key,name,site,type,size,official);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbVideo(id: $id, key: $key, name: $name, site: $site, type: $type, size: $size, official: $official)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbVideoCopyWith<$Res> implements $TmdbVideoCopyWith<$Res> {
|
|
factory _$TmdbVideoCopyWith(_TmdbVideo value, $Res Function(_TmdbVideo) _then) = __$TmdbVideoCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _strOrEmpty) String id,@JsonKey(fromJson: _strOrEmpty) String key,@JsonKey(fromJson: _strOrEmpty) String name,@JsonKey(fromJson: _strOrEmpty) String site,@JsonKey(fromJson: _strOrEmpty) String type,@JsonKey(fromJson: _intOrZero) int size,@JsonKey(fromJson: _boolOrFalse) bool official
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbVideoCopyWithImpl<$Res>
|
|
implements _$TmdbVideoCopyWith<$Res> {
|
|
__$TmdbVideoCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbVideo _self;
|
|
final $Res Function(_TmdbVideo) _then;
|
|
|
|
/// Create a copy of TmdbVideo
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? key = null,Object? name = null,Object? site = null,Object? type = null,Object? size = null,Object? official = null,}) {
|
|
return _then(_TmdbVideo(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,site: null == site ? _self.site : site // ignore: cast_nullable_to_non_nullable
|
|
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
|
as String,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
|
as int,official: null == official ? _self.official : official // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbVideosRes {
|
|
|
|
List<TmdbVideo> get results;
|
|
/// Create a copy of TmdbVideosRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbVideosResCopyWith<TmdbVideosRes> get copyWith => _$TmdbVideosResCopyWithImpl<TmdbVideosRes>(this as TmdbVideosRes, _$identity);
|
|
|
|
/// Serializes this TmdbVideosRes to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbVideosRes&&const DeepCollectionEquality().equals(other.results, results));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(results));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbVideosRes(results: $results)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbVideosResCopyWith<$Res> {
|
|
factory $TmdbVideosResCopyWith(TmdbVideosRes value, $Res Function(TmdbVideosRes) _then) = _$TmdbVideosResCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
List<TmdbVideo> results
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbVideosResCopyWithImpl<$Res>
|
|
implements $TmdbVideosResCopyWith<$Res> {
|
|
_$TmdbVideosResCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbVideosRes _self;
|
|
final $Res Function(TmdbVideosRes) _then;
|
|
|
|
/// Create a copy of TmdbVideosRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? results = null,}) {
|
|
return _then(_self.copyWith(
|
|
results: null == results ? _self.results : results // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbVideo>,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbVideosRes].
|
|
extension TmdbVideosResPatterns on TmdbVideosRes {
|
|
/// 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( _TmdbVideosRes value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideosRes() 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( _TmdbVideosRes value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideosRes():
|
|
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( _TmdbVideosRes value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideosRes() 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( List<TmdbVideo> results)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideosRes() when $default != null:
|
|
return $default(_that.results);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( List<TmdbVideo> results) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideosRes():
|
|
return $default(_that.results);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( List<TmdbVideo> results)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbVideosRes() when $default != null:
|
|
return $default(_that.results);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbVideosRes implements TmdbVideosRes {
|
|
const _TmdbVideosRes({final List<TmdbVideo> results = const <TmdbVideo>[]}): _results = results;
|
|
factory _TmdbVideosRes.fromJson(Map<String, dynamic> json) => _$TmdbVideosResFromJson(json);
|
|
|
|
final List<TmdbVideo> _results;
|
|
@override@JsonKey() List<TmdbVideo> get results {
|
|
if (_results is EqualUnmodifiableListView) return _results;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_results);
|
|
}
|
|
|
|
|
|
/// Create a copy of TmdbVideosRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbVideosResCopyWith<_TmdbVideosRes> get copyWith => __$TmdbVideosResCopyWithImpl<_TmdbVideosRes>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbVideosResToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbVideosRes&&const DeepCollectionEquality().equals(other._results, _results));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_results));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbVideosRes(results: $results)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbVideosResCopyWith<$Res> implements $TmdbVideosResCopyWith<$Res> {
|
|
factory _$TmdbVideosResCopyWith(_TmdbVideosRes value, $Res Function(_TmdbVideosRes) _then) = __$TmdbVideosResCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
List<TmdbVideo> results
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbVideosResCopyWithImpl<$Res>
|
|
implements _$TmdbVideosResCopyWith<$Res> {
|
|
__$TmdbVideosResCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbVideosRes _self;
|
|
final $Res Function(_TmdbVideosRes) _then;
|
|
|
|
/// Create a copy of TmdbVideosRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? results = null,}) {
|
|
return _then(_TmdbVideosRes(
|
|
results: null == results ? _self._results : results // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbVideo>,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbPersonDetail {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id;@JsonKey(fromJson: _strOrEmpty) String get name; String? get biography; String? get birthday; String? get deathday;@JsonKey(name: 'place_of_birth') String? get placeOfBirth;@JsonKey(name: 'profile_path') String? get profilePath;@JsonKey(name: 'known_for_department') String? get knownForDepartment;@JsonKey(fromJson: _doubleOrNull) double? get popularity;
|
|
/// Create a copy of TmdbPersonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbPersonDetailCopyWith<TmdbPersonDetail> get copyWith => _$TmdbPersonDetailCopyWithImpl<TmdbPersonDetail>(this as TmdbPersonDetail, _$identity);
|
|
|
|
/// Serializes this TmdbPersonDetail to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbPersonDetail&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.biography, biography) || other.biography == biography)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.deathday, deathday) || other.deathday == deathday)&&(identical(other.placeOfBirth, placeOfBirth) || other.placeOfBirth == placeOfBirth)&&(identical(other.profilePath, profilePath) || other.profilePath == profilePath)&&(identical(other.knownForDepartment, knownForDepartment) || other.knownForDepartment == knownForDepartment)&&(identical(other.popularity, popularity) || other.popularity == popularity));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,biography,birthday,deathday,placeOfBirth,profilePath,knownForDepartment,popularity);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbPersonDetail(id: $id, name: $name, biography: $biography, birthday: $birthday, deathday: $deathday, placeOfBirth: $placeOfBirth, profilePath: $profilePath, knownForDepartment: $knownForDepartment, popularity: $popularity)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbPersonDetailCopyWith<$Res> {
|
|
factory $TmdbPersonDetailCopyWith(TmdbPersonDetail value, $Res Function(TmdbPersonDetail) _then) = _$TmdbPersonDetailCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name, String? biography, String? birthday, String? deathday,@JsonKey(name: 'place_of_birth') String? placeOfBirth,@JsonKey(name: 'profile_path') String? profilePath,@JsonKey(name: 'known_for_department') String? knownForDepartment,@JsonKey(fromJson: _doubleOrNull) double? popularity
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbPersonDetailCopyWithImpl<$Res>
|
|
implements $TmdbPersonDetailCopyWith<$Res> {
|
|
_$TmdbPersonDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbPersonDetail _self;
|
|
final $Res Function(TmdbPersonDetail) _then;
|
|
|
|
/// Create a copy of TmdbPersonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? biography = freezed,Object? birthday = freezed,Object? deathday = freezed,Object? placeOfBirth = freezed,Object? profilePath = freezed,Object? knownForDepartment = freezed,Object? popularity = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,biography: freezed == biography ? _self.biography : biography // ignore: cast_nullable_to_non_nullable
|
|
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
|
as String?,deathday: freezed == deathday ? _self.deathday : deathday // ignore: cast_nullable_to_non_nullable
|
|
as String?,placeOfBirth: freezed == placeOfBirth ? _self.placeOfBirth : placeOfBirth // ignore: cast_nullable_to_non_nullable
|
|
as String?,profilePath: freezed == profilePath ? _self.profilePath : profilePath // ignore: cast_nullable_to_non_nullable
|
|
as String?,knownForDepartment: freezed == knownForDepartment ? _self.knownForDepartment : knownForDepartment // ignore: cast_nullable_to_non_nullable
|
|
as String?,popularity: freezed == popularity ? _self.popularity : popularity // ignore: cast_nullable_to_non_nullable
|
|
as double?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbPersonDetail].
|
|
extension TmdbPersonDetailPatterns on TmdbPersonDetail {
|
|
/// 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( _TmdbPersonDetail value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonDetail() 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( _TmdbPersonDetail value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonDetail():
|
|
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( _TmdbPersonDetail value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonDetail() 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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? biography, String? birthday, String? deathday, @JsonKey(name: 'place_of_birth') String? placeOfBirth, @JsonKey(name: 'profile_path') String? profilePath, @JsonKey(name: 'known_for_department') String? knownForDepartment, @JsonKey(fromJson: _doubleOrNull) double? popularity)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonDetail() when $default != null:
|
|
return $default(_that.id,_that.name,_that.biography,_that.birthday,_that.deathday,_that.placeOfBirth,_that.profilePath,_that.knownForDepartment,_that.popularity);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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? biography, String? birthday, String? deathday, @JsonKey(name: 'place_of_birth') String? placeOfBirth, @JsonKey(name: 'profile_path') String? profilePath, @JsonKey(name: 'known_for_department') String? knownForDepartment, @JsonKey(fromJson: _doubleOrNull) double? popularity) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonDetail():
|
|
return $default(_that.id,_that.name,_that.biography,_that.birthday,_that.deathday,_that.placeOfBirth,_that.profilePath,_that.knownForDepartment,_that.popularity);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 id, @JsonKey(fromJson: _strOrEmpty) String name, String? biography, String? birthday, String? deathday, @JsonKey(name: 'place_of_birth') String? placeOfBirth, @JsonKey(name: 'profile_path') String? profilePath, @JsonKey(name: 'known_for_department') String? knownForDepartment, @JsonKey(fromJson: _doubleOrNull) double? popularity)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonDetail() when $default != null:
|
|
return $default(_that.id,_that.name,_that.biography,_that.birthday,_that.deathday,_that.placeOfBirth,_that.profilePath,_that.knownForDepartment,_that.popularity);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbPersonDetail implements TmdbPersonDetail {
|
|
const _TmdbPersonDetail({@JsonKey(fromJson: _intRequired) required this.id, @JsonKey(fromJson: _strOrEmpty) this.name = '', this.biography, this.birthday, this.deathday, @JsonKey(name: 'place_of_birth') this.placeOfBirth, @JsonKey(name: 'profile_path') this.profilePath, @JsonKey(name: 'known_for_department') this.knownForDepartment, @JsonKey(fromJson: _doubleOrNull) this.popularity});
|
|
factory _TmdbPersonDetail.fromJson(Map<String, dynamic> json) => _$TmdbPersonDetailFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
@override final String? biography;
|
|
@override final String? birthday;
|
|
@override final String? deathday;
|
|
@override@JsonKey(name: 'place_of_birth') final String? placeOfBirth;
|
|
@override@JsonKey(name: 'profile_path') final String? profilePath;
|
|
@override@JsonKey(name: 'known_for_department') final String? knownForDepartment;
|
|
@override@JsonKey(fromJson: _doubleOrNull) final double? popularity;
|
|
|
|
/// Create a copy of TmdbPersonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbPersonDetailCopyWith<_TmdbPersonDetail> get copyWith => __$TmdbPersonDetailCopyWithImpl<_TmdbPersonDetail>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbPersonDetailToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbPersonDetail&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.biography, biography) || other.biography == biography)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.deathday, deathday) || other.deathday == deathday)&&(identical(other.placeOfBirth, placeOfBirth) || other.placeOfBirth == placeOfBirth)&&(identical(other.profilePath, profilePath) || other.profilePath == profilePath)&&(identical(other.knownForDepartment, knownForDepartment) || other.knownForDepartment == knownForDepartment)&&(identical(other.popularity, popularity) || other.popularity == popularity));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,biography,birthday,deathday,placeOfBirth,profilePath,knownForDepartment,popularity);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbPersonDetail(id: $id, name: $name, biography: $biography, birthday: $birthday, deathday: $deathday, placeOfBirth: $placeOfBirth, profilePath: $profilePath, knownForDepartment: $knownForDepartment, popularity: $popularity)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbPersonDetailCopyWith<$Res> implements $TmdbPersonDetailCopyWith<$Res> {
|
|
factory _$TmdbPersonDetailCopyWith(_TmdbPersonDetail value, $Res Function(_TmdbPersonDetail) _then) = __$TmdbPersonDetailCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name, String? biography, String? birthday, String? deathday,@JsonKey(name: 'place_of_birth') String? placeOfBirth,@JsonKey(name: 'profile_path') String? profilePath,@JsonKey(name: 'known_for_department') String? knownForDepartment,@JsonKey(fromJson: _doubleOrNull) double? popularity
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbPersonDetailCopyWithImpl<$Res>
|
|
implements _$TmdbPersonDetailCopyWith<$Res> {
|
|
__$TmdbPersonDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbPersonDetail _self;
|
|
final $Res Function(_TmdbPersonDetail) _then;
|
|
|
|
/// Create a copy of TmdbPersonDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? biography = freezed,Object? birthday = freezed,Object? deathday = freezed,Object? placeOfBirth = freezed,Object? profilePath = freezed,Object? knownForDepartment = freezed,Object? popularity = freezed,}) {
|
|
return _then(_TmdbPersonDetail(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,biography: freezed == biography ? _self.biography : biography // ignore: cast_nullable_to_non_nullable
|
|
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
|
as String?,deathday: freezed == deathday ? _self.deathday : deathday // ignore: cast_nullable_to_non_nullable
|
|
as String?,placeOfBirth: freezed == placeOfBirth ? _self.placeOfBirth : placeOfBirth // ignore: cast_nullable_to_non_nullable
|
|
as String?,profilePath: freezed == profilePath ? _self.profilePath : profilePath // ignore: cast_nullable_to_non_nullable
|
|
as String?,knownForDepartment: freezed == knownForDepartment ? _self.knownForDepartment : knownForDepartment // ignore: cast_nullable_to_non_nullable
|
|
as String?,popularity: freezed == popularity ? _self.popularity : popularity // ignore: cast_nullable_to_non_nullable
|
|
as double?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbPersonCredit {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id; String get title; String? get character;@JsonKey(name: 'poster_path') String? get posterPath;@JsonKey(name: 'release_date') String? get releaseDate;@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? get voteAverage;@JsonKey(name: 'media_type') String? get mediaType;
|
|
/// Create a copy of TmdbPersonCredit
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbPersonCreditCopyWith<TmdbPersonCredit> get copyWith => _$TmdbPersonCreditCopyWithImpl<TmdbPersonCredit>(this as TmdbPersonCredit, _$identity);
|
|
|
|
/// Serializes this TmdbPersonCredit to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbPersonCredit&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.character, character) || other.character == character)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.releaseDate, releaseDate) || other.releaseDate == releaseDate)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.mediaType, mediaType) || other.mediaType == mediaType));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,title,character,posterPath,releaseDate,voteAverage,mediaType);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbPersonCredit(id: $id, title: $title, character: $character, posterPath: $posterPath, releaseDate: $releaseDate, voteAverage: $voteAverage, mediaType: $mediaType)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbPersonCreditCopyWith<$Res> {
|
|
factory $TmdbPersonCreditCopyWith(TmdbPersonCredit value, $Res Function(TmdbPersonCredit) _then) = _$TmdbPersonCreditCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id, String title, String? character,@JsonKey(name: 'poster_path') String? posterPath,@JsonKey(name: 'release_date') String? releaseDate,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'media_type') String? mediaType
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbPersonCreditCopyWithImpl<$Res>
|
|
implements $TmdbPersonCreditCopyWith<$Res> {
|
|
_$TmdbPersonCreditCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbPersonCredit _self;
|
|
final $Res Function(TmdbPersonCredit) _then;
|
|
|
|
/// Create a copy of TmdbPersonCredit
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? character = freezed,Object? posterPath = freezed,Object? releaseDate = freezed,Object? voteAverage = freezed,Object? mediaType = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
|
as String,character: freezed == character ? _self.character : character // ignore: cast_nullable_to_non_nullable
|
|
as String?,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,releaseDate: freezed == releaseDate ? _self.releaseDate : releaseDate // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,mediaType: freezed == mediaType ? _self.mediaType : mediaType // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbPersonCredit].
|
|
extension TmdbPersonCreditPatterns on TmdbPersonCredit {
|
|
/// 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( _TmdbPersonCredit value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCredit() 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( _TmdbPersonCredit value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCredit():
|
|
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( _TmdbPersonCredit value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCredit() 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 id, String title, String? character, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'release_date') String? releaseDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'media_type') String? mediaType)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCredit() when $default != null:
|
|
return $default(_that.id,_that.title,_that.character,_that.posterPath,_that.releaseDate,_that.voteAverage,_that.mediaType);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 id, String title, String? character, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'release_date') String? releaseDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'media_type') String? mediaType) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCredit():
|
|
return $default(_that.id,_that.title,_that.character,_that.posterPath,_that.releaseDate,_that.voteAverage,_that.mediaType);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 id, String title, String? character, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'release_date') String? releaseDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'media_type') String? mediaType)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCredit() when $default != null:
|
|
return $default(_that.id,_that.title,_that.character,_that.posterPath,_that.releaseDate,_that.voteAverage,_that.mediaType);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbPersonCredit implements TmdbPersonCredit {
|
|
const _TmdbPersonCredit({@JsonKey(fromJson: _intRequired) required this.id, required this.title, this.character, @JsonKey(name: 'poster_path') this.posterPath, @JsonKey(name: 'release_date') this.releaseDate, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) this.voteAverage, @JsonKey(name: 'media_type') this.mediaType});
|
|
factory _TmdbPersonCredit.fromJson(Map<String, dynamic> json) => _$TmdbPersonCreditFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override final String title;
|
|
@override final String? character;
|
|
@override@JsonKey(name: 'poster_path') final String? posterPath;
|
|
@override@JsonKey(name: 'release_date') final String? releaseDate;
|
|
@override@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) final double? voteAverage;
|
|
@override@JsonKey(name: 'media_type') final String? mediaType;
|
|
|
|
/// Create a copy of TmdbPersonCredit
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbPersonCreditCopyWith<_TmdbPersonCredit> get copyWith => __$TmdbPersonCreditCopyWithImpl<_TmdbPersonCredit>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbPersonCreditToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbPersonCredit&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.character, character) || other.character == character)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.releaseDate, releaseDate) || other.releaseDate == releaseDate)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.mediaType, mediaType) || other.mediaType == mediaType));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,title,character,posterPath,releaseDate,voteAverage,mediaType);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbPersonCredit(id: $id, title: $title, character: $character, posterPath: $posterPath, releaseDate: $releaseDate, voteAverage: $voteAverage, mediaType: $mediaType)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbPersonCreditCopyWith<$Res> implements $TmdbPersonCreditCopyWith<$Res> {
|
|
factory _$TmdbPersonCreditCopyWith(_TmdbPersonCredit value, $Res Function(_TmdbPersonCredit) _then) = __$TmdbPersonCreditCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id, String title, String? character,@JsonKey(name: 'poster_path') String? posterPath,@JsonKey(name: 'release_date') String? releaseDate,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'media_type') String? mediaType
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbPersonCreditCopyWithImpl<$Res>
|
|
implements _$TmdbPersonCreditCopyWith<$Res> {
|
|
__$TmdbPersonCreditCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbPersonCredit _self;
|
|
final $Res Function(_TmdbPersonCredit) _then;
|
|
|
|
/// Create a copy of TmdbPersonCredit
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? character = freezed,Object? posterPath = freezed,Object? releaseDate = freezed,Object? voteAverage = freezed,Object? mediaType = freezed,}) {
|
|
return _then(_TmdbPersonCredit(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
|
as String,character: freezed == character ? _self.character : character // ignore: cast_nullable_to_non_nullable
|
|
as String?,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,releaseDate: freezed == releaseDate ? _self.releaseDate : releaseDate // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,mediaType: freezed == mediaType ? _self.mediaType : mediaType // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbPersonCreditsRes {
|
|
|
|
List<TmdbPersonCredit> get cast;
|
|
/// Create a copy of TmdbPersonCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbPersonCreditsResCopyWith<TmdbPersonCreditsRes> get copyWith => _$TmdbPersonCreditsResCopyWithImpl<TmdbPersonCreditsRes>(this as TmdbPersonCreditsRes, _$identity);
|
|
|
|
/// Serializes this TmdbPersonCreditsRes to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbPersonCreditsRes&&const DeepCollectionEquality().equals(other.cast, cast));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(cast));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbPersonCreditsRes(cast: $cast)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbPersonCreditsResCopyWith<$Res> {
|
|
factory $TmdbPersonCreditsResCopyWith(TmdbPersonCreditsRes value, $Res Function(TmdbPersonCreditsRes) _then) = _$TmdbPersonCreditsResCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
List<TmdbPersonCredit> cast
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbPersonCreditsResCopyWithImpl<$Res>
|
|
implements $TmdbPersonCreditsResCopyWith<$Res> {
|
|
_$TmdbPersonCreditsResCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbPersonCreditsRes _self;
|
|
final $Res Function(TmdbPersonCreditsRes) _then;
|
|
|
|
/// Create a copy of TmdbPersonCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? cast = null,}) {
|
|
return _then(_self.copyWith(
|
|
cast: null == cast ? _self.cast : cast // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbPersonCredit>,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbPersonCreditsRes].
|
|
extension TmdbPersonCreditsResPatterns on TmdbPersonCreditsRes {
|
|
/// 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( _TmdbPersonCreditsRes value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCreditsRes() 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( _TmdbPersonCreditsRes value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCreditsRes():
|
|
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( _TmdbPersonCreditsRes value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCreditsRes() 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( List<TmdbPersonCredit> cast)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCreditsRes() when $default != null:
|
|
return $default(_that.cast);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( List<TmdbPersonCredit> cast) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCreditsRes():
|
|
return $default(_that.cast);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( List<TmdbPersonCredit> cast)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbPersonCreditsRes() when $default != null:
|
|
return $default(_that.cast);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbPersonCreditsRes implements TmdbPersonCreditsRes {
|
|
const _TmdbPersonCreditsRes({final List<TmdbPersonCredit> cast = const <TmdbPersonCredit>[]}): _cast = cast;
|
|
factory _TmdbPersonCreditsRes.fromJson(Map<String, dynamic> json) => _$TmdbPersonCreditsResFromJson(json);
|
|
|
|
final List<TmdbPersonCredit> _cast;
|
|
@override@JsonKey() List<TmdbPersonCredit> get cast {
|
|
if (_cast is EqualUnmodifiableListView) return _cast;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_cast);
|
|
}
|
|
|
|
|
|
/// Create a copy of TmdbPersonCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbPersonCreditsResCopyWith<_TmdbPersonCreditsRes> get copyWith => __$TmdbPersonCreditsResCopyWithImpl<_TmdbPersonCreditsRes>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbPersonCreditsResToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbPersonCreditsRes&&const DeepCollectionEquality().equals(other._cast, _cast));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_cast));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbPersonCreditsRes(cast: $cast)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbPersonCreditsResCopyWith<$Res> implements $TmdbPersonCreditsResCopyWith<$Res> {
|
|
factory _$TmdbPersonCreditsResCopyWith(_TmdbPersonCreditsRes value, $Res Function(_TmdbPersonCreditsRes) _then) = __$TmdbPersonCreditsResCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
List<TmdbPersonCredit> cast
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbPersonCreditsResCopyWithImpl<$Res>
|
|
implements _$TmdbPersonCreditsResCopyWith<$Res> {
|
|
__$TmdbPersonCreditsResCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbPersonCreditsRes _self;
|
|
final $Res Function(_TmdbPersonCreditsRes) _then;
|
|
|
|
/// Create a copy of TmdbPersonCreditsRes
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? cast = null,}) {
|
|
return _then(_TmdbPersonCreditsRes(
|
|
cast: null == cast ? _self._cast : cast // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbPersonCredit>,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbGenre {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id;@JsonKey(fromJson: _strOrEmpty) String get name;
|
|
/// Create a copy of TmdbGenre
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbGenreCopyWith<TmdbGenre> get copyWith => _$TmdbGenreCopyWithImpl<TmdbGenre>(this as TmdbGenre, _$identity);
|
|
|
|
/// Serializes this TmdbGenre to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbGenre&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbGenre(id: $id, name: $name)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbGenreCopyWith<$Res> {
|
|
factory $TmdbGenreCopyWith(TmdbGenre value, $Res Function(TmdbGenre) _then) = _$TmdbGenreCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbGenreCopyWithImpl<$Res>
|
|
implements $TmdbGenreCopyWith<$Res> {
|
|
_$TmdbGenreCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbGenre _self;
|
|
final $Res Function(TmdbGenre) _then;
|
|
|
|
/// Create a copy of TmdbGenre
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbGenre].
|
|
extension TmdbGenrePatterns on TmdbGenre {
|
|
/// 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( _TmdbGenre value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbGenre() 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( _TmdbGenre value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbGenre():
|
|
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( _TmdbGenre value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbGenre() 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 id, @JsonKey(fromJson: _strOrEmpty) String name)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbGenre() when $default != null:
|
|
return $default(_that.id,_that.name);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 id, @JsonKey(fromJson: _strOrEmpty) String name) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbGenre():
|
|
return $default(_that.id,_that.name);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 id, @JsonKey(fromJson: _strOrEmpty) String name)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbGenre() when $default != null:
|
|
return $default(_that.id,_that.name);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbGenre implements TmdbGenre {
|
|
const _TmdbGenre({@JsonKey(fromJson: _intRequired) required this.id, @JsonKey(fromJson: _strOrEmpty) this.name = ''});
|
|
factory _TmdbGenre.fromJson(Map<String, dynamic> json) => _$TmdbGenreFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
|
|
/// Create a copy of TmdbGenre
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbGenreCopyWith<_TmdbGenre> get copyWith => __$TmdbGenreCopyWithImpl<_TmdbGenre>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbGenreToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbGenre&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbGenre(id: $id, name: $name)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbGenreCopyWith<$Res> implements $TmdbGenreCopyWith<$Res> {
|
|
factory _$TmdbGenreCopyWith(_TmdbGenre value, $Res Function(_TmdbGenre) _then) = __$TmdbGenreCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbGenreCopyWithImpl<$Res>
|
|
implements _$TmdbGenreCopyWith<$Res> {
|
|
__$TmdbGenreCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbGenre _self;
|
|
final $Res Function(_TmdbGenre) _then;
|
|
|
|
/// Create a copy of TmdbGenre
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,}) {
|
|
return _then(_TmdbGenre(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbMediaDetail {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id;@JsonKey(fromJson: _strOrEmpty) String get title;@JsonKey(name: 'poster_path') String? get posterPath;@JsonKey(name: 'backdrop_path') String? get backdropPath;@JsonKey(name: 'release_date') String? get releaseDate; List<TmdbGenre> get genres;@JsonKey(fromJson: _intOrNull) int? get runtime; String? get tagline; String? get overview; String? get status; String? get homepage;@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? get voteAverage;@JsonKey(name: 'vote_count', fromJson: _intOrNull) int? get voteCount;@JsonKey(fromJson: _intOrNull) int? get revenue;@JsonKey(fromJson: _intOrNull) int? get budget;
|
|
/// Create a copy of TmdbMediaDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbMediaDetailCopyWith<TmdbMediaDetail> get copyWith => _$TmdbMediaDetailCopyWithImpl<TmdbMediaDetail>(this as TmdbMediaDetail, _$identity);
|
|
|
|
/// Serializes this TmdbMediaDetail to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbMediaDetail&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.backdropPath, backdropPath) || other.backdropPath == backdropPath)&&(identical(other.releaseDate, releaseDate) || other.releaseDate == releaseDate)&&const DeepCollectionEquality().equals(other.genres, genres)&&(identical(other.runtime, runtime) || other.runtime == runtime)&&(identical(other.tagline, tagline) || other.tagline == tagline)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.status, status) || other.status == status)&&(identical(other.homepage, homepage) || other.homepage == homepage)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.voteCount, voteCount) || other.voteCount == voteCount)&&(identical(other.revenue, revenue) || other.revenue == revenue)&&(identical(other.budget, budget) || other.budget == budget));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,title,posterPath,backdropPath,releaseDate,const DeepCollectionEquality().hash(genres),runtime,tagline,overview,status,homepage,voteAverage,voteCount,revenue,budget);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbMediaDetail(id: $id, title: $title, posterPath: $posterPath, backdropPath: $backdropPath, releaseDate: $releaseDate, genres: $genres, runtime: $runtime, tagline: $tagline, overview: $overview, status: $status, homepage: $homepage, voteAverage: $voteAverage, voteCount: $voteCount, revenue: $revenue, budget: $budget)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbMediaDetailCopyWith<$Res> {
|
|
factory $TmdbMediaDetailCopyWith(TmdbMediaDetail value, $Res Function(TmdbMediaDetail) _then) = _$TmdbMediaDetailCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String title,@JsonKey(name: 'poster_path') String? posterPath,@JsonKey(name: 'backdrop_path') String? backdropPath,@JsonKey(name: 'release_date') String? releaseDate, List<TmdbGenre> genres,@JsonKey(fromJson: _intOrNull) int? runtime, String? tagline, String? overview, String? status, String? homepage,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'vote_count', fromJson: _intOrNull) int? voteCount,@JsonKey(fromJson: _intOrNull) int? revenue,@JsonKey(fromJson: _intOrNull) int? budget
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbMediaDetailCopyWithImpl<$Res>
|
|
implements $TmdbMediaDetailCopyWith<$Res> {
|
|
_$TmdbMediaDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbMediaDetail _self;
|
|
final $Res Function(TmdbMediaDetail) _then;
|
|
|
|
/// Create a copy of TmdbMediaDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? posterPath = freezed,Object? backdropPath = freezed,Object? releaseDate = freezed,Object? genres = null,Object? runtime = freezed,Object? tagline = freezed,Object? overview = freezed,Object? status = freezed,Object? homepage = freezed,Object? voteAverage = freezed,Object? voteCount = freezed,Object? revenue = freezed,Object? budget = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
|
as String,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,backdropPath: freezed == backdropPath ? _self.backdropPath : backdropPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,releaseDate: freezed == releaseDate ? _self.releaseDate : releaseDate // ignore: cast_nullable_to_non_nullable
|
|
as String?,genres: null == genres ? _self.genres : genres // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbGenre>,runtime: freezed == runtime ? _self.runtime : runtime // ignore: cast_nullable_to_non_nullable
|
|
as int?,tagline: freezed == tagline ? _self.tagline : tagline // ignore: cast_nullable_to_non_nullable
|
|
as String?,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
|
as String?,homepage: freezed == homepage ? _self.homepage : homepage // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,voteCount: freezed == voteCount ? _self.voteCount : voteCount // ignore: cast_nullable_to_non_nullable
|
|
as int?,revenue: freezed == revenue ? _self.revenue : revenue // ignore: cast_nullable_to_non_nullable
|
|
as int?,budget: freezed == budget ? _self.budget : budget // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbMediaDetail].
|
|
extension TmdbMediaDetailPatterns on TmdbMediaDetail {
|
|
/// 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( _TmdbMediaDetail value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbMediaDetail() 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( _TmdbMediaDetail value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbMediaDetail():
|
|
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( _TmdbMediaDetail value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbMediaDetail() 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 id, @JsonKey(fromJson: _strOrEmpty) String title, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'backdrop_path') String? backdropPath, @JsonKey(name: 'release_date') String? releaseDate, List<TmdbGenre> genres, @JsonKey(fromJson: _intOrNull) int? runtime, String? tagline, String? overview, String? status, String? homepage, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'vote_count', fromJson: _intOrNull) int? voteCount, @JsonKey(fromJson: _intOrNull) int? revenue, @JsonKey(fromJson: _intOrNull) int? budget)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbMediaDetail() when $default != null:
|
|
return $default(_that.id,_that.title,_that.posterPath,_that.backdropPath,_that.releaseDate,_that.genres,_that.runtime,_that.tagline,_that.overview,_that.status,_that.homepage,_that.voteAverage,_that.voteCount,_that.revenue,_that.budget);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 id, @JsonKey(fromJson: _strOrEmpty) String title, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'backdrop_path') String? backdropPath, @JsonKey(name: 'release_date') String? releaseDate, List<TmdbGenre> genres, @JsonKey(fromJson: _intOrNull) int? runtime, String? tagline, String? overview, String? status, String? homepage, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'vote_count', fromJson: _intOrNull) int? voteCount, @JsonKey(fromJson: _intOrNull) int? revenue, @JsonKey(fromJson: _intOrNull) int? budget) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbMediaDetail():
|
|
return $default(_that.id,_that.title,_that.posterPath,_that.backdropPath,_that.releaseDate,_that.genres,_that.runtime,_that.tagline,_that.overview,_that.status,_that.homepage,_that.voteAverage,_that.voteCount,_that.revenue,_that.budget);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 id, @JsonKey(fromJson: _strOrEmpty) String title, @JsonKey(name: 'poster_path') String? posterPath, @JsonKey(name: 'backdrop_path') String? backdropPath, @JsonKey(name: 'release_date') String? releaseDate, List<TmdbGenre> genres, @JsonKey(fromJson: _intOrNull) int? runtime, String? tagline, String? overview, String? status, String? homepage, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'vote_count', fromJson: _intOrNull) int? voteCount, @JsonKey(fromJson: _intOrNull) int? revenue, @JsonKey(fromJson: _intOrNull) int? budget)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbMediaDetail() when $default != null:
|
|
return $default(_that.id,_that.title,_that.posterPath,_that.backdropPath,_that.releaseDate,_that.genres,_that.runtime,_that.tagline,_that.overview,_that.status,_that.homepage,_that.voteAverage,_that.voteCount,_that.revenue,_that.budget);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbMediaDetail implements TmdbMediaDetail {
|
|
const _TmdbMediaDetail({@JsonKey(fromJson: _intRequired) required this.id, @JsonKey(fromJson: _strOrEmpty) this.title = '', @JsonKey(name: 'poster_path') this.posterPath, @JsonKey(name: 'backdrop_path') this.backdropPath, @JsonKey(name: 'release_date') this.releaseDate, final List<TmdbGenre> genres = const <TmdbGenre>[], @JsonKey(fromJson: _intOrNull) this.runtime, this.tagline, this.overview, this.status, this.homepage, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) this.voteAverage, @JsonKey(name: 'vote_count', fromJson: _intOrNull) this.voteCount, @JsonKey(fromJson: _intOrNull) this.revenue, @JsonKey(fromJson: _intOrNull) this.budget}): _genres = genres;
|
|
factory _TmdbMediaDetail.fromJson(Map<String, dynamic> json) => _$TmdbMediaDetailFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String title;
|
|
@override@JsonKey(name: 'poster_path') final String? posterPath;
|
|
@override@JsonKey(name: 'backdrop_path') final String? backdropPath;
|
|
@override@JsonKey(name: 'release_date') final String? releaseDate;
|
|
final List<TmdbGenre> _genres;
|
|
@override@JsonKey() List<TmdbGenre> get genres {
|
|
if (_genres is EqualUnmodifiableListView) return _genres;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_genres);
|
|
}
|
|
|
|
@override@JsonKey(fromJson: _intOrNull) final int? runtime;
|
|
@override final String? tagline;
|
|
@override final String? overview;
|
|
@override final String? status;
|
|
@override final String? homepage;
|
|
@override@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) final double? voteAverage;
|
|
@override@JsonKey(name: 'vote_count', fromJson: _intOrNull) final int? voteCount;
|
|
@override@JsonKey(fromJson: _intOrNull) final int? revenue;
|
|
@override@JsonKey(fromJson: _intOrNull) final int? budget;
|
|
|
|
/// Create a copy of TmdbMediaDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbMediaDetailCopyWith<_TmdbMediaDetail> get copyWith => __$TmdbMediaDetailCopyWithImpl<_TmdbMediaDetail>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbMediaDetailToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbMediaDetail&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.backdropPath, backdropPath) || other.backdropPath == backdropPath)&&(identical(other.releaseDate, releaseDate) || other.releaseDate == releaseDate)&&const DeepCollectionEquality().equals(other._genres, _genres)&&(identical(other.runtime, runtime) || other.runtime == runtime)&&(identical(other.tagline, tagline) || other.tagline == tagline)&&(identical(other.overview, overview) || other.overview == overview)&&(identical(other.status, status) || other.status == status)&&(identical(other.homepage, homepage) || other.homepage == homepage)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.voteCount, voteCount) || other.voteCount == voteCount)&&(identical(other.revenue, revenue) || other.revenue == revenue)&&(identical(other.budget, budget) || other.budget == budget));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,title,posterPath,backdropPath,releaseDate,const DeepCollectionEquality().hash(_genres),runtime,tagline,overview,status,homepage,voteAverage,voteCount,revenue,budget);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbMediaDetail(id: $id, title: $title, posterPath: $posterPath, backdropPath: $backdropPath, releaseDate: $releaseDate, genres: $genres, runtime: $runtime, tagline: $tagline, overview: $overview, status: $status, homepage: $homepage, voteAverage: $voteAverage, voteCount: $voteCount, revenue: $revenue, budget: $budget)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbMediaDetailCopyWith<$Res> implements $TmdbMediaDetailCopyWith<$Res> {
|
|
factory _$TmdbMediaDetailCopyWith(_TmdbMediaDetail value, $Res Function(_TmdbMediaDetail) _then) = __$TmdbMediaDetailCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String title,@JsonKey(name: 'poster_path') String? posterPath,@JsonKey(name: 'backdrop_path') String? backdropPath,@JsonKey(name: 'release_date') String? releaseDate, List<TmdbGenre> genres,@JsonKey(fromJson: _intOrNull) int? runtime, String? tagline, String? overview, String? status, String? homepage,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'vote_count', fromJson: _intOrNull) int? voteCount,@JsonKey(fromJson: _intOrNull) int? revenue,@JsonKey(fromJson: _intOrNull) int? budget
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbMediaDetailCopyWithImpl<$Res>
|
|
implements _$TmdbMediaDetailCopyWith<$Res> {
|
|
__$TmdbMediaDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbMediaDetail _self;
|
|
final $Res Function(_TmdbMediaDetail) _then;
|
|
|
|
/// Create a copy of TmdbMediaDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? posterPath = freezed,Object? backdropPath = freezed,Object? releaseDate = freezed,Object? genres = null,Object? runtime = freezed,Object? tagline = freezed,Object? overview = freezed,Object? status = freezed,Object? homepage = freezed,Object? voteAverage = freezed,Object? voteCount = freezed,Object? revenue = freezed,Object? budget = freezed,}) {
|
|
return _then(_TmdbMediaDetail(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
|
as String,posterPath: freezed == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,backdropPath: freezed == backdropPath ? _self.backdropPath : backdropPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,releaseDate: freezed == releaseDate ? _self.releaseDate : releaseDate // ignore: cast_nullable_to_non_nullable
|
|
as String?,genres: null == genres ? _self._genres : genres // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbGenre>,runtime: freezed == runtime ? _self.runtime : runtime // ignore: cast_nullable_to_non_nullable
|
|
as int?,tagline: freezed == tagline ? _self.tagline : tagline // ignore: cast_nullable_to_non_nullable
|
|
as String?,overview: freezed == overview ? _self.overview : overview // ignore: cast_nullable_to_non_nullable
|
|
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
|
as String?,homepage: freezed == homepage ? _self.homepage : homepage // ignore: cast_nullable_to_non_nullable
|
|
as String?,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,voteCount: freezed == voteCount ? _self.voteCount : voteCount // ignore: cast_nullable_to_non_nullable
|
|
as int?,revenue: freezed == revenue ? _self.revenue : revenue // ignore: cast_nullable_to_non_nullable
|
|
as int?,budget: freezed == budget ? _self.budget : budget // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbImage {
|
|
|
|
@JsonKey(name: 'file_path', fromJson: _strOrEmpty) String get filePath;@JsonKey(fromJson: _intOrZero) int get width;@JsonKey(fromJson: _intOrZero) int get height;@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? get voteAverage;@JsonKey(name: 'iso_639_1') String? get iso639;
|
|
/// Create a copy of TmdbImage
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbImageCopyWith<TmdbImage> get copyWith => _$TmdbImageCopyWithImpl<TmdbImage>(this as TmdbImage, _$identity);
|
|
|
|
/// Serializes this TmdbImage to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbImage&&(identical(other.filePath, filePath) || other.filePath == filePath)&&(identical(other.width, width) || other.width == width)&&(identical(other.height, height) || other.height == height)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.iso639, iso639) || other.iso639 == iso639));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,filePath,width,height,voteAverage,iso639);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbImage(filePath: $filePath, width: $width, height: $height, voteAverage: $voteAverage, iso639: $iso639)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbImageCopyWith<$Res> {
|
|
factory $TmdbImageCopyWith(TmdbImage value, $Res Function(TmdbImage) _then) = _$TmdbImageCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: 'file_path', fromJson: _strOrEmpty) String filePath,@JsonKey(fromJson: _intOrZero) int width,@JsonKey(fromJson: _intOrZero) int height,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'iso_639_1') String? iso639
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbImageCopyWithImpl<$Res>
|
|
implements $TmdbImageCopyWith<$Res> {
|
|
_$TmdbImageCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbImage _self;
|
|
final $Res Function(TmdbImage) _then;
|
|
|
|
/// Create a copy of TmdbImage
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? filePath = null,Object? width = null,Object? height = null,Object? voteAverage = freezed,Object? iso639 = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
filePath: null == filePath ? _self.filePath : filePath // ignore: cast_nullable_to_non_nullable
|
|
as String,width: null == width ? _self.width : width // ignore: cast_nullable_to_non_nullable
|
|
as int,height: null == height ? _self.height : height // ignore: cast_nullable_to_non_nullable
|
|
as int,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,iso639: freezed == iso639 ? _self.iso639 : iso639 // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbImage].
|
|
extension TmdbImagePatterns on TmdbImage {
|
|
/// 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( _TmdbImage value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImage() 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( _TmdbImage value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImage():
|
|
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( _TmdbImage value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImage() 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(name: 'file_path', fromJson: _strOrEmpty) String filePath, @JsonKey(fromJson: _intOrZero) int width, @JsonKey(fromJson: _intOrZero) int height, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'iso_639_1') String? iso639)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImage() when $default != null:
|
|
return $default(_that.filePath,_that.width,_that.height,_that.voteAverage,_that.iso639);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(name: 'file_path', fromJson: _strOrEmpty) String filePath, @JsonKey(fromJson: _intOrZero) int width, @JsonKey(fromJson: _intOrZero) int height, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'iso_639_1') String? iso639) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImage():
|
|
return $default(_that.filePath,_that.width,_that.height,_that.voteAverage,_that.iso639);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(name: 'file_path', fromJson: _strOrEmpty) String filePath, @JsonKey(fromJson: _intOrZero) int width, @JsonKey(fromJson: _intOrZero) int height, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage, @JsonKey(name: 'iso_639_1') String? iso639)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImage() when $default != null:
|
|
return $default(_that.filePath,_that.width,_that.height,_that.voteAverage,_that.iso639);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbImage extends TmdbImage {
|
|
const _TmdbImage({@JsonKey(name: 'file_path', fromJson: _strOrEmpty) this.filePath = '', @JsonKey(fromJson: _intOrZero) this.width = 0, @JsonKey(fromJson: _intOrZero) this.height = 0, @JsonKey(name: 'vote_average', fromJson: _doubleOrNull) this.voteAverage, @JsonKey(name: 'iso_639_1') this.iso639}): super._();
|
|
factory _TmdbImage.fromJson(Map<String, dynamic> json) => _$TmdbImageFromJson(json);
|
|
|
|
@override@JsonKey(name: 'file_path', fromJson: _strOrEmpty) final String filePath;
|
|
@override@JsonKey(fromJson: _intOrZero) final int width;
|
|
@override@JsonKey(fromJson: _intOrZero) final int height;
|
|
@override@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) final double? voteAverage;
|
|
@override@JsonKey(name: 'iso_639_1') final String? iso639;
|
|
|
|
/// Create a copy of TmdbImage
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbImageCopyWith<_TmdbImage> get copyWith => __$TmdbImageCopyWithImpl<_TmdbImage>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbImageToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbImage&&(identical(other.filePath, filePath) || other.filePath == filePath)&&(identical(other.width, width) || other.width == width)&&(identical(other.height, height) || other.height == height)&&(identical(other.voteAverage, voteAverage) || other.voteAverage == voteAverage)&&(identical(other.iso639, iso639) || other.iso639 == iso639));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,filePath,width,height,voteAverage,iso639);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbImage(filePath: $filePath, width: $width, height: $height, voteAverage: $voteAverage, iso639: $iso639)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbImageCopyWith<$Res> implements $TmdbImageCopyWith<$Res> {
|
|
factory _$TmdbImageCopyWith(_TmdbImage value, $Res Function(_TmdbImage) _then) = __$TmdbImageCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(name: 'file_path', fromJson: _strOrEmpty) String filePath,@JsonKey(fromJson: _intOrZero) int width,@JsonKey(fromJson: _intOrZero) int height,@JsonKey(name: 'vote_average', fromJson: _doubleOrNull) double? voteAverage,@JsonKey(name: 'iso_639_1') String? iso639
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbImageCopyWithImpl<$Res>
|
|
implements _$TmdbImageCopyWith<$Res> {
|
|
__$TmdbImageCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbImage _self;
|
|
final $Res Function(_TmdbImage) _then;
|
|
|
|
/// Create a copy of TmdbImage
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? filePath = null,Object? width = null,Object? height = null,Object? voteAverage = freezed,Object? iso639 = freezed,}) {
|
|
return _then(_TmdbImage(
|
|
filePath: null == filePath ? _self.filePath : filePath // ignore: cast_nullable_to_non_nullable
|
|
as String,width: null == width ? _self.width : width // ignore: cast_nullable_to_non_nullable
|
|
as int,height: null == height ? _self.height : height // ignore: cast_nullable_to_non_nullable
|
|
as int,voteAverage: freezed == voteAverage ? _self.voteAverage : voteAverage // ignore: cast_nullable_to_non_nullable
|
|
as double?,iso639: freezed == iso639 ? _self.iso639 : iso639 // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbImageSet {
|
|
|
|
List<TmdbImage> get backdrops; List<TmdbImage> get posters; List<TmdbImage> get logos;
|
|
/// Create a copy of TmdbImageSet
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbImageSetCopyWith<TmdbImageSet> get copyWith => _$TmdbImageSetCopyWithImpl<TmdbImageSet>(this as TmdbImageSet, _$identity);
|
|
|
|
/// Serializes this TmdbImageSet to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbImageSet&&const DeepCollectionEquality().equals(other.backdrops, backdrops)&&const DeepCollectionEquality().equals(other.posters, posters)&&const DeepCollectionEquality().equals(other.logos, logos));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(backdrops),const DeepCollectionEquality().hash(posters),const DeepCollectionEquality().hash(logos));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbImageSet(backdrops: $backdrops, posters: $posters, logos: $logos)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbImageSetCopyWith<$Res> {
|
|
factory $TmdbImageSetCopyWith(TmdbImageSet value, $Res Function(TmdbImageSet) _then) = _$TmdbImageSetCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
List<TmdbImage> backdrops, List<TmdbImage> posters, List<TmdbImage> logos
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbImageSetCopyWithImpl<$Res>
|
|
implements $TmdbImageSetCopyWith<$Res> {
|
|
_$TmdbImageSetCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbImageSet _self;
|
|
final $Res Function(TmdbImageSet) _then;
|
|
|
|
/// Create a copy of TmdbImageSet
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? backdrops = null,Object? posters = null,Object? logos = null,}) {
|
|
return _then(_self.copyWith(
|
|
backdrops: null == backdrops ? _self.backdrops : backdrops // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbImage>,posters: null == posters ? _self.posters : posters // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbImage>,logos: null == logos ? _self.logos : logos // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbImage>,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbImageSet].
|
|
extension TmdbImageSetPatterns on TmdbImageSet {
|
|
/// 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( _TmdbImageSet value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImageSet() 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( _TmdbImageSet value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImageSet():
|
|
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( _TmdbImageSet value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImageSet() 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( List<TmdbImage> backdrops, List<TmdbImage> posters, List<TmdbImage> logos)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImageSet() when $default != null:
|
|
return $default(_that.backdrops,_that.posters,_that.logos);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( List<TmdbImage> backdrops, List<TmdbImage> posters, List<TmdbImage> logos) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImageSet():
|
|
return $default(_that.backdrops,_that.posters,_that.logos);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( List<TmdbImage> backdrops, List<TmdbImage> posters, List<TmdbImage> logos)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbImageSet() when $default != null:
|
|
return $default(_that.backdrops,_that.posters,_that.logos);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbImageSet implements TmdbImageSet {
|
|
const _TmdbImageSet({final List<TmdbImage> backdrops = const <TmdbImage>[], final List<TmdbImage> posters = const <TmdbImage>[], final List<TmdbImage> logos = const <TmdbImage>[]}): _backdrops = backdrops,_posters = posters,_logos = logos;
|
|
factory _TmdbImageSet.fromJson(Map<String, dynamic> json) => _$TmdbImageSetFromJson(json);
|
|
|
|
final List<TmdbImage> _backdrops;
|
|
@override@JsonKey() List<TmdbImage> get backdrops {
|
|
if (_backdrops is EqualUnmodifiableListView) return _backdrops;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_backdrops);
|
|
}
|
|
|
|
final List<TmdbImage> _posters;
|
|
@override@JsonKey() List<TmdbImage> get posters {
|
|
if (_posters is EqualUnmodifiableListView) return _posters;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_posters);
|
|
}
|
|
|
|
final List<TmdbImage> _logos;
|
|
@override@JsonKey() List<TmdbImage> get logos {
|
|
if (_logos is EqualUnmodifiableListView) return _logos;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_logos);
|
|
}
|
|
|
|
|
|
/// Create a copy of TmdbImageSet
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbImageSetCopyWith<_TmdbImageSet> get copyWith => __$TmdbImageSetCopyWithImpl<_TmdbImageSet>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbImageSetToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbImageSet&&const DeepCollectionEquality().equals(other._backdrops, _backdrops)&&const DeepCollectionEquality().equals(other._posters, _posters)&&const DeepCollectionEquality().equals(other._logos, _logos));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_backdrops),const DeepCollectionEquality().hash(_posters),const DeepCollectionEquality().hash(_logos));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbImageSet(backdrops: $backdrops, posters: $posters, logos: $logos)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbImageSetCopyWith<$Res> implements $TmdbImageSetCopyWith<$Res> {
|
|
factory _$TmdbImageSetCopyWith(_TmdbImageSet value, $Res Function(_TmdbImageSet) _then) = __$TmdbImageSetCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
List<TmdbImage> backdrops, List<TmdbImage> posters, List<TmdbImage> logos
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbImageSetCopyWithImpl<$Res>
|
|
implements _$TmdbImageSetCopyWith<$Res> {
|
|
__$TmdbImageSetCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbImageSet _self;
|
|
final $Res Function(_TmdbImageSet) _then;
|
|
|
|
/// Create a copy of TmdbImageSet
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? backdrops = null,Object? posters = null,Object? logos = null,}) {
|
|
return _then(_TmdbImageSet(
|
|
backdrops: null == backdrops ? _self._backdrops : backdrops // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbImage>,posters: null == posters ? _self._posters : posters // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbImage>,logos: null == logos ? _self._logos : logos // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbImage>,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbNetwork {
|
|
|
|
@JsonKey(fromJson: _intRequired) int get id;@JsonKey(fromJson: _strOrEmpty) String get name;@JsonKey(name: 'logo_path') String? get logoPath;@JsonKey(name: 'origin_country') String? get originCountry;
|
|
/// Create a copy of TmdbNetwork
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbNetworkCopyWith<TmdbNetwork> get copyWith => _$TmdbNetworkCopyWithImpl<TmdbNetwork>(this as TmdbNetwork, _$identity);
|
|
|
|
/// Serializes this TmdbNetwork to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbNetwork&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.logoPath, logoPath) || other.logoPath == logoPath)&&(identical(other.originCountry, originCountry) || other.originCountry == originCountry));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,logoPath,originCountry);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbNetwork(id: $id, name: $name, logoPath: $logoPath, originCountry: $originCountry)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbNetworkCopyWith<$Res> {
|
|
factory $TmdbNetworkCopyWith(TmdbNetwork value, $Res Function(TmdbNetwork) _then) = _$TmdbNetworkCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name,@JsonKey(name: 'logo_path') String? logoPath,@JsonKey(name: 'origin_country') String? originCountry
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbNetworkCopyWithImpl<$Res>
|
|
implements $TmdbNetworkCopyWith<$Res> {
|
|
_$TmdbNetworkCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbNetwork _self;
|
|
final $Res Function(TmdbNetwork) _then;
|
|
|
|
/// Create a copy of TmdbNetwork
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? logoPath = freezed,Object? originCountry = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,logoPath: freezed == logoPath ? _self.logoPath : logoPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,originCountry: freezed == originCountry ? _self.originCountry : originCountry // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbNetwork].
|
|
extension TmdbNetworkPatterns on TmdbNetwork {
|
|
/// 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( _TmdbNetwork value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbNetwork() 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( _TmdbNetwork value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbNetwork():
|
|
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( _TmdbNetwork value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbNetwork() 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 id, @JsonKey(fromJson: _strOrEmpty) String name, @JsonKey(name: 'logo_path') String? logoPath, @JsonKey(name: 'origin_country') String? originCountry)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbNetwork() when $default != null:
|
|
return $default(_that.id,_that.name,_that.logoPath,_that.originCountry);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 id, @JsonKey(fromJson: _strOrEmpty) String name, @JsonKey(name: 'logo_path') String? logoPath, @JsonKey(name: 'origin_country') String? originCountry) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbNetwork():
|
|
return $default(_that.id,_that.name,_that.logoPath,_that.originCountry);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 id, @JsonKey(fromJson: _strOrEmpty) String name, @JsonKey(name: 'logo_path') String? logoPath, @JsonKey(name: 'origin_country') String? originCountry)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbNetwork() when $default != null:
|
|
return $default(_that.id,_that.name,_that.logoPath,_that.originCountry);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbNetwork implements TmdbNetwork {
|
|
const _TmdbNetwork({@JsonKey(fromJson: _intRequired) required this.id, @JsonKey(fromJson: _strOrEmpty) this.name = '', @JsonKey(name: 'logo_path') this.logoPath, @JsonKey(name: 'origin_country') this.originCountry});
|
|
factory _TmdbNetwork.fromJson(Map<String, dynamic> json) => _$TmdbNetworkFromJson(json);
|
|
|
|
@override@JsonKey(fromJson: _intRequired) final int id;
|
|
@override@JsonKey(fromJson: _strOrEmpty) final String name;
|
|
@override@JsonKey(name: 'logo_path') final String? logoPath;
|
|
@override@JsonKey(name: 'origin_country') final String? originCountry;
|
|
|
|
/// Create a copy of TmdbNetwork
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbNetworkCopyWith<_TmdbNetwork> get copyWith => __$TmdbNetworkCopyWithImpl<_TmdbNetwork>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbNetworkToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbNetwork&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.logoPath, logoPath) || other.logoPath == logoPath)&&(identical(other.originCountry, originCountry) || other.originCountry == originCountry));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,logoPath,originCountry);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbNetwork(id: $id, name: $name, logoPath: $logoPath, originCountry: $originCountry)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbNetworkCopyWith<$Res> implements $TmdbNetworkCopyWith<$Res> {
|
|
factory _$TmdbNetworkCopyWith(_TmdbNetwork value, $Res Function(_TmdbNetwork) _then) = __$TmdbNetworkCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(fromJson: _intRequired) int id,@JsonKey(fromJson: _strOrEmpty) String name,@JsonKey(name: 'logo_path') String? logoPath,@JsonKey(name: 'origin_country') String? originCountry
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbNetworkCopyWithImpl<$Res>
|
|
implements _$TmdbNetworkCopyWith<$Res> {
|
|
__$TmdbNetworkCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbNetwork _self;
|
|
final $Res Function(_TmdbNetwork) _then;
|
|
|
|
/// Create a copy of TmdbNetwork
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? logoPath = freezed,Object? originCountry = freezed,}) {
|
|
return _then(_TmdbNetwork(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,logoPath: freezed == logoPath ? _self.logoPath : logoPath // ignore: cast_nullable_to_non_nullable
|
|
as String?,originCountry: freezed == originCountry ? _self.originCountry : originCountry // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$TmdbEnrichedDetail {
|
|
|
|
TmdbMediaDetail get detail; TmdbVideosRes? get videos; TmdbCreditsRes? get credits; TmdbRecommendationsRes? get recommendations; TmdbImageSet? get images;/// imdb id(如 `tt0137523`),来自 `append_to_response=external_ids` 的
|
|
/// `external_ids.imdb_id`。仅作库内反查的 movie 兜底用(见 R1),TMDB 未刮削
|
|
/// 或为空字符串时为 null。
|
|
String? get imdbId; List<TmdbNetwork> get networks;
|
|
/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbEnrichedDetailCopyWith<TmdbEnrichedDetail> get copyWith => _$TmdbEnrichedDetailCopyWithImpl<TmdbEnrichedDetail>(this as TmdbEnrichedDetail, _$identity);
|
|
|
|
/// Serializes this TmdbEnrichedDetail to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is TmdbEnrichedDetail&&(identical(other.detail, detail) || other.detail == detail)&&(identical(other.videos, videos) || other.videos == videos)&&(identical(other.credits, credits) || other.credits == credits)&&(identical(other.recommendations, recommendations) || other.recommendations == recommendations)&&(identical(other.images, images) || other.images == images)&&(identical(other.imdbId, imdbId) || other.imdbId == imdbId)&&const DeepCollectionEquality().equals(other.networks, networks));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,detail,videos,credits,recommendations,images,imdbId,const DeepCollectionEquality().hash(networks));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbEnrichedDetail(detail: $detail, videos: $videos, credits: $credits, recommendations: $recommendations, images: $images, imdbId: $imdbId, networks: $networks)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TmdbEnrichedDetailCopyWith<$Res> {
|
|
factory $TmdbEnrichedDetailCopyWith(TmdbEnrichedDetail value, $Res Function(TmdbEnrichedDetail) _then) = _$TmdbEnrichedDetailCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
TmdbMediaDetail detail, TmdbVideosRes? videos, TmdbCreditsRes? credits, TmdbRecommendationsRes? recommendations, TmdbImageSet? images, String? imdbId, List<TmdbNetwork> networks
|
|
});
|
|
|
|
|
|
$TmdbMediaDetailCopyWith<$Res> get detail;$TmdbVideosResCopyWith<$Res>? get videos;$TmdbCreditsResCopyWith<$Res>? get credits;$TmdbRecommendationsResCopyWith<$Res>? get recommendations;$TmdbImageSetCopyWith<$Res>? get images;
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$TmdbEnrichedDetailCopyWithImpl<$Res>
|
|
implements $TmdbEnrichedDetailCopyWith<$Res> {
|
|
_$TmdbEnrichedDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final TmdbEnrichedDetail _self;
|
|
final $Res Function(TmdbEnrichedDetail) _then;
|
|
|
|
/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? detail = null,Object? videos = freezed,Object? credits = freezed,Object? recommendations = freezed,Object? images = freezed,Object? imdbId = freezed,Object? networks = null,}) {
|
|
return _then(_self.copyWith(
|
|
detail: null == detail ? _self.detail : detail // ignore: cast_nullable_to_non_nullable
|
|
as TmdbMediaDetail,videos: freezed == videos ? _self.videos : videos // ignore: cast_nullable_to_non_nullable
|
|
as TmdbVideosRes?,credits: freezed == credits ? _self.credits : credits // ignore: cast_nullable_to_non_nullable
|
|
as TmdbCreditsRes?,recommendations: freezed == recommendations ? _self.recommendations : recommendations // ignore: cast_nullable_to_non_nullable
|
|
as TmdbRecommendationsRes?,images: freezed == images ? _self.images : images // ignore: cast_nullable_to_non_nullable
|
|
as TmdbImageSet?,imdbId: freezed == imdbId ? _self.imdbId : imdbId // ignore: cast_nullable_to_non_nullable
|
|
as String?,networks: null == networks ? _self.networks : networks // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbNetwork>,
|
|
));
|
|
}
|
|
/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbMediaDetailCopyWith<$Res> get detail {
|
|
|
|
return $TmdbMediaDetailCopyWith<$Res>(_self.detail, (value) {
|
|
return _then(_self.copyWith(detail: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbVideosResCopyWith<$Res>? get videos {
|
|
if (_self.videos == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbVideosResCopyWith<$Res>(_self.videos!, (value) {
|
|
return _then(_self.copyWith(videos: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbCreditsResCopyWith<$Res>? get credits {
|
|
if (_self.credits == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbCreditsResCopyWith<$Res>(_self.credits!, (value) {
|
|
return _then(_self.copyWith(credits: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbRecommendationsResCopyWith<$Res>? get recommendations {
|
|
if (_self.recommendations == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbRecommendationsResCopyWith<$Res>(_self.recommendations!, (value) {
|
|
return _then(_self.copyWith(recommendations: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbImageSetCopyWith<$Res>? get images {
|
|
if (_self.images == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbImageSetCopyWith<$Res>(_self.images!, (value) {
|
|
return _then(_self.copyWith(images: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [TmdbEnrichedDetail].
|
|
extension TmdbEnrichedDetailPatterns on TmdbEnrichedDetail {
|
|
/// 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( _TmdbEnrichedDetail value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEnrichedDetail() 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( _TmdbEnrichedDetail value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEnrichedDetail():
|
|
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( _TmdbEnrichedDetail value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEnrichedDetail() 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( TmdbMediaDetail detail, TmdbVideosRes? videos, TmdbCreditsRes? credits, TmdbRecommendationsRes? recommendations, TmdbImageSet? images, String? imdbId, List<TmdbNetwork> networks)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEnrichedDetail() when $default != null:
|
|
return $default(_that.detail,_that.videos,_that.credits,_that.recommendations,_that.images,_that.imdbId,_that.networks);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( TmdbMediaDetail detail, TmdbVideosRes? videos, TmdbCreditsRes? credits, TmdbRecommendationsRes? recommendations, TmdbImageSet? images, String? imdbId, List<TmdbNetwork> networks) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEnrichedDetail():
|
|
return $default(_that.detail,_that.videos,_that.credits,_that.recommendations,_that.images,_that.imdbId,_that.networks);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( TmdbMediaDetail detail, TmdbVideosRes? videos, TmdbCreditsRes? credits, TmdbRecommendationsRes? recommendations, TmdbImageSet? images, String? imdbId, List<TmdbNetwork> networks)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _TmdbEnrichedDetail() when $default != null:
|
|
return $default(_that.detail,_that.videos,_that.credits,_that.recommendations,_that.images,_that.imdbId,_that.networks);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _TmdbEnrichedDetail implements TmdbEnrichedDetail {
|
|
const _TmdbEnrichedDetail({required this.detail, this.videos, this.credits, this.recommendations, this.images, this.imdbId, final List<TmdbNetwork> networks = const <TmdbNetwork>[]}): _networks = networks;
|
|
factory _TmdbEnrichedDetail.fromJson(Map<String, dynamic> json) => _$TmdbEnrichedDetailFromJson(json);
|
|
|
|
@override final TmdbMediaDetail detail;
|
|
@override final TmdbVideosRes? videos;
|
|
@override final TmdbCreditsRes? credits;
|
|
@override final TmdbRecommendationsRes? recommendations;
|
|
@override final TmdbImageSet? images;
|
|
/// imdb id(如 `tt0137523`),来自 `append_to_response=external_ids` 的
|
|
/// `external_ids.imdb_id`。仅作库内反查的 movie 兜底用(见 R1),TMDB 未刮削
|
|
/// 或为空字符串时为 null。
|
|
@override final String? imdbId;
|
|
final List<TmdbNetwork> _networks;
|
|
@override@JsonKey() List<TmdbNetwork> get networks {
|
|
if (_networks is EqualUnmodifiableListView) return _networks;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_networks);
|
|
}
|
|
|
|
|
|
/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TmdbEnrichedDetailCopyWith<_TmdbEnrichedDetail> get copyWith => __$TmdbEnrichedDetailCopyWithImpl<_TmdbEnrichedDetail>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$TmdbEnrichedDetailToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TmdbEnrichedDetail&&(identical(other.detail, detail) || other.detail == detail)&&(identical(other.videos, videos) || other.videos == videos)&&(identical(other.credits, credits) || other.credits == credits)&&(identical(other.recommendations, recommendations) || other.recommendations == recommendations)&&(identical(other.images, images) || other.images == images)&&(identical(other.imdbId, imdbId) || other.imdbId == imdbId)&&const DeepCollectionEquality().equals(other._networks, _networks));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,detail,videos,credits,recommendations,images,imdbId,const DeepCollectionEquality().hash(_networks));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TmdbEnrichedDetail(detail: $detail, videos: $videos, credits: $credits, recommendations: $recommendations, images: $images, imdbId: $imdbId, networks: $networks)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TmdbEnrichedDetailCopyWith<$Res> implements $TmdbEnrichedDetailCopyWith<$Res> {
|
|
factory _$TmdbEnrichedDetailCopyWith(_TmdbEnrichedDetail value, $Res Function(_TmdbEnrichedDetail) _then) = __$TmdbEnrichedDetailCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
TmdbMediaDetail detail, TmdbVideosRes? videos, TmdbCreditsRes? credits, TmdbRecommendationsRes? recommendations, TmdbImageSet? images, String? imdbId, List<TmdbNetwork> networks
|
|
});
|
|
|
|
|
|
@override $TmdbMediaDetailCopyWith<$Res> get detail;@override $TmdbVideosResCopyWith<$Res>? get videos;@override $TmdbCreditsResCopyWith<$Res>? get credits;@override $TmdbRecommendationsResCopyWith<$Res>? get recommendations;@override $TmdbImageSetCopyWith<$Res>? get images;
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$TmdbEnrichedDetailCopyWithImpl<$Res>
|
|
implements _$TmdbEnrichedDetailCopyWith<$Res> {
|
|
__$TmdbEnrichedDetailCopyWithImpl(this._self, this._then);
|
|
|
|
final _TmdbEnrichedDetail _self;
|
|
final $Res Function(_TmdbEnrichedDetail) _then;
|
|
|
|
/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? detail = null,Object? videos = freezed,Object? credits = freezed,Object? recommendations = freezed,Object? images = freezed,Object? imdbId = freezed,Object? networks = null,}) {
|
|
return _then(_TmdbEnrichedDetail(
|
|
detail: null == detail ? _self.detail : detail // ignore: cast_nullable_to_non_nullable
|
|
as TmdbMediaDetail,videos: freezed == videos ? _self.videos : videos // ignore: cast_nullable_to_non_nullable
|
|
as TmdbVideosRes?,credits: freezed == credits ? _self.credits : credits // ignore: cast_nullable_to_non_nullable
|
|
as TmdbCreditsRes?,recommendations: freezed == recommendations ? _self.recommendations : recommendations // ignore: cast_nullable_to_non_nullable
|
|
as TmdbRecommendationsRes?,images: freezed == images ? _self.images : images // ignore: cast_nullable_to_non_nullable
|
|
as TmdbImageSet?,imdbId: freezed == imdbId ? _self.imdbId : imdbId // ignore: cast_nullable_to_non_nullable
|
|
as String?,networks: null == networks ? _self._networks : networks // ignore: cast_nullable_to_non_nullable
|
|
as List<TmdbNetwork>,
|
|
));
|
|
}
|
|
|
|
/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbMediaDetailCopyWith<$Res> get detail {
|
|
|
|
return $TmdbMediaDetailCopyWith<$Res>(_self.detail, (value) {
|
|
return _then(_self.copyWith(detail: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbVideosResCopyWith<$Res>? get videos {
|
|
if (_self.videos == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbVideosResCopyWith<$Res>(_self.videos!, (value) {
|
|
return _then(_self.copyWith(videos: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbCreditsResCopyWith<$Res>? get credits {
|
|
if (_self.credits == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbCreditsResCopyWith<$Res>(_self.credits!, (value) {
|
|
return _then(_self.copyWith(credits: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbRecommendationsResCopyWith<$Res>? get recommendations {
|
|
if (_self.recommendations == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbRecommendationsResCopyWith<$Res>(_self.recommendations!, (value) {
|
|
return _then(_self.copyWith(recommendations: value));
|
|
});
|
|
}/// Create a copy of TmdbEnrichedDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TmdbImageSetCopyWith<$Res>? get images {
|
|
if (_self.images == null) {
|
|
return null;
|
|
}
|
|
|
|
return $TmdbImageSetCopyWith<$Res>(_self.images!, (value) {
|
|
return _then(_self.copyWith(images: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
// dart format on
|