// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark part of 'game.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND // dart format off T _$identity(T value) => value; /// @nodoc mixin _$Game { String get id; String get name; String get type; bool get isActive; Map get metadata; List get prizes; String get createdAt; String get updatedAt; /// Create a copy of Game /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $GameCopyWith get copyWith => _$GameCopyWithImpl(this as Game, _$identity); @override bool operator ==(Object other) { final _this = this as Game; return identical(this, other) || (other.runtimeType == runtimeType&&other is Game&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.name, _this.name) || other.name == _this.name)&&(identical(other.type, _this.type) || other.type == _this.type)&&(identical(other.isActive, _this.isActive) || other.isActive == _this.isActive)&&const DeepCollectionEquality().equals(other.metadata, _this.metadata)&&const DeepCollectionEquality().equals(other.prizes, _this.prizes)&&(identical(other.createdAt, _this.createdAt) || other.createdAt == _this.createdAt)&&(identical(other.updatedAt, _this.updatedAt) || other.updatedAt == _this.updatedAt)); } @override int get hashCode { final _this = this as Game; return Object.hash(runtimeType,_this.id,_this.name,_this.type,_this.isActive,const DeepCollectionEquality().hash(_this.metadata),const DeepCollectionEquality().hash(_this.prizes),_this.createdAt,_this.updatedAt); } @override String toString() { final _this = this as Game; return 'Game(id: ${_this.id}, name: ${_this.name}, type: ${_this.type}, isActive: ${_this.isActive}, metadata: ${_this.metadata}, prizes: ${_this.prizes}, createdAt: ${_this.createdAt}, updatedAt: ${_this.updatedAt})'; } } /// @nodoc abstract mixin class $GameCopyWith<$Res> { factory $GameCopyWith(Game value, $Res Function(Game) _then) = _$GameCopyWithImpl; @useResult $Res call({ String id, String name, String type, bool isActive, Map metadata, List prizes, String createdAt, String updatedAt }); } /// @nodoc class _$GameCopyWithImpl<$Res> implements $GameCopyWith<$Res> { _$GameCopyWithImpl(this._self, this._then); final Game _self; final $Res Function(Game) _then; /// Create a copy of Game /// 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? type = null,Object? isActive = null,Object? metadata = null,Object? prizes = null,Object? createdAt = null,Object? updatedAt = null,}) { return _then(Game( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable as bool,metadata: null == metadata ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable as Map,prizes: null == prizes ? _self.prizes : prizes // ignore: cast_nullable_to_non_nullable as List,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [Game]. extension GamePatterns on Game { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _Game value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Game() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _Game value) $default,){ final _that = this; switch (_that) { case _Game(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _Game value)? $default,){ final _that = this; switch (_that) { case _Game() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String name, String type, bool isActive, Map metadata, List prizes, String createdAt, String updatedAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Game() when $default != null: return $default(_that.id,_that.name,_that.type,_that.isActive,_that.metadata,_that.prizes,_that.createdAt,_that.updatedAt);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String name, String type, bool isActive, Map metadata, List prizes, String createdAt, String updatedAt) $default,) {final _that = this; switch (_that) { case _Game(): return $default(_that.id,_that.name,_that.type,_that.isActive,_that.metadata,_that.prizes,_that.createdAt,_that.updatedAt);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String name, String type, bool isActive, Map metadata, List prizes, String createdAt, String updatedAt)? $default,) {final _that = this; switch (_that) { case _Game() when $default != null: return $default(_that.id,_that.name,_that.type,_that.isActive,_that.metadata,_that.prizes,_that.createdAt,_that.updatedAt);case _: return null; } } } /// @nodoc class _Game extends Game { const _Game({required this.id, required this.name, required this.type, required this.isActive, required Map metadata, required List prizes, required this.createdAt, required this.updatedAt}): _metadata = metadata,_prizes = prizes,super._(); @override final String id; @override final String name; @override final String type; @override final bool isActive; final Map _metadata; @override Map get metadata { if (_metadata is EqualUnmodifiableMapView) return _metadata; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(_metadata); } final List _prizes; @override List get prizes { if (_prizes is EqualUnmodifiableListView) return _prizes; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_prizes); } @override final String createdAt; @override final String updatedAt; /// Create a copy of Game /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$GameCopyWith<_Game> get copyWith => __$GameCopyWithImpl<_Game>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Game&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&const DeepCollectionEquality().equals(other.metadata, _metadata)&&const DeepCollectionEquality().equals(other.prizes, _prizes)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); } @override int get hashCode { return Object.hash(runtimeType,id,name,type,isActive,const DeepCollectionEquality().hash(_metadata),const DeepCollectionEquality().hash(_prizes),createdAt,updatedAt); } @override String toString() { return 'Game(id: $id, name: $name, type: $type, isActive: $isActive, metadata: $metadata, prizes: $prizes, createdAt: $createdAt, updatedAt: $updatedAt)'; } } /// @nodoc abstract mixin class _$GameCopyWith<$Res> implements $GameCopyWith<$Res> { factory _$GameCopyWith(_Game value, $Res Function(_Game) _then) = __$GameCopyWithImpl; @override @useResult $Res call({ String id, String name, String type, bool isActive, Map metadata, List prizes, String createdAt, String updatedAt }); } /// @nodoc class __$GameCopyWithImpl<$Res> implements _$GameCopyWith<$Res> { __$GameCopyWithImpl(this._self, this._then); final _Game _self; final $Res Function(_Game) _then; /// Create a copy of Game /// 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? type = null,Object? isActive = null,Object? metadata = null,Object? prizes = null,Object? createdAt = null,Object? updatedAt = null,}) { return _then(_Game( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable as bool,metadata: null == metadata ? _self._metadata : metadata // ignore: cast_nullable_to_non_nullable as Map,prizes: null == prizes ? _self._prizes : prizes // ignore: cast_nullable_to_non_nullable as List,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$GamePrize { String get id; String get gameId; String get name; Map get metadata; String get createdAt; String get updatedAt; /// Create a copy of GamePrize /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $GamePrizeCopyWith get copyWith => _$GamePrizeCopyWithImpl(this as GamePrize, _$identity); @override bool operator ==(Object other) { final _this = this as GamePrize; return identical(this, other) || (other.runtimeType == runtimeType&&other is GamePrize&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.gameId, _this.gameId) || other.gameId == _this.gameId)&&(identical(other.name, _this.name) || other.name == _this.name)&&const DeepCollectionEquality().equals(other.metadata, _this.metadata)&&(identical(other.createdAt, _this.createdAt) || other.createdAt == _this.createdAt)&&(identical(other.updatedAt, _this.updatedAt) || other.updatedAt == _this.updatedAt)); } @override int get hashCode { final _this = this as GamePrize; return Object.hash(runtimeType,_this.id,_this.gameId,_this.name,const DeepCollectionEquality().hash(_this.metadata),_this.createdAt,_this.updatedAt); } @override String toString() { final _this = this as GamePrize; return 'GamePrize(id: ${_this.id}, gameId: ${_this.gameId}, name: ${_this.name}, metadata: ${_this.metadata}, createdAt: ${_this.createdAt}, updatedAt: ${_this.updatedAt})'; } } /// @nodoc abstract mixin class $GamePrizeCopyWith<$Res> { factory $GamePrizeCopyWith(GamePrize value, $Res Function(GamePrize) _then) = _$GamePrizeCopyWithImpl; @useResult $Res call({ String id, String gameId, String name, Map metadata, String createdAt, String updatedAt }); } /// @nodoc class _$GamePrizeCopyWithImpl<$Res> implements $GamePrizeCopyWith<$Res> { _$GamePrizeCopyWithImpl(this._self, this._then); final GamePrize _self; final $Res Function(GamePrize) _then; /// Create a copy of GamePrize /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? gameId = null,Object? name = null,Object? metadata = null,Object? createdAt = null,Object? updatedAt = null,}) { return _then(GamePrize( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,gameId: null == gameId ? _self.gameId : gameId // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,metadata: null == metadata ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable as Map,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [GamePrize]. extension GamePrizePatterns on GamePrize { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _GamePrize value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _GamePrize() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _GamePrize value) $default,){ final _that = this; switch (_that) { case _GamePrize(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _GamePrize value)? $default,){ final _that = this; switch (_that) { case _GamePrize() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String gameId, String name, Map metadata, String createdAt, String updatedAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _GamePrize() when $default != null: return $default(_that.id,_that.gameId,_that.name,_that.metadata,_that.createdAt,_that.updatedAt);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String gameId, String name, Map metadata, String createdAt, String updatedAt) $default,) {final _that = this; switch (_that) { case _GamePrize(): return $default(_that.id,_that.gameId,_that.name,_that.metadata,_that.createdAt,_that.updatedAt);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String gameId, String name, Map metadata, String createdAt, String updatedAt)? $default,) {final _that = this; switch (_that) { case _GamePrize() when $default != null: return $default(_that.id,_that.gameId,_that.name,_that.metadata,_that.createdAt,_that.updatedAt);case _: return null; } } } /// @nodoc class _GamePrize implements GamePrize { const _GamePrize({required this.id, required this.gameId, required this.name, required Map metadata, required this.createdAt, required this.updatedAt}): _metadata = metadata; @override final String id; @override final String gameId; @override final String name; final Map _metadata; @override Map get metadata { if (_metadata is EqualUnmodifiableMapView) return _metadata; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(_metadata); } @override final String createdAt; @override final String updatedAt; /// Create a copy of GamePrize /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$GamePrizeCopyWith<_GamePrize> get copyWith => __$GamePrizeCopyWithImpl<_GamePrize>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _GamePrize&&(identical(other.id, id) || other.id == id)&&(identical(other.gameId, gameId) || other.gameId == gameId)&&(identical(other.name, name) || other.name == name)&&const DeepCollectionEquality().equals(other.metadata, _metadata)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); } @override int get hashCode { return Object.hash(runtimeType,id,gameId,name,const DeepCollectionEquality().hash(_metadata),createdAt,updatedAt); } @override String toString() { return 'GamePrize(id: $id, gameId: $gameId, name: $name, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt)'; } } /// @nodoc abstract mixin class _$GamePrizeCopyWith<$Res> implements $GamePrizeCopyWith<$Res> { factory _$GamePrizeCopyWith(_GamePrize value, $Res Function(_GamePrize) _then) = __$GamePrizeCopyWithImpl; @override @useResult $Res call({ String id, String gameId, String name, Map metadata, String createdAt, String updatedAt }); } /// @nodoc class __$GamePrizeCopyWithImpl<$Res> implements _$GamePrizeCopyWith<$Res> { __$GamePrizeCopyWithImpl(this._self, this._then); final _GamePrize _self; final $Res Function(_GamePrize) _then; /// Create a copy of GamePrize /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? gameId = null,Object? name = null,Object? metadata = null,Object? createdAt = null,Object? updatedAt = null,}) { return _then(_GamePrize( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,gameId: null == gameId ? _self.gameId : gameId // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,metadata: null == metadata ? _self._metadata : metadata // ignore: cast_nullable_to_non_nullable as Map,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$SpinResult { String get gamePlayId; int get coinsUsed; String get prizeId; String get prizeName; int get coinsRemaining; /// Create a copy of SpinResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SpinResultCopyWith get copyWith => _$SpinResultCopyWithImpl(this as SpinResult, _$identity); @override bool operator ==(Object other) { final _this = this as SpinResult; return identical(this, other) || (other.runtimeType == runtimeType&&other is SpinResult&&(identical(other.gamePlayId, _this.gamePlayId) || other.gamePlayId == _this.gamePlayId)&&(identical(other.coinsUsed, _this.coinsUsed) || other.coinsUsed == _this.coinsUsed)&&(identical(other.prizeId, _this.prizeId) || other.prizeId == _this.prizeId)&&(identical(other.prizeName, _this.prizeName) || other.prizeName == _this.prizeName)&&(identical(other.coinsRemaining, _this.coinsRemaining) || other.coinsRemaining == _this.coinsRemaining)); } @override int get hashCode { final _this = this as SpinResult; return Object.hash(runtimeType,_this.gamePlayId,_this.coinsUsed,_this.prizeId,_this.prizeName,_this.coinsRemaining); } @override String toString() { final _this = this as SpinResult; return 'SpinResult(gamePlayId: ${_this.gamePlayId}, coinsUsed: ${_this.coinsUsed}, prizeId: ${_this.prizeId}, prizeName: ${_this.prizeName}, coinsRemaining: ${_this.coinsRemaining})'; } } /// @nodoc abstract mixin class $SpinResultCopyWith<$Res> { factory $SpinResultCopyWith(SpinResult value, $Res Function(SpinResult) _then) = _$SpinResultCopyWithImpl; @useResult $Res call({ String gamePlayId, int coinsUsed, String prizeId, String prizeName, int coinsRemaining }); } /// @nodoc class _$SpinResultCopyWithImpl<$Res> implements $SpinResultCopyWith<$Res> { _$SpinResultCopyWithImpl(this._self, this._then); final SpinResult _self; final $Res Function(SpinResult) _then; /// Create a copy of SpinResult /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? gamePlayId = null,Object? coinsUsed = null,Object? prizeId = null,Object? prizeName = null,Object? coinsRemaining = null,}) { return _then(SpinResult( gamePlayId: null == gamePlayId ? _self.gamePlayId : gamePlayId // ignore: cast_nullable_to_non_nullable as String,coinsUsed: null == coinsUsed ? _self.coinsUsed : coinsUsed // ignore: cast_nullable_to_non_nullable as int,prizeId: null == prizeId ? _self.prizeId : prizeId // ignore: cast_nullable_to_non_nullable as String,prizeName: null == prizeName ? _self.prizeName : prizeName // ignore: cast_nullable_to_non_nullable as String,coinsRemaining: null == coinsRemaining ? _self.coinsRemaining : coinsRemaining // ignore: cast_nullable_to_non_nullable as int, )); } } /// Adds pattern-matching-related methods to [SpinResult]. extension SpinResultPatterns on SpinResult { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _SpinResult value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SpinResult() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _SpinResult value) $default,){ final _that = this; switch (_that) { case _SpinResult(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _SpinResult value)? $default,){ final _that = this; switch (_that) { case _SpinResult() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String gamePlayId, int coinsUsed, String prizeId, String prizeName, int coinsRemaining)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SpinResult() when $default != null: return $default(_that.gamePlayId,_that.coinsUsed,_that.prizeId,_that.prizeName,_that.coinsRemaining);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String gamePlayId, int coinsUsed, String prizeId, String prizeName, int coinsRemaining) $default,) {final _that = this; switch (_that) { case _SpinResult(): return $default(_that.gamePlayId,_that.coinsUsed,_that.prizeId,_that.prizeName,_that.coinsRemaining);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String gamePlayId, int coinsUsed, String prizeId, String prizeName, int coinsRemaining)? $default,) {final _that = this; switch (_that) { case _SpinResult() when $default != null: return $default(_that.gamePlayId,_that.coinsUsed,_that.prizeId,_that.prizeName,_that.coinsRemaining);case _: return null; } } } /// @nodoc class _SpinResult implements SpinResult { const _SpinResult({required this.gamePlayId, required this.coinsUsed, required this.prizeId, required this.prizeName, required this.coinsRemaining}); @override final String gamePlayId; @override final int coinsUsed; @override final String prizeId; @override final String prizeName; @override final int coinsRemaining; /// Create a copy of SpinResult /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SpinResultCopyWith<_SpinResult> get copyWith => __$SpinResultCopyWithImpl<_SpinResult>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SpinResult&&(identical(other.gamePlayId, gamePlayId) || other.gamePlayId == gamePlayId)&&(identical(other.coinsUsed, coinsUsed) || other.coinsUsed == coinsUsed)&&(identical(other.prizeId, prizeId) || other.prizeId == prizeId)&&(identical(other.prizeName, prizeName) || other.prizeName == prizeName)&&(identical(other.coinsRemaining, coinsRemaining) || other.coinsRemaining == coinsRemaining)); } @override int get hashCode { return Object.hash(runtimeType,gamePlayId,coinsUsed,prizeId,prizeName,coinsRemaining); } @override String toString() { return 'SpinResult(gamePlayId: $gamePlayId, coinsUsed: $coinsUsed, prizeId: $prizeId, prizeName: $prizeName, coinsRemaining: $coinsRemaining)'; } } /// @nodoc abstract mixin class _$SpinResultCopyWith<$Res> implements $SpinResultCopyWith<$Res> { factory _$SpinResultCopyWith(_SpinResult value, $Res Function(_SpinResult) _then) = __$SpinResultCopyWithImpl; @override @useResult $Res call({ String gamePlayId, int coinsUsed, String prizeId, String prizeName, int coinsRemaining }); } /// @nodoc class __$SpinResultCopyWithImpl<$Res> implements _$SpinResultCopyWith<$Res> { __$SpinResultCopyWithImpl(this._self, this._then); final _SpinResult _self; final $Res Function(_SpinResult) _then; /// Create a copy of SpinResult /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? gamePlayId = null,Object? coinsUsed = null,Object? prizeId = null,Object? prizeName = null,Object? coinsRemaining = null,}) { return _then(_SpinResult( gamePlayId: null == gamePlayId ? _self.gamePlayId : gamePlayId // ignore: cast_nullable_to_non_nullable as String,coinsUsed: null == coinsUsed ? _self.coinsUsed : coinsUsed // ignore: cast_nullable_to_non_nullable as int,prizeId: null == prizeId ? _self.prizeId : prizeId // ignore: cast_nullable_to_non_nullable as String,prizeName: null == prizeName ? _self.prizeName : prizeName // ignore: cast_nullable_to_non_nullable as String,coinsRemaining: null == coinsRemaining ? _self.coinsRemaining : coinsRemaining // ignore: cast_nullable_to_non_nullable as int, )); } } /// @nodoc mixin _$GameFailure { @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is GameFailure); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'GameFailure()'; } } /// @nodoc class $GameFailureCopyWith<$Res> { $GameFailureCopyWith(GameFailure _, $Res Function(GameFailure) __); } /// Adds pattern-matching-related methods to [GameFailure]. extension GameFailurePatterns on GameFailure { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap({TResult Function( _ServerError value)? serverError,TResult Function( _UnexpectedError value)? unexpectedError,TResult Function( _DynamicErrorMessage value)? dynamicErrorMessage,required TResult orElse(),}){ final _that = this; switch (_that) { case _ServerError() when serverError != null: return serverError(_that);case _UnexpectedError() when unexpectedError != null: return unexpectedError(_that);case _DynamicErrorMessage() when dynamicErrorMessage != null: return dynamicErrorMessage(_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({required TResult Function( _ServerError value) serverError,required TResult Function( _UnexpectedError value) unexpectedError,required TResult Function( _DynamicErrorMessage value) dynamicErrorMessage,}){ final _that = this; switch (_that) { case _ServerError(): return serverError(_that);case _UnexpectedError(): return unexpectedError(_that);case _DynamicErrorMessage(): return dynamicErrorMessage(_that);} } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull({TResult? Function( _ServerError value)? serverError,TResult? Function( _UnexpectedError value)? unexpectedError,TResult? Function( _DynamicErrorMessage value)? dynamicErrorMessage,}){ final _that = this; switch (_that) { case _ServerError() when serverError != null: return serverError(_that);case _UnexpectedError() when unexpectedError != null: return unexpectedError(_that);case _DynamicErrorMessage() when dynamicErrorMessage != null: return dynamicErrorMessage(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen({TResult Function( ApiFailure failure)? serverError,TResult Function()? unexpectedError,TResult Function( String erroMessage)? dynamicErrorMessage,required TResult orElse(),}) {final _that = this; switch (_that) { case _ServerError() when serverError != null: return serverError(_that.failure);case _UnexpectedError() when unexpectedError != null: return unexpectedError();case _DynamicErrorMessage() when dynamicErrorMessage != null: return dynamicErrorMessage(_that.erroMessage);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({required TResult Function( ApiFailure failure) serverError,required TResult Function() unexpectedError,required TResult Function( String erroMessage) dynamicErrorMessage,}) {final _that = this; switch (_that) { case _ServerError(): return serverError(_that.failure);case _UnexpectedError(): return unexpectedError();case _DynamicErrorMessage(): return dynamicErrorMessage(_that.erroMessage);} } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull({TResult? Function( ApiFailure failure)? serverError,TResult? Function()? unexpectedError,TResult? Function( String erroMessage)? dynamicErrorMessage,}) {final _that = this; switch (_that) { case _ServerError() when serverError != null: return serverError(_that.failure);case _UnexpectedError() when unexpectedError != null: return unexpectedError();case _DynamicErrorMessage() when dynamicErrorMessage != null: return dynamicErrorMessage(_that.erroMessage);case _: return null; } } } /// @nodoc class _ServerError implements GameFailure { const _ServerError(this.failure); final ApiFailure failure; /// Create a copy of GameFailure /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ServerErrorCopyWith<_ServerError> get copyWith => __$ServerErrorCopyWithImpl<_ServerError>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ServerError&&(identical(other.failure, failure) || other.failure == failure)); } @override int get hashCode { return Object.hash(runtimeType,failure); } @override String toString() { return 'GameFailure.serverError(failure: $failure)'; } } /// @nodoc abstract mixin class _$ServerErrorCopyWith<$Res> implements $GameFailureCopyWith<$Res> { factory _$ServerErrorCopyWith(_ServerError value, $Res Function(_ServerError) _then) = __$ServerErrorCopyWithImpl; @useResult $Res call({ ApiFailure failure }); $ApiFailureCopyWith<$Res> get failure; } /// @nodoc class __$ServerErrorCopyWithImpl<$Res> implements _$ServerErrorCopyWith<$Res> { __$ServerErrorCopyWithImpl(this._self, this._then); final _ServerError _self; final $Res Function(_ServerError) _then; /// Create a copy of GameFailure /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? failure = null,}) { return _then(_ServerError( null == failure ? _self.failure : failure // ignore: cast_nullable_to_non_nullable as ApiFailure, )); } /// Create a copy of GameFailure /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ApiFailureCopyWith<$Res> get failure { return $ApiFailureCopyWith<$Res>(_self.failure, (value) { return _then(_self.copyWith(failure: value)); }); } } /// @nodoc class _UnexpectedError implements GameFailure { const _UnexpectedError(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _UnexpectedError); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'GameFailure.unexpectedError()'; } } /// @nodoc class _DynamicErrorMessage implements GameFailure { const _DynamicErrorMessage(this.erroMessage); final String erroMessage; /// Create a copy of GameFailure /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$DynamicErrorMessageCopyWith<_DynamicErrorMessage> get copyWith => __$DynamicErrorMessageCopyWithImpl<_DynamicErrorMessage>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _DynamicErrorMessage&&(identical(other.erroMessage, erroMessage) || other.erroMessage == erroMessage)); } @override int get hashCode { return Object.hash(runtimeType,erroMessage); } @override String toString() { return 'GameFailure.dynamicErrorMessage(erroMessage: $erroMessage)'; } } /// @nodoc abstract mixin class _$DynamicErrorMessageCopyWith<$Res> implements $GameFailureCopyWith<$Res> { factory _$DynamicErrorMessageCopyWith(_DynamicErrorMessage value, $Res Function(_DynamicErrorMessage) _then) = __$DynamicErrorMessageCopyWithImpl; @useResult $Res call({ String erroMessage }); } /// @nodoc class __$DynamicErrorMessageCopyWithImpl<$Res> implements _$DynamicErrorMessageCopyWith<$Res> { __$DynamicErrorMessageCopyWithImpl(this._self, this._then); final _DynamicErrorMessage _self; final $Res Function(_DynamicErrorMessage) _then; /// Create a copy of GameFailure /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? erroMessage = null,}) { return _then(_DynamicErrorMessage( null == erroMessage ? _self.erroMessage : erroMessage // ignore: cast_nullable_to_non_nullable as String, )); } } // dart format on